big

package
v0.0.0-...-a09fd22 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const Prefix = "/"

Variables

View Source
var NoValue null

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Encode(ctx context.Context, key string, s Struct) error
	Decode(ctx context.Context, key string, s Struct) error
}

type Error

type Error struct {
	Type string
	Op   string
	Key  string
	Err  error
	Next *Error
	// contains filtered or unexported fields
}

func (*Error) As

func (e *Error) As(target interface{}) bool

func (*Error) Chain

func (e *Error) Chain(err error) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Format

func (e *Error) Format(s fmt.State, verb rune)

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Field

type Field struct {
	Key   string
	Type  string
	Value interface{}
}

func (Field) Bytes

func (f Field) Bytes() []byte

func (Field) Put

func (f Field) Put(key string, s Struct) error

func (Field) Set

func (f Field) Set(key string, s Struct) error

func (Field) String

func (f Field) String() string

type FieldMap

type FieldMap map[string]Field

func (FieldMap) Copy

func (fm FieldMap) Copy() FieldMap

func (FieldMap) Fields

func (fm FieldMap) Fields() Fields

func (FieldMap) Sub

func (fm FieldMap) Sub(m FieldMap) FieldMap

type Fields

type Fields []Field

func (*Fields) Append

func (f *Fields) Append(key string, s Struct) error

func (*Fields) AppendIf

func (f *Fields) AppendIf(key string, s Struct) error

func (Fields) At

func (f Fields) At(i int) Field

func (Fields) Copy

func (f Fields) Copy() Fields

func (Fields) Keys

func (f Fields) Keys() []string

func (Fields) Len

func (f Fields) Len() int

func (Fields) Less

func (f Fields) Less(i, j int) bool

func (Fields) Map

func (f Fields) Map() FieldMap

func (Fields) Merge

func (f Fields) Merge() Struct

func (Fields) Sort

func (f Fields) Sort() Fields

func (Fields) String

func (f Fields) String() string

func (Fields) Struct

func (f Fields) Struct() Struct

func (Fields) Swap

func (f Fields) Swap(i, j int)

func (Fields) WriteTab

func (f Fields) WriteTab(w io.Writer) (n int64, err error)

func (Fields) WriteTo

func (f Fields) WriteTo(w io.Writer) (int64, error)

type Func

type Func func(key string, parent Struct) error

func Children

func Children(s Struct) Func

func Value

func Value(v interface{}, typ ...string) Func

type Struct

type Struct map[string]struct {
	Type     string      `json:"type,omitempty" yaml:"type,omitempty"`
	Value    interface{} `json:"value,omitempty" yaml:"value,omitempty"`
	Children Struct      `json:"children,omitempty" yaml:"children,omitempty"`
}

func Make

func Make(v interface{}) Struct

func Move

func Move(key string, s Struct) Struct

func (Struct) At

func (s Struct) At(key string) Struct

func (Struct) Copy

func (s Struct) Copy() Struct

func (Struct) Decode

func (s Struct) Decode(ctx context.Context, c Codec) error

func (Struct) Encode

func (s Struct) Encode(ctx context.Context, c Codec) error

func (Struct) Fields

func (s Struct) Fields() Fields

func (Struct) ForEach

func (s Struct) ForEach(fn Func) error

func (Struct) Keys

func (s Struct) Keys() []string

func (Struct) Merge

func (s Struct) Merge(u Struct) Struct

func (Struct) Move

func (s Struct) Move(key string, u Struct) error

func (Struct) Put

func (s Struct) Put(key string, fn Func) error

func (Struct) Raw

func (s Struct) Raw() Struct

func (Struct) ReverseWalk

func (s Struct) ReverseWalk(fn Func) error

func (Struct) Schema

func (s Struct) Schema() Struct

func (Struct) Shake

func (s Struct) Shake() Struct

func (Struct) ShakeTypes

func (s Struct) ShakeTypes() Struct

func (Struct) String

func (s Struct) String() string

func (Struct) Sub

func (s Struct) Sub(u Struct) Struct

func (Struct) TypeAt

func (s Struct) TypeAt(key string) string

func (Struct) Value

func (s Struct) Value() interface{}

func (Struct) ValueAt

func (s Struct) ValueAt(key string) interface{}

func (Struct) Walk

func (s Struct) Walk(fn Func) error

func (Struct) WriteTab

func (s Struct) WriteTab(w io.Writer) (n int64, err error)

func (Struct) WriteTo

func (s Struct) WriteTo(w io.Writer) (int64, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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