Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKeysTagField ¶
func GetMapTagField ¶
func RuleDefault ¶
func RuleDefault(f FieldParam)
Regla Default Tag Con esta regla se pueden setear valores por defecto en los campos que se le especifique dicha tag Uso:
NameField string `default:"valor por defecto"`
func RuleOnCreate ¶
func RuleOnCreate(f FieldParam)
Rule que se ejecutan al momento de guardar el registro por primera vez en al db
Types ¶
type FieldParam ¶
type FieldParamStruct ¶
type FieldParamStruct struct {
// contains filtered or unexported fields
}
func (FieldParamStruct) FieldName ¶
func (this FieldParamStruct) FieldName() string
func (FieldParamStruct) GetAction ¶
func (this FieldParamStruct) GetAction() string
func (FieldParamStruct) GetField ¶
func (this FieldParamStruct) GetField() *structs.Field
func (FieldParamStruct) GetParams ¶
func (this FieldParamStruct) GetParams() []string
type HandleFuncTag ¶
type HandleFuncTag func(i FieldParam)
type StructProcessorTag ¶
type StructProcessorTag struct {
// contains filtered or unexported fields
}
func New ¶
func New() *StructProcessorTag
Funcion para crear un nuevo procesor tag registra todas las rules dentro de la estructura de datos
func (StructProcessorTag) GetHandleRule ¶
func (this StructProcessorTag) GetHandleRule(tag string) HandleFuncTag
Funcion que obtiene el manejador de la regla, osea la funcion que procesa la regla
func (StructProcessorTag) ProcessTags ¶
func (this StructProcessorTag) ProcessTags(model interface{})
func (*StructProcessorTag) RegisterHandleRule ¶
func (this *StructProcessorTag) RegisterHandleRule(tag string, fn HandleFuncTag) error
Funcion para registrar las reglas en el processor tag
Click to show internal directories.
Click to hide internal directories.