codec

package
v0.0.0-...-45318bc Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = make(Map)
View Source
var DefaultObject = Default.
	RegisterMap("object", make(Map))
View Source
var DefaultValue = Default.RegisterMap("value", make(Map))

Functions

This section is empty.

Types

type Bytes

type Bytes struct {
	Type      string
	Marshal   func([]byte) ([]byte, error)
	Unmarshal func([]byte) ([]byte, error)
}

func (Bytes) Decode

func (b Bytes) Decode(key string, o cti.Object) error

func (Bytes) Encode

func (b Bytes) Encode(key string, o cti.Object) error

type Confetti

type Confetti struct{}

func (Confetti) Decode

func (cc Confetti) Decode(key string, o cti.Object) error

func (Confetti) Encode

func (cc Confetti) Encode(key string, o cti.Object) error

type Func

type Func func(encoding string, m Map) error

type Map

type Map map[string]struct {
	Codec    cti.Codec
	Children Map
}

func (Map) Codec

func (m Map) Codec(encoding string) cti.Codec

func (Map) Decode

func (m Map) Decode(key string, o cti.Object) error

func (Map) Encode

func (m Map) Encode(key string, o cti.Object) error

func (Map) GoString

func (m Map) GoString() string

func (Map) Keys

func (m Map) Keys() []string

func (Map) Register

func (m Map) Register(name string, c cti.Codec) Map

func (Map) RegisterMap

func (m Map) RegisterMap(name string, cm Map) Map

func (Map) String

func (m Map) String() string

func (Map) Walk

func (m Map) Walk(fn Func) error

func (Map) WriteTab

func (m Map) WriteTab(w io.Writer) (n int64, err error)

func (Map) WriteTo

func (m Map) WriteTo(w io.Writer) (int64, error)

type Object

type Object struct {
	Type      string
	Marshal   func(interface{}) ([]byte, error)
	Unmarshal func([]byte, interface{}) error
}

func (Object) Decode

func (obj Object) Decode(key string, o cti.Object) error

func (Object) Encode

func (obj Object) Encode(key string, o cti.Object) error

func (Object) GoString

func (obj Object) GoString() string

type Tar

type Tar struct{}

func (Tar) Decode

func (Tar) Decode(key string, o cti.Object) error

func (Tar) Encode

func (Tar) Encode(key string, o cti.Object) error

type Value

type Value struct {
	Type    string
	Convert func(interface{}) (interface{}, error)
}

func (Value) Decode

func (v Value) Decode(key string, o cti.Object) error

func (Value) Encode

func (v Value) Encode(key string, o cti.Object) error

func (Value) GoString

func (v Value) GoString() string

type Zip

type Zip struct{}

func (Zip) Decode

func (Zip) Decode(key string, o cti.Object) error

func (Zip) Encode

func (Zip) Encode(key string, o cti.Object) error

Jump to

Keyboard shortcuts

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