cbor

package
v0.0.0-...-4b30682 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package cbor provides utility functions for encoding and decoding CBOR data using default options.

This includes: - canonical encoding rules - using RFC3339 for time values - tagging of time values - big.Int values are converted to integers, if they fit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDecoder

func DefaultDecoder(rd io.Reader) cbor.Decoder

DefaultDecoder returns a new decoder for the given reader.

func DefaultEncoder

func DefaultEncoder(w io.Writer) *cbor.Encoder

DefaultEncoder returns a new encoder for the given writer.

func Marshal

func Marshal(v interface{}) ([]byte, error)

Marshal marshals the given value into a byte slice.

func Unmarshal

func Unmarshal(data []byte, v interface{}) error

Unmarshal unmarshals the given data into the given value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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