Documentation ¶
Index ¶
- func InitLog()
- func LoadConfig()
- type API
- type APIConfig
- type ChompConfig
- type Database
- func (d *Database) AddAccount(account auth.Account) error
- func (d *Database) GetAccount(username string) (auth.Account, error)
- func (d *Database) GetSessionByToken(token string) (auth.Session, error)
- func (d *Database) IsLoggedIn(username string) (bool, error)
- func (d *Database) Login(username, password string) (auth.Session, error)
- func (d *Database) Logout(session auth.Session) error
- func (d *Database) LogoutToken(token string) (auth.Session, error)
- type DatabaseConfig
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig()
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) SetEndpoints ¶
func (a *API) SetEndpoints()
type ChompConfig ¶
type ChompConfig struct { Version string `json:"version"` APIConfig APIConfig `json:"apiConfig"` DBConfig DatabaseConfig `json:"dbConfig"` }
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
The database holds information about the accounts, games and logins of the server
func NewDatabase ¶
func (*Database) GetSessionByToken ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
AccountDatabase string `json:"accountDatabase"`
}
Click to show internal directories.
Click to hide internal directories.