Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigLog ¶
type ConfigLog struct { // the id for the config log entry - auto genrated // // required: false // Unique: true // Pattern: [0-9]+ // min: 1 ID uint64 `gorm:"primary_key;auto_increment" json:"id"` // the service name for the config log entry // // required: true // Unique: false // max length: 20 Service string `gorm:"size:20;not null" json:"service"` // the team name for the config log entry // // required: true // Unique: false // max length: 20 Team string `gorm:"size:20;not null" json:"team"` // UserInfo []User `json:"user"` UserID uint32 `gorm:"not null" json:"user_id"` // the message for the config log entry // // required: true // max length: 255 Message string `gorm:"size:255;not null" json:"message"` // the creation date for the config log entry - auto genrated // // required: false // Unique: true CreatedAt time.Time `json:"created_on"` // the modification date for the config log entry - auto genrated // // required: false // Unique: true UpdatedAt time.Time `json:"updated_on"` }
ConfigLog defines the structure for an API config-log swagger:model
func (*ConfigLog) ValidateConfigLog ¶
type User ¶
type User struct { ID uint32 `gorm:"primary_key;auto_increment" json:"id"` Username string `gorm:"size:20;not null;unique" json:"username"` Email string `gorm:"size:50;not null;unique" json:"email"` Password string `gorm:"size:60;not null" json:"password"` CreatedAt time.Time `json:"created_on"` UpdatedAt time.Time `json:"updated_on"` ConfigLogs []ConfigLog `gorm:"foreignKey:UserID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"config_logs"` }
User struct abstract of user table in database
func (*User) BeforeSave ¶
BeforeSave method encrypt the password
func (*User) ValidateUser ¶
Click to show internal directories.
Click to hide internal directories.