cbor

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeterministicDecOpts

func NewDeterministicDecOpts() cbor.DecOptions

NewDeterministicDecOpts is used when deterministic input is expected and unsigned and signed integers should be decoded to uint64 and int64 respectively.

func NewDeterministicDecOptsConvertSigned

func NewDeterministicDecOptsConvertSigned() cbor.DecOptions

NewDeterministicDecOptsConvertSigned is used when deterministic input is expected and both unsigned and signed integers should be decoded to int64

func NewDeterministicEncOpts

func NewDeterministicEncOpts() cbor.EncOptions

Types

type CBORCodec

type CBORCodec struct {
	// contains filtered or unexported fields
}

CBORCodec encode decode

func NewCBORCodec

func NewCBORCodec(encOpts cbor.EncOptions, decOpts cbor.DecOptions) (CBORCodec, error)

func (*CBORCodec) MarshalCBOR

func (kce *CBORCodec) MarshalCBOR(value any) ([]byte, error)

func (*CBORCodec) UnmarshalCBOR

func (kce *CBORCodec) UnmarshalCBOR(value []byte) ([]any, error)

func (*CBORCodec) UnmarshalInto added in v0.12.4

func (kce *CBORCodec) UnmarshalInto(b []byte, decoded interface{}) error

type CBORConfig

type CBORConfig struct {
	EncMode              cbor.EncMode
	DecMode              cbor.DecMode
	DecModeTagsForbidden cbor.DecMode
}

CBORConfig provides the properties necessary to configure cbor encoding and decoding for scitt

func NewCBORConfig

func NewCBORConfig(
	encOpts cbor.EncOptions, decOpts cbor.DecOptions,
) (CBORConfig, error)

Jump to

Keyboard shortcuts

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