marshal

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransformKindUnmarshal = "Unmarshal"
	TransformKindMarshal   = "Marshal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomContext

type CustomContext struct {
	Decoder *Decoder           `velty:"names=decoder"`
	Request *httputils.Request `velty:"names=request"`
}

type Decoder

type Decoder struct {
	Decoded interface{} `velty:"-"`
	// contains filtered or unexported fields
}

func (*Decoder) UnmarshalInto

func (d *Decoder) UnmarshalInto(typeName string, unescape bool) (string, error)

type State

type State struct {
	Ctx         CustomContext
	ExpandState *expand.State
}

type Transform

type Transform struct {
	ParamName   string `json:",omitempty" yaml:",omitempty"`
	Kind        string `json:",omitempty" yaml:",omitempty"`
	Path        string `json:",omitempty" yaml:",omitempty"`
	Codec       string `json:",omitempty" yaml:",omitempty"`
	Source      string `json:",omitempty" yaml:",omitempty"`
	SourceURL   string `json:",omitempty" yaml:",omitempty"`
	Transformer string `json:",omitempty" yaml:",omitempty"`
	// contains filtered or unexported fields
}

func (*Transform) Evaluate

func (t *Transform) Evaluate(request *http.Request, decoder *gojay.Decoder, fn xreflect.LookupType) (*State, error)

func (*Transform) Init

func (t *Transform) Init(ctx context.Context, fs afs.Service, lookupType xreflect.LookupType) error

func (*Transform) UnmarshalerInto

func (t *Transform) UnmarshalerInto() json.UnmarshalerInto

type TransformIndex

type TransformIndex map[string]Transforms

type Transforms

type Transforms []*Transform

func (Transforms) FilterByKind

func (t Transforms) FilterByKind(kind string) Transforms

func (Transforms) Index

func (t Transforms) Index() map[string]*Transform

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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