parser

package
v1.23.0-verio.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2018 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

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"
	ErrorCodeTimeNotParsable = "value-not-parsable"
	ErrorCodeNotParsed       = "not-parsed"
)

Variables

This section is empty.

Functions

func ErrorNotParsed

func ErrorNotParsed() error

func ErrorTimeNotParsable

func ErrorTimeNotParsable(value string, layout string) 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

Types

type Array

type Array struct {
	// contains filtered or unexported fields
}

func NewArray

func NewArray(array *[]interface{}) *Array

func NewArrayParser

func NewArrayParser(base *structureBase.Base, array *[]interface{}) *Array

func (*Array) Array

func (a *Array) Array(reference int) *[]interface{}

func (*Array) Bool

func (a *Array) Bool(reference int) *bool

func (*Array) Error

func (a *Array) Error() error

func (*Array) Exists

func (a *Array) Exists() bool

func (*Array) Float64

func (a *Array) Float64(reference int) *float64

func (*Array) Int

func (a *Array) Int(reference int) *int

func (*Array) Interface

func (a *Array) Interface(reference int) *interface{}

func (*Array) NotParsed

func (a *Array) NotParsed() error

func (*Array) Object

func (a *Array) Object(reference int) *map[string]interface{}

func (*Array) Parse

func (a *Array) Parse(arrayParsable structure.ArrayParsable) error

func (*Array) ReferenceExists

func (a *Array) ReferenceExists(reference int) bool

func (*Array) References

func (a *Array) References() []int

func (*Array) String

func (a *Array) String(reference int) *string

func (*Array) StringArray

func (a *Array) StringArray(reference int) *[]string

func (*Array) Time

func (a *Array) Time(reference int, layout string) *time.Time

func (*Array) WithMeta

func (a *Array) WithMeta(meta interface{}) 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 NewObject

func NewObject(object *map[string]interface{}) *Object

func NewObjectParser

func NewObjectParser(base *structureBase.Base, object *map[string]interface{}) *Object

func (*Object) Array

func (o *Object) Array(reference string) *[]interface{}

func (*Object) Bool

func (o *Object) Bool(reference string) *bool

func (*Object) Error

func (o *Object) Error() error

func (*Object) Exists

func (o *Object) Exists() bool

func (*Object) Float64

func (o *Object) Float64(reference string) *float64

func (*Object) Int

func (o *Object) Int(reference string) *int

func (*Object) Interface

func (o *Object) Interface(reference string) *interface{}

func (*Object) NotParsed

func (o *Object) NotParsed() error

func (*Object) Object

func (o *Object) Object(reference string) *map[string]interface{}

func (*Object) Parse

func (o *Object) Parse(objectParsable structure.ObjectParsable) error

func (*Object) ReferenceExists

func (o *Object) ReferenceExists(reference string) bool

func (*Object) References

func (o *Object) References() []string

func (*Object) String

func (o *Object) String(reference string) *string

func (*Object) StringArray

func (o *Object) StringArray(reference string) *[]string

func (*Object) Time

func (o *Object) Time(reference string, layout string) *time.Time

func (*Object) WithMeta

func (o *Object) WithMeta(meta interface{}) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL