Documentation ¶
Index ¶
- type Storage
- func (s *Storage) DeleteWishlistItem(_ context.Context, itemID wishlist.ItemID) error
- func (s *Storage) Get(_ context.Context, id wishlist.ID) (*wishlist.Wishlist, error)
- func (s *Storage) GetByUserID(_ context.Context, userID user.ID) ([]*wishlist.Wishlist, error)
- func (s *Storage) GetWishlistItemByID(_ context.Context, itemID wishlist.ItemID) (*wishlist.Item, error)
- func (s *Storage) GetWishlistItems(_ context.Context, wishlistID wishlist.ID, limit, offset uint) (items []*wishlist.Item, haveMore bool, err error)
- func (s *Storage) Upsert(_ context.Context, w *wishlist.Wishlist) error
- func (s *Storage) UpsertWishlistItem(_ context.Context, item *wishlist.Item) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct { Wishlists map[wishlist.ID]*wishlist.Wishlist Items map[wishlist.ID][]*wishlist.Item WishlistLock *sync.RWMutex ItemsLock *sync.RWMutex }
func NewWishlistInMemory ¶
func NewWishlistInMemory() *Storage
func (*Storage) DeleteWishlistItem ¶
func (*Storage) GetByUserID ¶
func (*Storage) GetWishlistItemByID ¶
func (*Storage) GetWishlistItems ¶
Click to show internal directories.
Click to hide internal directories.