serializers

package
v0.0.0-...-c901fe9 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SerializerField = iota
	SerializerMethod
)

Variables

This section is empty.

Functions

func DeserializeFromJSON

func DeserializeFromJSON(buf []byte, v interface{})

func IsValidContainer

func IsValidContainer(v interface{}) error

Types

type Serializer

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

func ConstructSerializer

func ConstructSerializer(validator ValidatorPredicate) Serializer

Stub function - other logic at some point

func (Serializer) AddField

func (s Serializer) AddField(name string) Serializer

func (Serializer) AddFieldAsString

func (s Serializer) AddFieldAsString(name string) Serializer

func (Serializer) AddMethod

func (s Serializer) AddMethod(name string, jsonKey string) Serializer

func (Serializer) SerializeToJSON

func (s Serializer) SerializeToJSON(v interface{}) ([]byte, error)

type ValidatorPredicate

type ValidatorPredicate func(interface{}) error

Jump to

Keyboard shortcuts

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