k4ever

package
v0.0.0-...-71ee054 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBalance

func AddBalance(username string, amount float64, config Config) (balance models.History, err error)

func BuyProduct

func BuyProduct(productID string, username string, config Config) (purchase models.History, err error)

func CreateProduct

func CreateProduct(product *models.Product, config Config) (err error)

func CreateUser

func CreateUser(user *models.User, config Config) error

func GetEnv

func GetEnv(key, fallback string) string

func GetProduct

func GetProduct(productID string, username string, config Config) (product models.Product, err error)

func GetProducts

func GetProducts(username string, params models.DefaultParams, config Config) (products []models.Product, err error)

func GetUser

func GetUser(name string, stripped bool, config Config) (user models.User, err error)

func GetUsers

func GetUsers(params models.DefaultParams, stripped bool, config Config) (users []models.User, err error)

func TransferToUser

func TransferToUser(from string, to string, amount float64, config Config) (transfer models.History, err error)

func UpdateProduct

func UpdateProduct(product *models.Product, config Config) (err error)

Types

type Config

type Config interface {
	Version() string
	GitCommit() string
	GitBranch() string
	BuildTime() string
	FilesPath() string
	LdapHost() string
	LdapBind() string
	LdapPassword() string
	LdapBaseDN() string
	LdapFilterDN() string
	HttpServerHost() string
	DB() *gorm.DB
	SetHttpServerPort(port int)
	HttpServerPort() int
	MigrateDB()
}

Jump to

Keyboard shortcuts

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