Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
ID uint64 `gorm:"primaryKey;column:id;" json:"id"`
CreatedAt int64 `gorm:"column:created_at;index:created_at" json:"created_at"`
UpdatedAt int64 `gorm:"column:updated_at;index:updated_at" json:"updated_at"`
}
Database gorm supported data nesting, custom data table structure imported into the structure, will have these three fields by default
func (*Database) BeforeCreate ¶
BeforeCreate create hook, will force to set created_at and updated_at field, custom structure can re implement the method
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader orm init tool
type Node ¶
type Node struct {
LogLevel string `mapstructure:"log_level"`
DSN string `mapstructure:"dsn"`
MaxIdle int `mapstructure:"max_idle"`
MaxOpen int `mapstructure:"max_open"`
Replicas struct {
Connections []string `mapstructure:"connections"` // all replica set connections
MaxIdle int `mapstructure:"max_idle"`
MaxOpen int `mapstructure:"max_open"`
} `mapstructure:"replicas"`
}
Node config info
Click to show internal directories.
Click to hide internal directories.