Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Sqlite - SQLite protocol. Sqlite = "sqlite3" // Postgres - Postgresql protocol. Postgres = "postgresql" // MySQL - MySQL protocol. MySQL = "mysql" )
View Source
const ( // SQLiteInMemoryHost is the default string used by SQLite // as a host when ran in memory (string value is ":memory:"). SQLiteInMemoryHost = ":memory:" )
Variables ¶
View Source
var ( // ErrRecordNotFound - Record not found error. ErrRecordNotFound = gorm.ErrRecordNotFound // ErrUnsupportedDialect - An invalid dialect was specified. ErrUnsupportedDialect = errors.New("Unknown/unsupported DB Dialect") )
Functions ¶
Types ¶
type Certificate ¶
type Certificate struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
CommonName string
CAType string
KeyType string
CertificatePEM string
PrivateKeyPEM string
}
Certificate - Certificate database model.
func (*Certificate) BeforeCreate ¶
func (c *Certificate) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook to automatically set values.
type Config ¶
type Config struct {
Dialect string `json:"dialect"`
Database string `json:"database"`
Username string `json:"username"`
Password string `json:"password"`
Host string `json:"host"`
Port uint16 `json:"port"`
Params map[string]string `json:"params"`
MaxIdleConns int `json:"max_idle_conns"`
MaxOpenConns int `json:"max_open_conns"`
LogLevel string `json:"log_level"`
}
Config - Server database configuration.
type Permissions ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.