Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DecMode, _ = cbor.DecOptions{}.DecMode()
DecMode is the default DecMode to use when creating a new cbor Decoder
View Source
var EncMode = func() cbor.EncMode { options := cbor.CoreDetEncOptions() options.Time = cbor.TimeRFC3339Nano encMode, err := options.EncMode() if err != nil { panic(fmt.Errorf("could not extract encoding mode: %w", err)) } return encMode }()
EncMode is the default EncMode to use when creating a new cbor Encoder
Functions ¶
This section is empty.
Types ¶
type Codec ¶ added in v0.23.2
type Codec struct {
// contains filtered or unexported fields
}
func NewCodec ¶ added in v0.26.13
NewCodec returns a new cbor Codec with the provided EncMode and DecMode. If either is nil, the default cbor EncMode/DecMode will be used.
func (*Codec) NewDecoder ¶ added in v0.23.2
type Marshaler ¶ added in v0.23.2
type Marshaler struct{}
func NewMarshaler ¶ added in v0.23.2
func NewMarshaler() *Marshaler
func (*Marshaler) MustMarshal ¶ added in v0.23.2
func (*Marshaler) MustUnmarshal ¶ added in v0.23.2
type Option ¶ added in v0.26.13
type Option func(*Codec)
func WithDecMode ¶ added in v0.26.13
WithDecMode sets the DecMode to use when creating a new cbor Decoder.
func WithEncMode ¶ added in v0.26.13
WithEncMode sets the EncMode to use when creating a new cbor Encoder.
Click to show internal directories.
Click to hide internal directories.