cbor.go 320 B

123456789
  1. package utils
  2. // CBORMarshal returns the CBOR encoding of v.
  3. type CBORMarshal func(v any) ([]byte, error)
  4. // CBORUnmarshal parses the CBOR-encoded data and stores the result
  5. // in the value pointed to by v. If v is nil or not a pointer,
  6. // Unmarshal returns an error.
  7. type CBORUnmarshal func(data []byte, v any) error