parser

package
v1.29.0-mobile.3 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorNotParsed

func ErrorNotParsed() *service.Error

Types

type NotParsedPolicy

type NotParsedPolicy int
const (
	IgnoreNotParsed NotParsedPolicy = iota
	WarnLoggerNotParsed
	AppendErrorNotParsed
)

type ObjectParserInspector

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

func NewObjectParserInspector

func NewObjectParserInspector(parser data.ObjectParser) (*ObjectParserInspector, error)

func (*ObjectParserInspector) GetProperty

func (o *ObjectParserInspector) GetProperty(key string) *string

func (*ObjectParserInspector) NewInvalidPropertyError

func (o *ObjectParserInspector) NewInvalidPropertyError(key string, value string, allowedValues []string) error

func (*ObjectParserInspector) NewMissingPropertyError

func (o *ObjectParserInspector) NewMissingPropertyError(key string) error

type StandardArray

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

func NewStandardArray

func NewStandardArray(context data.Context, array *[]interface{}, notParsedPolicy NotParsedPolicy) (*StandardArray, error)

func (*StandardArray) AppendError

func (s *StandardArray) AppendError(reference interface{}, err *service.Error)

func (*StandardArray) Array

func (s *StandardArray) Array() *[]interface{}

func (*StandardArray) Logger

func (s *StandardArray) Logger() log.Logger

func (*StandardArray) NewChildArrayParser

func (s *StandardArray) NewChildArrayParser(index int) data.ArrayParser

func (*StandardArray) NewChildObjectParser

func (s *StandardArray) NewChildObjectParser(index int) data.ObjectParser

func (*StandardArray) ParseBoolean

func (s *StandardArray) ParseBoolean(index int) *bool

func (*StandardArray) ParseFloat

func (s *StandardArray) ParseFloat(index int) *float64

func (*StandardArray) ParseInteger

func (s *StandardArray) ParseInteger(index int) *int

func (*StandardArray) ParseInterface

func (s *StandardArray) ParseInterface(index int) *interface{}

func (*StandardArray) ParseInterfaceArray

func (s *StandardArray) ParseInterfaceArray(index int) *[]interface{}

func (*StandardArray) ParseObject

func (s *StandardArray) ParseObject(index int) *map[string]interface{}

func (*StandardArray) ParseObjectArray

func (s *StandardArray) ParseObjectArray(index int) *[]map[string]interface{}

func (*StandardArray) ParseString

func (s *StandardArray) ParseString(index int) *string

func (*StandardArray) ParseStringArray

func (s *StandardArray) ParseStringArray(index int) *[]string

func (*StandardArray) ParseTime added in v1.26.0

func (s *StandardArray) ParseTime(index int, layout string) *time.Time

func (*StandardArray) ProcessNotParsed

func (s *StandardArray) ProcessNotParsed()

func (*StandardArray) SetMeta

func (s *StandardArray) SetMeta(meta interface{})

type StandardObject

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

func NewStandardObject

func NewStandardObject(context data.Context, object *map[string]interface{}, notParsedPolicy NotParsedPolicy) (*StandardObject, error)

func (*StandardObject) AppendError

func (s *StandardObject) AppendError(reference interface{}, err *service.Error)

func (*StandardObject) Logger

func (s *StandardObject) Logger() log.Logger

func (*StandardObject) NewChildArrayParser

func (s *StandardObject) NewChildArrayParser(key string) data.ArrayParser

func (*StandardObject) NewChildObjectParser

func (s *StandardObject) NewChildObjectParser(key string) data.ObjectParser

func (*StandardObject) Object

func (s *StandardObject) Object() *map[string]interface{}

func (*StandardObject) ParseBoolean

func (s *StandardObject) ParseBoolean(key string) *bool

func (*StandardObject) ParseFloat

func (s *StandardObject) ParseFloat(key string) *float64

func (*StandardObject) ParseInteger

func (s *StandardObject) ParseInteger(key string) *int

func (*StandardObject) ParseInterface

func (s *StandardObject) ParseInterface(key string) *interface{}

func (*StandardObject) ParseInterfaceArray

func (s *StandardObject) ParseInterfaceArray(key string) *[]interface{}

func (*StandardObject) ParseObject

func (s *StandardObject) ParseObject(key string) *map[string]interface{}

func (*StandardObject) ParseObjectArray

func (s *StandardObject) ParseObjectArray(key string) *[]map[string]interface{}

func (*StandardObject) ParseString

func (s *StandardObject) ParseString(key string) *string

func (*StandardObject) ParseStringArray

func (s *StandardObject) ParseStringArray(key string) *[]string

func (*StandardObject) ParseTime added in v1.26.0

func (s *StandardObject) ParseTime(key string, layout string) *time.Time

func (*StandardObject) ProcessNotParsed

func (s *StandardObject) ProcessNotParsed()

func (*StandardObject) SetMeta

func (s *StandardObject) SetMeta(meta interface{})

Jump to

Keyboard shortcuts

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