service

package
v0.0.0-...-247c3a5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewWishlistService

func NewWishlistService(storage storage, manager eventManager) *Service

func (*Service) AddWishlistItem

func (s *Service) AddWishlistItem(ctx context.Context, item *wishlistPkg.Item) error

func (*Service) Archive

func (s *Service) Archive(ctx context.Context, id wishlistPkg.ID) error

func (*Service) BookItem

func (s *Service) BookItem(ctx context.Context, itemID wishlistPkg.ItemID, userID user.ID) error

func (*Service) Create

func (s *Service) Create(ctx context.Context, wishlist *wishlistPkg.Wishlist) error

func (*Service) Get

func (*Service) GetByUserID

func (s *Service) GetByUserID(ctx context.Context, userID user.ID) (wishlistPkg.Wishlists, error)

func (*Service) GetWishlistItem

func (s *Service) GetWishlistItem(ctx context.Context, itemID wishlistPkg.ItemID) (*wishlistPkg.Item, error)

func (*Service) GetWishlistItems

func (s *Service) GetWishlistItems(ctx context.Context, wishlistID wishlistPkg.ID, limit, offset uint) ([]*wishlistPkg.Item, bool, error)

func (*Service) RemoveItem

func (s *Service) RemoveItem(ctx context.Context, item wishlistPkg.ItemID) error

func (*Service) Restore

func (s *Service) Restore(ctx context.Context, id wishlistPkg.ID) error

func (*Service) SetBookingAvailabilityForItem

func (s *Service) SetBookingAvailabilityForItem(ctx context.Context, itemID wishlistPkg.ItemID, isAvailable bool) error

func (*Service) UnBookItem

func (s *Service) UnBookItem(ctx context.Context, itemID wishlistPkg.ItemID, userID user.ID) error

func (*Service) Update

func (s *Service) Update(ctx context.Context, wishlist *wishlistPkg.Wishlist) error

Jump to

Keyboard shortcuts

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