Documentation ¶
Overview ¶
Package db provides database operations and data structures
Index ¶
- type Client
- func (client *Client) CountStickers(userID int64) (int64, error)
- func (client *Client) DeleteSticker(sticker Sticker) error
- func (client *Client) GetStickers(userID int64) (Stickers, error)
- func (client *Client) PutSticker(sticker Sticker) error
- func (client *Client) StickerBelongsToUser(userID int64, sticker Sticker) (bool, error)
- func (client *Client) UseSticker(sticker Sticker) error
- type Sticker
- type Stickers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client provides DynamoDB client data
func (*Client) CountStickers ¶
CountStickers counts user's stickers
func (*Client) DeleteSticker ¶
DeleteSticker removes a sticker
func (*Client) GetStickers ¶
GetStickers gets a list of stickers by user id
func (*Client) PutSticker ¶
PutSticker inserts a sticker into table
func (*Client) StickerBelongsToUser ¶
StickerBelongsToUser checks if user has a sticker
func (*Client) UseSticker ¶
UseSticker increments UseCount of a sticker
type Sticker ¶
type Sticker struct { UserID int64 FileUniqueID string FileID string Timestamp string UseCount uint }
Sticker provides info about sticker
Click to show internal directories.
Click to hide internal directories.