journal

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEventNotFound = errors.New("event not found")

Functions

This section is empty.

Types

type Journal

type Journal struct {
	DirPath    string
	Tags       tag.Tags
	Friends    []*friend.Person
	Locations  friend.Locations
	Activities []*friend.Event
	Notes      []*friend.Event
	// contains filtered or unexported fields
}

func (*Journal) AddEvent

func (j *Journal) AddEvent(e friend.Event) (friend.Event, error)

func (*Journal) AddFriend

func (j *Journal) AddFriend(f friend.Person)

func (*Journal) AddFriendContact added in v0.0.10

func (j *Journal) AddFriendContact(fID string, c friend.Contact) (friend.Contact, error)

func (*Journal) AddFriendDate added in v0.0.8

func (j *Journal) AddFriendDate(fID string, d friend.Date) (friend.Date, error)

func (*Journal) AddFriendWishlistItem added in v0.0.10

func (j *Journal) AddFriendWishlistItem(
	fID string,
	w friend.WishlistItem,
) (friend.WishlistItem, error)

func (*Journal) AddLocation

func (j *Journal) AddLocation(l friend.Location)

func (*Journal) AddTags

func (j *Journal) AddTags(t []tag.Tag)

func (*Journal) GetEvent

func (j *Journal) GetEvent(t friend.EventType, q string) (friend.Event, error)

func (*Journal) GetFriend

func (j *Journal) GetFriend(q string) (friend.Person, error)

func (*Journal) GetFriendContact added in v0.0.10

func (j *Journal) GetFriendContact(cID string) (friend.Contact, error)

func (*Journal) GetFriendDate added in v0.0.8

func (j *Journal) GetFriendDate(dID string) (friend.Date, error)

func (*Journal) GetFriendWishlistItem added in v0.0.10

func (j *Journal) GetFriendWishlistItem(wID string) (friend.WishlistItem, error)

func (*Journal) GetLocation

func (j *Journal) GetLocation(q string) (friend.Location, error)

func (*Journal) GuessFriends

func (j *Journal) GuessFriends(q string) []*friend.Person

func (*Journal) Init

func (j *Journal) Init()

func (*Journal) IsDirty added in v0.0.6

func (j *Journal) IsDirty() bool

func (*Journal) ListEvents added in v0.0.7

func (j *Journal) ListEvents(q friend.ListEventQuery) ([]friend.Event, error)

func (*Journal) ListFriendContacts added in v0.0.10

func (j *Journal) ListFriendContacts(
	q friend.ListContactQuery,
) ([]friend.Contact, error)

func (*Journal) ListFriendDates added in v0.0.8

func (j *Journal) ListFriendDates(q friend.ListDateQuery) ([]friend.Date, error)

func (*Journal) ListFriendWishlistItems added in v0.0.10

func (j *Journal) ListFriendWishlistItems(
	q friend.ListWishlistQuery,
) ([]friend.WishlistItem, error)

func (*Journal) ListFriends

func (j *Journal) ListFriends(q friend.ListFriendQuery) []friend.Person

func (*Journal) ListLocations added in v0.0.6

func (j *Journal) ListLocations(q friend.ListLocationQuery) []friend.Location

func (*Journal) Path

func (j *Journal) Path() string

func (*Journal) RemoveEvents

func (j *Journal) RemoveEvents(t friend.EventType, toRemove []friend.Event)

func (*Journal) RemoveFriendContacts added in v0.0.10

func (j *Journal) RemoveFriendContacts(toRemove []friend.Contact) error

func (*Journal) RemoveFriendDates added in v0.0.8

func (j *Journal) RemoveFriendDates(toRemove []friend.Date) error

func (*Journal) RemoveFriendWishlistItems added in v0.0.10

func (j *Journal) RemoveFriendWishlistItems(toRemove []friend.WishlistItem) error

func (*Journal) RemoveFriends

func (j *Journal) RemoveFriends(toRemove []friend.Person)

func (*Journal) RemoveLocations

func (j *Journal) RemoveLocations(toRemove []friend.Location)

func (*Journal) SetDirty added in v0.0.6

func (j *Journal) SetDirty(d bool)

func (*Journal) Stats added in v0.0.6

func (j *Journal) Stats() Stats

func (*Journal) UpdateEvent

func (j *Journal) UpdateEvent(o, n friend.Event) (friend.Event, error)

func (*Journal) UpdateFriend

func (j *Journal) UpdateFriend(o, n friend.Person)

func (*Journal) UpdateFriendContact added in v0.0.10

func (j *Journal) UpdateFriendContact(o, n friend.Contact) (friend.Contact, error)

func (*Journal) UpdateFriendDate added in v0.0.8

func (j *Journal) UpdateFriendDate(o, n friend.Date) (friend.Date, error)

func (*Journal) UpdateFriendWishlistItem added in v0.0.10

func (j *Journal) UpdateFriendWishlistItem(o, n friend.WishlistItem) (friend.WishlistItem, error)

func (*Journal) UpdateLocation

func (j *Journal) UpdateLocation(o, n friend.Location)

type Stats added in v0.0.6

type Stats struct {
	Friends    int `json:"friends"`
	Locations  int `json:"locations"`
	Activities int `json:"activities"`
	Notes      int `json:"notes"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址