Versions in this module Expand all Collapse all v0 v0.0.1 Nov 15, 2021 Changes in this version + var ErrCast = errors.New("cast error") + var ErrNotSupported = errors.New("not supported") + var ErrPreallocate = errors.New("preallocate error") + func JSONPath(path []string) string + func MustAtoi(i string) int + func NewSchema(b []byte) (*jsonschema.Schema, error) + func Register(c *jsonschema.Compiler) + func SplitSpec(s string) (string, string) + func Unmarshal(r io.Reader) (interface{}, error) + type AJSONGetter struct + func NewAJSONGetter(spec string) (*AJSONGetter, error) + func (g *AJSONGetter) Get(ctx context.Context, obj interface{}) (interface{}, bool, error) + func (g *AJSONGetter) New(b []byte) (interface{}, error) + type BindNode struct + Next interface{} + Path string + func (node *BindNode) Bind(ctx context.Context, p ParsedCache) (interface{}, bool, error) + func (node *BindNode) Get(ctx context.Context, p ParsedCache) (interface{}, bool, error) + type BindPathError string + func (e BindPathError) Error() string + type Binder struct + func Compile(b []byte) (*Binder, error) + func (binder *Binder) Bind(ctx context.Context, b []byte) (interface{}, bool, error) + type GJSONGetter struct + func NewGJSONGetter(spec string) *GJSONGetter + func (g *GJSONGetter) Get(ctx context.Context, obj interface{}) (interface{}, bool, error) + func (g *GJSONGetter) New(b []byte) (interface{}, error) + type Getter interface + Get func(context.Context, interface{}) (interface{}, bool, error) + New func([]byte) (interface{}, error) + type GvalJSONPathGetter struct + func NewGvalJSONPathGetter(spec string) (*GvalJSONPathGetter, error) + func (g *GvalJSONPathGetter) Get(ctx context.Context, obj interface{}) (interface{}, bool, error) + func (g *GvalJSONPathGetter) New(b []byte) (interface{}, error) + type MapGetter struct + func NewMapGetter() *MapGetter + func (g *MapGetter) Get(context.Context, interface{}) (interface{}, bool, error) + func (g *MapGetter) New([]byte) (interface{}, error) + type NewGetter func(string) (Getter, error) + type NilGetter struct + func NewNilGetter() *NilGetter + func (g *NilGetter) Get(context.Context, interface{}) (interface{}, bool, error) + func (g *NilGetter) New([]byte) (interface{}, error) + type OJGGetter struct + func NewOJGGetter(spec string) (*OJGGetter, error) + func (g *OJGGetter) Get(ctx context.Context, obj interface{}) (interface{}, bool, error) + func (g *OJGGetter) New(b []byte) (interface{}, error) + type OJSONPathGetter struct + func NewOJSONPathGetter(spec string) (*OJSONPathGetter, error) + func (g *OJSONPathGetter) Get(ctx context.Context, obj interface{}) (interface{}, bool, error) + func (g *OJSONPathGetter) New(b []byte) (interface{}, error) + type ParsedCache map[string]interface + type SliceGetter struct + func NewSliceGetter(length int) *SliceGetter + func (g *SliceGetter) Get(context.Context, interface{}) (interface{}, bool, error) + func (g *SliceGetter) New([]byte) (interface{}, error)