Files
2026-06-09 14:10:53 +02:00

35 lines
1.2 KiB
Go

package descr
const (
GrantModifyUsers = "modifyUsers"
GrantModifyDatabase = "modifyDatabase"
)
type Dump struct {
Timestamp string `json:"timestamp" yaml:"timestamp"`
Accounts []Account `json:"accounts" yaml:"accounts"`
Grants []Grant `json:"grants" yaml:"grants"`
}
type Account struct {
ID string `json:"id" yaml:"id" db:"id"`
Username string `json:"username" yaml:"username" db:"username"`
Passhash string `json:"passhash" yaml:"passhash" db:"passhash"`
Disabled bool `json:"disabled" yaml:"disabled" db:"disabled"`
CreatedAt string `json:"createdAt" yaml:"createdAt" db:"created_at"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt" db:"updated_at"`
}
type Grant struct {
ID string `json:"id" yaml:"id" db:"id"`
AccountID string `json:"accountID" yaml:"accountID" db:"account_id"`
Grantname string `json:"grantname" yaml:"grantname" db:"grantname"`
CreatedAt string `json:"createdAt" yaml:"createdAt" db:"created_at"`
}
type Server struct {
DatabaseInitialized bool `json:"databaseInitialized" yaml:"databaseInitialized"`
CreatedAt string `json:"createdAt" yaml:"createdAt"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt"`
}