Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisConnect ¶
func DisConnect() error
func Initialize ¶
func Initialize(dbDrv, dbSrc string)
Types ¶
type BaseFields ¶
type BaseFields struct { Id string `json:"id" gorm:"column:id;type:char(25);primaryKey;<-:create"` CreateTime time.Time `json:"create_time" gorm:"column:create_time;autoCreateTime"` UpdateTime time.Time `json:"update_time" gorm:"column:update_time;<-:create;autoUpdateTime"` }
func CreateBaseField ¶
func CreateBaseField() BaseFields
func (*BaseFields) BeforeCreate ¶
func (f *BaseFields) BeforeCreate(tx *gorm.DB) (err error)
func (*BaseFields) GetCreatedTime ¶
func (f *BaseFields) GetCreatedTime() time.Time
func (*BaseFields) GetId ¶
func (f *BaseFields) GetId() string
func (*BaseFields) GetUpdatedTime ¶
func (f *BaseFields) GetUpdatedTime() time.Time
func (*BaseFields) SetUpdatedTime ¶
func (f *BaseFields) SetUpdatedTime(t time.Time)
type BaseRepository ¶
type DriverType ¶
type DriverType int
const ( Unknown DriverType = iota - 1 Postgres Mysql Sqlite )
func ParseDriverType ¶
func ParseDriverType(dt string) DriverType
func (DriverType) String ¶
func (d DriverType) String() string
Click to show internal directories.
Click to hide internal directories.