Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend represents the instance which manages the database.
func New ¶
New returns a new backend struct mainly containing a database connection, according to the read config file.
func (*Backend) GetBalance ¶
GetBalance returns the balance of the account corresponding to the given account id.
type Config ¶
type Config struct { // DBName is the database name DBName string `json:"db_name"` // User is the database user User string `json:"user"` // Password is the database password for the used user Password string `json:"password"` // Addr is the database address Addr string `json:"addr"` // Port is the database port Port int `json:"port"` // SkipVerify is a bool which determines if the backend // must skips the ssl mode or not. SkipVerify bool `json:"skip_verify,omitempty"` // contains filtered or unexported fields }
Config is the backend configuration.
Click to show internal directories.
Click to hide internal directories.