database

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB(d, ll string) (*gorm.DB, error)

func CreateUser

func CreateUser(d *gorm.DB, u string) error

func DeleteUser

func DeleteUser(d *gorm.DB, u *models.RegisteredUser) error

func GetBalance

func GetBalance(d *gorm.DB, u uint) (models.SotBalance, error)

func GetBalanceDifference

func GetBalanceDifference(d *gorm.DB, u uint) models.SotBalance

func GetFailedRatCookieTries

func GetFailedRatCookieTries(d *gorm.DB, u uint) (int64, error)

func GetLatestHistoryBalance

func GetLatestHistoryBalance(d *gorm.DB, u uint) models.SotBalanceHistory

func GetUser

func GetUser(d *gorm.DB, u string) (models.RegisteredUser, error)

func IncreaseFailedRatCookieTries

func IncreaseFailedRatCookieTries(d *gorm.DB, u uint) (int64, error)

func UpdateBalance

func UpdateBalance(d *gorm.DB, u uint, b *api.UserBalance) error

func UserDelPref

func UserDelPref(d *gorm.DB, u uint, k string) error

func UserGetPrefString

func UserGetPrefString(d *gorm.DB, u uint, k string) string

func UserSetPref

func UserSetPref(d *gorm.DB, u uint, k, v string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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