serial

package
v1.2.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transform

type Transform interface {
	// unmarshal is a wrapper for setting data in model unmarhallers
	Unmarshal(key string, fn func(interface{}) error) error
	UnmarshalBool(name string, v *bool) error
	UnmarshalFloatString(name string, v *float64) error
	UnmarshalFloat(name string, v *float64) error
	UnmarshalInt64(name string, v *int64) error
	UnmarshalInt32(name string, v *int32) error
	UnmarshalInt(name string, v *int) error
	UnmarshalStringSlice(name string, v *[]string) error
	UnmarshalString(name string, v *string) error
	UnmarshalStructSlice(name string, v _jsonStructSlice, template interface{}) error
	UnmarshalStruct(name string, v interface{}) error
	UnmarshalTime(layout string, name string, v *time.Time) error
	UnmarshalUnixString(name string, v *time.Time) error
	Value(key string) interface{}
}

Transform interfaces data that can be deserialized/unmarshalled by type.

func NewJSONTransform

func NewJSONTransform(d []byte) (Transform, error)

NewJSONTransform will return a new json transform that will create a map of objects from a byte stream of JSON to be deserialized.

Jump to

Keyboard shortcuts

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