parser

package
v1.20.0-dexcom-api.4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2017 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorNotParsed

func ErrorNotParsed() *service.Error

func ParseDatum

func ParseDatum(parser data.ObjectParser, factory data.Factory) (*data.Datum, error)

func ParseDatumArray

func ParseDatumArray(parser data.ArrayParser) (*[]data.Datum, 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, factory data.Factory, 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) ParseDatum

func (s *StandardArray) ParseDatum(index int) *data.Datum

func (*StandardArray) ParseDatumArray

func (s *StandardArray) ParseDatumArray(index int) *[]data.Datum

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) 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, factory data.Factory, 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) ParseDatum

func (s *StandardObject) ParseDatum(key string) *data.Datum

func (*StandardObject) ParseDatumArray

func (s *StandardObject) ParseDatumArray(key string) *[]data.Datum

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) 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