package
module
Version:
v0.0.0-...-9eccf32
Opens a new window with list of versions in this module.
Published: Jan 12, 2017
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func NewError(resource interface{}, column, err string) error
NewError generate a new error for a model's field
func RegisterCallBacks(db *gorm.DB)
'RegisterCallBacks' register callback into GORM DB
type Error struct {
Resource interface{}
Column string
Message string
}
'Error' is a validation error struct that hold model, column and error message
'Error' show error message
'Label' is a label including model type, primary key and column name
Source Files
¶
Click to show internal directories.
Click to hide internal directories.