Documentation ¶
Index ¶
Constants ¶
View Source
const ( // GORM's lifecyle HookBeforeCreate = "before_create" HookAfterCreate = "after_create" HookBeforeSave = "before_save" HookAfterSave = "after_save" HookBeforeUpdate = "before_update" HookAfterUpdate = "after_update" HookBeforeDelete = "before_delete" HookAfterDelete = "after_delete" HookAfterFind = "after_find" )
Variables ¶
View Source
var ( // A map of hook to callbacks per GORM’s lifecycle. // This allows additional logic to happen when a row is created, updated, deleted, or queried from the database, without changing original model structure or logic. // Otherwise we will have to add migration logic from version to version. Hooks map[string][]func(*gorm.DB, interface{}) )
Functions ¶
func GetDBByFile ¶
func GetGlobalDB ¶
Types ¶
type ContextKey ¶
type ContextKey string
Click to show internal directories.
Click to hide internal directories.