Documentation
¶
Index ¶
- func AddBalance(username string, amount float64, config Config) (balance models.History, err error)
- func BuyProduct(productID string, username string, config Config) (purchase models.History, err error)
- func CreateProduct(product *models.Product, config Config) (err error)
- func CreateUser(user *models.User, config Config) error
- func GetEnv(key, fallback string) string
- func GetProduct(productID string, username string, config Config) (product models.Product, err error)
- func GetProducts(username string, params models.DefaultParams, config Config) (products []models.Product, err error)
- func GetUser(name string, stripped bool, config Config) (user models.User, err error)
- func GetUsers(params models.DefaultParams, stripped bool, config Config) (users []models.User, err error)
- func TransferToUser(from string, to string, amount float64, config Config) (transfer models.History, err error)
- func UpdateProduct(product *models.Product, config Config) (err error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBalance ¶
func BuyProduct ¶
func GetProduct ¶
func GetProducts ¶
func TransferToUser ¶
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() }
Click to show internal directories.
Click to hide internal directories.