ffgen

package
v0.0.0-...-8cb98a2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Marshaler

type Marshaler interface {
	MarshalPermittedJSON(getter PermitterGetter) ([]byte, error)
}

Marshaler

type MarshalerWrapper

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

func NewMarshalerWrapper

func NewMarshalerWrapper(marshaler Marshaler, getter PermitterGetter) *MarshalerWrapper

func (*MarshalerWrapper) MarshalJSON

func (w *MarshalerWrapper) MarshalJSON() ([]byte, error)

type Permitter

type Permitter interface {
	IsPermitted(field string) bool
	HasPermitted() bool
}

type PermitterGetter

type PermitterGetter interface {
	GetPermitter(reflect.Type) (Permitter, bool)
}

type PermitterValidator

type PermitterValidator interface {
	Permitter
	ValidateField(field string, value interface{}) error
}

type PermitterValidatorGetter

type PermitterValidatorGetter interface {
	GetPermitterValidator(reflect.Type) (PermitterValidator, bool)
}

type Unmarshaled

type Unmarshaled struct {
	Fields  map[string]interface{}
	Structs map[string]*Unmarshaled
	Slices  map[string][]*Unmarshaled
	StrMaps map[string]map[string]*Unmarshaled
	IntMaps map[string]map[int64]*Unmarshaled
}

Unmarshaled Only use Fields TODO support struct type

func (*Unmarshaled) Set

func (u *Unmarshaled) Set(k string, v interface{})

type Unmarshaler

type Unmarshaler interface {
	UnmarshalPermittedJSON(data []byte, getter PermitterValidatorGetter, unmarshaled *Unmarshaled) error
}

Unmarshaler

type UnmarshalerWrapper

type UnmarshalerWrapper struct {
	Unmarshaled *Unmarshaled
	// contains filtered or unexported fields
}

func NewUnmarshalerWrapper

func NewUnmarshalerWrapper(unmarshaler Unmarshaler, getter PermitterValidatorGetter) *UnmarshalerWrapper

func (*UnmarshalerWrapper) UnmarshalJSON

func (w *UnmarshalerWrapper) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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