Documentation ¶
Index ¶
- func GetUnseenMegaprikolsCount(db *pg.DB) (int, error)
- func GetUser(db *pg.DB, u *User) error
- func InitAndConnect(callback func(db *pg.DB) error) error
- func InsertUser(db *pg.DB, u *User) error
- func UpdateMegaprikol(db *pg.DB, m *Megaprikol) error
- func UpdateUser(db *pg.DB, u *User) error
- type Megaprikol
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitAndConnect ¶
func InsertUser ¶
func UpdateMegaprikol ¶
func UpdateMegaprikol(db *pg.DB, m *Megaprikol) error
func UpdateUser ¶
Types ¶
type Megaprikol ¶
type Megaprikol struct { Id int64 `pg:",pk"` Content string `pg:",default:'',notnull"` PingsCount int `pg:",default:0,notnull"` UsageCount int `pg:",default:0,notnull"` }
func GetRandomMegaprikol ¶
func GetRandomMegaprikol(db *pg.DB) (*Megaprikol, error)
func GetUnusedMegaprikols ¶
func GetUnusedMegaprikols(db *pg.DB) (ms []Megaprikol, err error)
func (Megaprikol) String ¶
func (m Megaprikol) String() string
type User ¶
type User struct { Id int64 `pg:",pk"` FullName string `pg:",default:'',notnull"` Username string `pg:",default:'',notnull"` ThingSize int `pg:",default:0,notnull"` LastGrowthAt time.Time }
func GetOrUpsertUser ¶
func GetOrderedUsers ¶
func GetRandomUsers ¶
Click to show internal directories.
Click to hide internal directories.