Documentation ¶
Overview ¶
Package sqlite implements a storer backed by sqlite3
nolint :revive TODO: remove ^ this
nolint :unused
Index ¶
- type Store
- func (s *Store) DeleteItem(ctx context.Context, itemID string) error
- func (s *Store) DeleteNote(ctx context.Context, noteID string) error
- func (s *Store) DeleteStatus(ctx context.Context, statusID string) error
- func (s *Store) DeleteUser(ctx context.Context, username string) error
- func (s *Store) FindItems(ctx context.Context, opts ...filters.FilterOption) ([]*statusthingv1.Item, error)
- func (s *Store) FindNotes(ctx context.Context, itemID string, _ ...filters.FilterOption) ([]*v1.Note, error)
- func (s *Store) FindStatus(ctx context.Context, opts ...filters.FilterOption) ([]*statusthingv1.Status, error)
- func (s *Store) FindUsers(ctx context.Context, opts ...filters.FilterOption) ([]*v1.User, error)
- func (s *Store) GetItem(ctx context.Context, itemID string) (*statusthingv1.Item, error)
- func (s *Store) GetNote(ctx context.Context, noteID string) (*v1.Note, error)
- func (s *Store) GetStatus(ctx context.Context, statusID string) (*statusthingv1.Status, error)
- func (s *Store) GetUser(ctx context.Context, username string) (*v1.User, error)
- func (s *Store) StoreItem(ctx context.Context, item *statusthingv1.Item) (*statusthingv1.Item, error)
- func (s *Store) StoreNote(ctx context.Context, note *v1.Note, itemID string) (*v1.Note, error)
- func (s *Store) StoreStatus(ctx context.Context, status *statusthingv1.Status) (*statusthingv1.Status, error)
- func (s *Store) StoreUser(ctx context.Context, user *v1.User) (*v1.User, error)
- func (s *Store) UpdateItem(ctx context.Context, itemID string, opts ...filters.FilterOption) error
- func (s *Store) UpdateNote(ctx context.Context, noteID string, opts ...filters.FilterOption) error
- func (s *Store) UpdateStatus(ctx context.Context, statusID string, opts ...filters.FilterOption) error
- func (s *Store) UpdateUser(ctx context.Context, username string, opts ...filters.FilterOption) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { *unimplemented.StatusThingStore // contains filtered or unexported fields }
Store stores statusthing data
func (*Store) DeleteItem ¶
DeleteItem deletes the statusthingv1.Item by its id
func (*Store) DeleteNote ¶
DeleteNote deletes a statusthingv1.Note by its id
func (*Store) DeleteStatus ¶
DeleteStatus deletes a statusthingv1.Status by its id
func (*Store) DeleteUser ¶
DeleteUser deletes a v1.User
func (*Store) FindItems ¶
func (s *Store) FindItems(ctx context.Context, opts ...filters.FilterOption) ([]*statusthingv1.Item, error)
FindItems returns all known statusthingv1.Item optionally filtered by the provided filters.FilterOption
func (*Store) FindNotes ¶
func (s *Store) FindNotes(ctx context.Context, itemID string, _ ...filters.FilterOption) ([]*v1.Note, error)
FindNotes gets all known statusthingv1.Note for the provided item id no filters are supported at this time
func (*Store) FindStatus ¶
func (s *Store) FindStatus(ctx context.Context, opts ...filters.FilterOption) ([]*statusthingv1.Status, error)
FindStatus returns all know statusthingv1.Status optionally filtered by the provided filters.FilterOption
func (*Store) GetItem ¶
GetItem gets a statusthingv1.Item by its id
func (*Store) GetNote ¶
GetNote gets a statusthingv1.Note by its id
func (*Store) GetStatus ¶
GetStatus gets a statusthingv1.Status by its unique id
func (*Store) StoreItem ¶
func (s *Store) StoreItem(ctx context.Context, item *statusthingv1.Item) (*statusthingv1.Item, error)
StoreItem stores the provided statusthingv1.Item
func (*Store) StoreNote ¶
StoreNote stores the provided statusthingv1.Note associated with the provided statusthingv1.StatusThing by its id
func (*Store) StoreStatus ¶
func (s *Store) StoreStatus(ctx context.Context, status *statusthingv1.Status) (*statusthingv1.Status, error)
StoreStatus stores the provided statusthingv1.Status
func (*Store) UpdateItem ¶
UpdateItem updates the statusthingv1.Item by its id with the provided filters.FilterOption Supported filters: - filters.WithStatusID - filters.WithName - filters.WithDescription
func (*Store) UpdateNote ¶
UpdateNote updates the statusthingv1.Note with the provided filters.FilterOption supported filters: filters.WithNoteText
func (*Store) UpdateStatus ¶
func (s *Store) UpdateStatus(ctx context.Context, statusID string, opts ...filters.FilterOption) error
UpdateStatus updates the statusthingv1.Status by id with the provided filters.FilterOption
func (*Store) UpdateUser ¶
func (s *Store) UpdateUser(ctx context.Context, username string, opts ...filters.FilterOption) error
UpdateUser updates a v1.User