Documentation ¶
Index ¶
- Constants
- func ErrorNotParsed() error
- func ErrorTypeNotArray(value interface{}) error
- func ErrorTypeNotBool(value interface{}) error
- func ErrorTypeNotFloat64(value interface{}) error
- func ErrorTypeNotInt(value interface{}) error
- func ErrorTypeNotObject(value interface{}) error
- func ErrorTypeNotString(value interface{}) error
- func ErrorTypeNotTime(value interface{}) error
- func ErrorValueTimeNotParsable(value string, layout string) error
- type Array
- func (a *Array) Array(reference int) *[]interface{}
- func (a *Array) Bool(reference int) *bool
- func (a *Array) Error() error
- func (a *Array) Exists() bool
- func (a *Array) Float64(reference int) *float64
- func (a *Array) HasError() bool
- func (a *Array) HasMeta() bool
- func (a *Array) HasSource() bool
- func (a *Array) Int(reference int) *int
- func (a *Array) Interface(reference int) *interface{}
- func (a *Array) Meta() interface{}
- func (a *Array) NotParsed() error
- func (a *Array) Object(reference int) *map[string]interface{}
- func (a *Array) Origin() structure.Origin
- func (a *Array) Parse(arrayParsable structure.ArrayParsable) error
- func (a *Array) ReferenceExists(reference int) bool
- func (a *Array) References() []int
- func (a *Array) ReportError(err error)
- func (a *Array) Source() structure.Source
- func (a *Array) String(reference int) *string
- func (a *Array) StringArray(reference int) *[]string
- func (a *Array) Time(reference int, layout string) *time.Time
- func (a *Array) WithMeta(meta interface{}) structure.ArrayParser
- func (a *Array) WithOrigin(origin structure.Origin) structure.ArrayParser
- func (a *Array) WithReferenceArrayParser(reference int) structure.ArrayParser
- func (a *Array) WithReferenceObjectParser(reference int) structure.ObjectParser
- func (a *Array) WithSource(source structure.Source) structure.ArrayParser
- type Object
- func (o *Object) Array(reference string) *[]interface{}
- func (o *Object) Bool(reference string) *bool
- func (o *Object) Error() error
- func (o *Object) Exists() bool
- func (o *Object) Float64(reference string) *float64
- func (o *Object) HasError() bool
- func (o *Object) HasMeta() bool
- func (o *Object) HasSource() bool
- func (o *Object) Int(reference string) *int
- func (o *Object) Interface(reference string) *interface{}
- func (o *Object) Meta() interface{}
- func (o *Object) NotParsed() error
- func (o *Object) Object(reference string) *map[string]interface{}
- func (o *Object) Origin() structure.Origin
- func (o *Object) Parse(objectParsable structure.ObjectParsable) error
- func (o *Object) ReferenceExists(reference string) bool
- func (o *Object) References() []string
- func (o *Object) ReportError(err error)
- func (o *Object) Source() structure.Source
- func (o *Object) String(reference string) *string
- func (o *Object) StringArray(reference string) *[]string
- func (o *Object) Time(reference string, layout string) *time.Time
- func (o *Object) WithMeta(meta interface{}) structure.ObjectParser
- func (o *Object) WithOrigin(origin structure.Origin) structure.ObjectParser
- func (o *Object) WithReferenceArrayParser(reference string) structure.ArrayParser
- func (o *Object) WithReferenceObjectParser(reference string) structure.ObjectParser
- func (o *Object) WithSource(source structure.Source) structure.ObjectParser
Constants ¶
View Source
const ( ErrorCodeTypeNotBool = "type-not-bool" ErrorCodeTypeNotFloat64 = "type-not-float64" ErrorCodeTypeNotInt = "type-not-int" ErrorCodeTypeNotString = "type-not-string" ErrorCodeTypeNotTime = "type-not-time" ErrorCodeTypeNotObject = "type-not-object" ErrorCodeTypeNotArray = "type-not-array" ErrorCodeValueNotParsable = "value-not-parsable" ErrorCodeNotParsed = "not-parsed" )
Variables ¶
This section is empty.
Functions ¶
func ErrorNotParsed ¶
func ErrorNotParsed() error
func ErrorTypeNotArray ¶
func ErrorTypeNotArray(value interface{}) error
func ErrorTypeNotBool ¶
func ErrorTypeNotBool(value interface{}) error
func ErrorTypeNotFloat64 ¶
func ErrorTypeNotFloat64(value interface{}) error
func ErrorTypeNotInt ¶
func ErrorTypeNotInt(value interface{}) error
func ErrorTypeNotObject ¶
func ErrorTypeNotObject(value interface{}) error
func ErrorTypeNotString ¶
func ErrorTypeNotString(value interface{}) error
func ErrorTypeNotTime ¶
func ErrorTypeNotTime(value interface{}) error
func ErrorValueTimeNotParsable ¶ added in v1.26.0
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
func NewArrayParser ¶
func NewArrayParser(base *structureBase.Base, array *[]interface{}) *Array
func (*Array) ReferenceExists ¶
func (*Array) References ¶
func (*Array) ReportError ¶ added in v1.24.0
func (*Array) StringArray ¶
func (*Array) WithMeta ¶
func (a *Array) WithMeta(meta interface{}) structure.ArrayParser
func (*Array) WithOrigin ¶ added in v1.24.0
func (a *Array) WithOrigin(origin structure.Origin) structure.ArrayParser
func (*Array) WithReferenceArrayParser ¶
func (a *Array) WithReferenceArrayParser(reference int) structure.ArrayParser
func (*Array) WithReferenceObjectParser ¶
func (a *Array) WithReferenceObjectParser(reference int) structure.ObjectParser
func (*Array) WithSource ¶
func (a *Array) WithSource(source structure.Source) structure.ArrayParser
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func NewObjectParser ¶
func NewObjectParser(base *structureBase.Base, object *map[string]interface{}) *Object
func (*Object) ReferenceExists ¶
func (*Object) References ¶
func (*Object) ReportError ¶ added in v1.24.0
func (*Object) StringArray ¶
func (*Object) WithMeta ¶
func (o *Object) WithMeta(meta interface{}) structure.ObjectParser
func (*Object) WithOrigin ¶ added in v1.24.0
func (o *Object) WithOrigin(origin structure.Origin) structure.ObjectParser
func (*Object) WithReferenceArrayParser ¶
func (o *Object) WithReferenceArrayParser(reference string) structure.ArrayParser
func (*Object) WithReferenceObjectParser ¶
func (o *Object) WithReferenceObjectParser(reference string) structure.ObjectParser
func (*Object) WithSource ¶
func (o *Object) WithSource(source structure.Source) structure.ObjectParser
Click to show internal directories.
Click to hide internal directories.