Documentation
¶
Index ¶
- func FromMap(item interface{}, jsonmap map[string]interface{}) (interface{}, validation.ValidationErrors)
- func FromMapWithFunc(item interface{}, jsonmap map[string]interface{}, ...) (interface{}, validation.ValidationErrors)
- func ToMap(item interface{}) map[string]interface{}
- func ToMapWithFunc(item interface{}, serializerFunc SerializerFunc) map[string]interface{}
- func ToSlice(items interface{}) []map[string]interface{}
- func ToSliceWithFunc(items interface{}, serializerFunc SerializerFunc) []map[string]interface{}
- type ISerializable
- type ISerializer
- type IValidator
- type SerializerFromMap
- func (this SerializerFromMap) DoBool(keyName string, fieldName string, required bool) ISerializer
- func (this SerializerFromMap) DoFloat32(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- func (this SerializerFromMap) DoFloat64(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- func (this SerializerFromMap) DoInt(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- func (this SerializerFromMap) DoSlice(keyName string, fieldName string) ISerializer
- func (this SerializerFromMap) DoString(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- func (this SerializerFromMap) DoTime(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- func (this SerializerFromMap) DoUint(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- type SerializerFunc
- type SerializerToMap
- func (this SerializerToMap) DoBool(keyName string, fieldName string, required bool) ISerializer
- func (this SerializerToMap) DoFloat32(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- func (this SerializerToMap) DoFloat64(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- func (this SerializerToMap) DoInt(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- func (this SerializerToMap) DoSlice(keyName string, fieldName string) ISerializer
- func (this SerializerToMap) DoString(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- func (this SerializerToMap) DoTime(keyName string, fieldName string, required bool, validator IValidator) ISerializer
- func (this SerializerToMap) DoUint(keyName string, fieldName string, required bool, validator IValidator) ISerializer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromMap ¶
func FromMap(item interface{}, jsonmap map[string]interface{}) (interface{}, validation.ValidationErrors)
func FromMapWithFunc ¶
func FromMapWithFunc(item interface{}, jsonmap map[string]interface{}, serializerFunc SerializerFunc) (interface{}, validation.ValidationErrors)
func ToMapWithFunc ¶
func ToMapWithFunc(item interface{}, serializerFunc SerializerFunc) map[string]interface{}
func ToSliceWithFunc ¶
func ToSliceWithFunc(items interface{}, serializerFunc SerializerFunc) []map[string]interface{}
Types ¶
type ISerializable ¶
type ISerializable interface {
Serialize(builder ISerializer) ISerializer
}
type ISerializer ¶
type ISerializer interface {
DoBool(string, string, bool) ISerializer
DoFloat64(string, string, bool, IValidator) ISerializer
DoFloat32(string, string, bool, IValidator) ISerializer
DoString(string, string, bool, IValidator) ISerializer
DoInt(string, string, bool, IValidator) ISerializer
DoUint(string, string, bool, IValidator) ISerializer
DoTime(string, string, bool, IValidator) ISerializer
DoSlice(string, string) ISerializer
}
type IValidator ¶
type IValidator interface {
Validate(interface{}) []error
}
type SerializerFromMap ¶
type SerializerFromMap struct {
// contains filtered or unexported fields
}
func (SerializerFromMap) DoBool ¶
func (this SerializerFromMap) DoBool(keyName string, fieldName string, required bool) ISerializer
func (SerializerFromMap) DoFloat32 ¶
func (this SerializerFromMap) DoFloat32(keyName string, fieldName string, required bool, validator IValidator) ISerializer
func (SerializerFromMap) DoFloat64 ¶
func (this SerializerFromMap) DoFloat64(keyName string, fieldName string, required bool, validator IValidator) ISerializer
func (SerializerFromMap) DoInt ¶
func (this SerializerFromMap) DoInt(keyName string, fieldName string, required bool, validator IValidator) ISerializer
func (SerializerFromMap) DoSlice ¶
func (this SerializerFromMap) DoSlice(keyName string, fieldName string) ISerializer
func (SerializerFromMap) DoString ¶
func (this SerializerFromMap) DoString(keyName string, fieldName string, required bool, validator IValidator) ISerializer
func (SerializerFromMap) DoTime ¶
func (this SerializerFromMap) DoTime(keyName string, fieldName string, required bool, validator IValidator) ISerializer
func (SerializerFromMap) DoUint ¶
func (this SerializerFromMap) DoUint(keyName string, fieldName string, required bool, validator IValidator) ISerializer
type SerializerFunc ¶
type SerializerFunc func(builder ISerializer) ISerializer
type SerializerToMap ¶
type SerializerToMap struct {
// contains filtered or unexported fields
}
func (SerializerToMap) DoBool ¶
func (this SerializerToMap) DoBool(keyName string, fieldName string, required bool) ISerializer
func (SerializerToMap) DoFloat32 ¶
func (this SerializerToMap) DoFloat32(keyName string, fieldName string, required bool, validator IValidator) ISerializer
func (SerializerToMap) DoFloat64 ¶
func (this SerializerToMap) DoFloat64(keyName string, fieldName string, required bool, validator IValidator) ISerializer
func (SerializerToMap) DoInt ¶
func (this SerializerToMap) DoInt(keyName string, fieldName string, required bool, validator IValidator) ISerializer
func (SerializerToMap) DoSlice ¶
func (this SerializerToMap) DoSlice(keyName string, fieldName string) ISerializer
func (SerializerToMap) DoString ¶
func (this SerializerToMap) DoString(keyName string, fieldName string, required bool, validator IValidator) ISerializer
func (SerializerToMap) DoTime ¶
func (this SerializerToMap) DoTime(keyName string, fieldName string, required bool, validator IValidator) ISerializer
func (SerializerToMap) DoUint ¶
func (this SerializerToMap) DoUint(keyName string, fieldName string, required bool, validator IValidator) ISerializer
Source Files
¶
Click to show internal directories.
Click to hide internal directories.