Documentation ¶
Index ¶
- Variables
- func CamelToSnake(s string) string
- func MarshalJSON(values map[string]interface{}, fields map[string]*field.Descriptor) ([]byte, error)
- func SnakeToCamel(s string) string
- func UnmarshalJSON(b []byte, fields map[string]*field.Descriptor) (values map[string]interface{}, err error)
- func ValidateModel(m interface{}, fields map[string]*field.Descriptor, ...) error
- type FieldsSet
- type Schema
- type SchemaConfig
- type SchemaConfiger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrModelValidationError represents scope of model validation errors. ErrModelValidationError = scope_error.New("model validation error") // ErrModelFieldValidationError represents scope of model field validation errors. ErrModelFieldValidationError = scope_error.New("model field validation error") )
Functions ¶
func CamelToSnake ¶
func MarshalJSON ¶
func SnakeToCamel ¶
func UnmarshalJSON ¶
func ValidateModel ¶
func ValidateModel( m interface{}, fields map[string]*field.Descriptor, fieldErrors map[string]*scope_error.ScopeError, ) error
Types ¶
type SchemaConfig ¶
type SchemaConfig struct {
JSON bool
}
type SchemaConfiger ¶
type SchemaConfiger interface {
Model() SchemaConfig
}
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
example
|
|
pkg
|
|
scope_error
Package scope_error defines a scoped error.
|
Package scope_error defines a scoped error. |
Click to show internal directories.
Click to hide internal directories.