Documentation ¶
Index ¶
- type Store
- func (s *Store) FindAll(ctx context.Context, userID string, filter []assignment.TargetType) ([]assignment.Target, error)
- func (s *Store) Set(ctx context.Context, userID string, tgt assignment.Target) error
- func (s *Store) SetTx(ctx context.Context, tx *sql.Tx, userID string, tgt assignment.Target) error
- func (s *Store) Unset(ctx context.Context, userID string, tgt assignment.Target) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store allows the lookup and management of Favorites.
func NewStore ¶ added in v0.30.0
NewStore will create a DB backend from a sql.DB. An error will be returned if statements fail to prepare.
func (*Store) FindAll ¶
func (s *Store) FindAll(ctx context.Context, userID string, filter []assignment.TargetType) ([]assignment.Target, error)
func (*Store) Set ¶
Set will store the target as a favorite of the given user. Must be authorized as System or the same user. It is safe to call multiple times.
Click to show internal directories.
Click to hide internal directories.