Documentation
¶
Index ¶
- type Option
- type PackResponse
- type Postgres
- func (p *Postgres) AddStickerpack(pack *StoredPack) (*PackResponse, error)
- func (p *Postgres) DeleteMissingPack(name string) error
- func (p *Postgres) DeletePack(name string, userID int64) error
- func (p *Postgres) GetPack(name string) (*PackResponse, error)
- func (p *Postgres) IsPackOwner(name string, userID int64) (bool, error)
- func (p *Postgres) IsPackPublic(name string) (bool, error)
- func (p *Postgres) NameExists(name string) (bool, error)
- func (p Postgres) PublicPacksCount() (int, error)
- func (p Postgres) PublicStickerpacks(page, pageSize int) ([]PackResponse, error)
- func (p *Postgres) UpdateIsPublic(name string, isPublic bool) error
- func (p Postgres) UserPacks(userID int64, page, pageSize int) ([]PackResponse, error)
- func (p Postgres) UserPacksCount(userID int64) (int, error)
- type StoredPack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*StoredPack)
func WithPublic ¶
func WithThumbnail ¶
func WithUserID ¶
type PackResponse ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
func NewPostgres() *Postgres
func (*Postgres) AddStickerpack ¶
func (p *Postgres) AddStickerpack(pack *StoredPack) (*PackResponse, error)
func (*Postgres) DeleteMissingPack ¶
func (*Postgres) IsPackOwner ¶
func (Postgres) PublicPacksCount ¶
func (Postgres) PublicStickerpacks ¶
func (p Postgres) PublicStickerpacks(page, pageSize int) ([]PackResponse, error)
func (*Postgres) UpdateIsPublic ¶
type StoredPack ¶
type StoredPack struct {
ID int64
UserID int64
Name string
Title string
IsPublic bool
ThumbnailID string
}
func NewStoredPack ¶
func NewStoredPack(opts ...Option) *StoredPack
Click to show internal directories.
Click to hide internal directories.