favorite

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct{}

Store allows the lookup and management of Favorites.

func NewStore added in v0.30.0

func NewStore(ctx context.Context) (*Store, error)

NewStore will create a new Store.

func (*Store) FindAll

func (s *Store) FindAll(ctx context.Context, tx gadb.DBTX, userID string, filter []assignment.TargetType) ([]assignment.Target, error)

func (*Store) Set

func (s *Store) Set(ctx context.Context, tx gadb.DBTX, userID string, tgt assignment.Target) error

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.

func (*Store) Unset

func (s *Store) Unset(ctx context.Context, tx gadb.DBTX, userID string, tgt assignment.Target) error

Unset will remove 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.

Jump to

Keyboard shortcuts

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