Documentation ¶
Index ¶
- type Database
- func (db *Database) AutoMigrate(dst ...interface{}) error
- func (db *Database) Close() error
- func (db *Database) CreateAccount(account *models.Account) error
- func (db *Database) Engine() string
- func (db *Database) ListAccounts(accountName string, userName string) (accounts []models.Account, err error)
- func (db *Database) Open() error
- func (db *Database) RemoveAccount(accountName string, userName string) error
- func (db *Database) RetrieveFirstAccount(accountName string, userName string) (account models.Account)
- func (db *Database) SaveAccount(account models.Account) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database is a handle to the database layer
func LoadDatabase ¶
LoadDatabase initialize database instance, it does not connect to the database.
func (*Database) AutoMigrate ¶
func (*Database) Close ¶
Close will close the database connection. Should be deferred right after Open.
func (*Database) ListAccounts ¶
func (*Database) RemoveAccount ¶ added in v0.16.4
func (*Database) RetrieveFirstAccount ¶
Click to show internal directories.
Click to hide internal directories.