cbor

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader interface {
	Unmarshal(x interface{}) error
	ReadTag() (borat.CBORTag, error)
	ReadIntMapUntagged() (map[int]interface{}, error)
}

Reader defines all functions necessary to decode a message or section encoded in cbor

func NewReader

func NewReader(in io.Reader) Reader

NewWriter returns a new cbor writer which writes to out.

type Writer

type Writer interface {
	Marshal(x interface{}) error
	WriteIntMap(m map[int]interface{}) error
	WriteTag(t borat.CBORTag) error
	WriteArray(a []interface{}) error
}

Writer defines all functions necessary to encode a message or section in cbor

func NewWriter

func NewWriter(out io.Writer) Writer

NewWriter returns a new cbor writer which writes to out.

Jump to

Keyboard shortcuts

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