Documentation ¶
Overview ¶
Package wishlists contains actions related to wishlists
Index ¶
- type CreateWishlistParams
- type NewWishParams
- type UpdateWishParams
- type UpdateWishlistParams
- type Wish
- type WishLists
- func (wl WishLists) AddWish(ctx context.Context, w Wishlist, wishID string, order int64) error
- func (wl WishLists) ByID(ctx context.Context, id string) (Wishlist, error)
- func (wl WishLists) ByProfile(ctx context.Context, profileID string, visibilities ...WishlistVisibility) (WishlistList, error)
- func (wl WishLists) CreateWishlist(ctx context.Context, params CreateWishlistParams) (Wishlist, error)
- func (wl WishLists) DeleteWish(ctx context.Context, id string) error
- func (wl WishLists) DeleteWishlist(ctx context.Context, id string) error
- func (wl WishLists) GetUnlisted(ctx context.Context, profileID string) (Wishlist, error)
- func (wl WishLists) GetWish(ctx context.Context, id string) (Wish, error)
- func (wl WishLists) NewWish(ctx context.Context, params NewWishParams) (Wish, error)
- func (wl WishLists) RemoveWish(ctx context.Context, w Wishlist, wishId string) error
- func (wl WishLists) UpdateWish(ctx context.Context, params UpdateWishParams) (Wish, error)
- func (wl WishLists) UpdateWishlist(ctx context.Context, params UpdateWishlistParams) (Wishlist, error)
- type Wishlist
- type WishlistItem
- type WishlistList
- type WishlistVisibility
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateWishlistParams ¶
type CreateWishlistParams struct { ProfileID string Title string Description string Visibility WishlistVisibility }
type NewWishParams ¶
type NewWishParams struct { ProfileID string URL string Title string Description string Quantity int64 }
NewWishParams are the input parameters for a new wish
type UpdateWishParams ¶
type UpdateWishParams struct { ID string URL *string Title *string Description *string Quantity *int64 }
UpdateWishParams are the optional params allowed to be updated in a wish.
type UpdateWishlistParams ¶
type UpdateWishlistParams struct { ID string Title *string Description *string Visibility *WishlistVisibility }
type WishLists ¶
type WishLists struct {
// contains filtered or unexported fields
}
func (WishLists) ByProfile ¶
func (wl WishLists) ByProfile( ctx context.Context, profileID string, visibilities ...WishlistVisibility, ) (WishlistList, error)
ByProfile returns a list of Wishlists associated with the given profile.
func (WishLists) CreateWishlist ¶
func (wl WishLists) CreateWishlist(ctx context.Context, params CreateWishlistParams) (Wishlist, error)
CreateWishlist makes a new empty wishlist
func (WishLists) DeleteWish ¶
DeleteWish removes a wish from the wishlist
func (WishLists) DeleteWishlist ¶
func (WishLists) GetUnlisted ¶
func (WishLists) RemoveWish ¶
func (WishLists) UpdateWish ¶
UpdateWish updates a wish with the given parameters. Nil parameters are left unchanged.
func (WishLists) UpdateWishlist ¶
type Wishlist ¶
type Wishlist struct { ID string Title string Description string ProfileID string Created time.Time Updated time.Time Visibility WishlistVisibility WishesCount int64 Items []WishlistItem `json:",omitempty"` System bool }
Wishlist is a collection of wishlist items
type WishlistItem ¶
WishlistItem is a member of a wishlist
type WishlistList ¶
type WishlistList []Wishlist
WishlistList is a list of wishlists. This is typically a collection of wishlists owned by a profile.
type WishlistVisibility ¶
type WishlistVisibility string
const ( VisibilityPublic WishlistVisibility = "public" VisibilityUnlisted WishlistVisibility = "unlisted" VisibilityPrivate WishlistVisibility = "private" )
Click to show internal directories.
Click to hide internal directories.