package
4.3.2+incompatible
Repository: https://github.com/qbit/client.git
Documentation: pkg.go.dev

# README

kbfscodec

The serialization logic for KBFS. The package is named kbfscodec rather than codec for two reasons:

  1. We already have a keybase/go-codec/codec that is commonly used.
  2. A lot of variables are named codec already.

All errors returned by this package are wrapped with pkg/errors, and so need errors.Cause() to unwrap them.

# Functions

DeserializeFromFile deserializes the given file into the object pointed to by objPtr.
Equal returns whether or not the given objects serialize to the same byte string.
MakeExtraOrBust returns a filled-in Extra structure based on the given prefix.
No description provided by the author
NewMsgpack constructs a new CodecMsgpack.
NewMsgpackNoUnknownFields constructs a new CodecMsgpack that doesn't handle unknown fields.
SerializeToFile serializes the given object and writes it to the given file, making its parent directory first if necessary.
SerializeToFileIfNotExist is like SerializeToFile, but does nothing if the file already exists.
TestStructUnknownFields tests that hypothetical future versions of a struct can be deserialized by current clients and preserve unknown fields.
TestStructUnknownFieldsMsgpack calls TestStructUnknownFields with codecs with the msgpack codec.
Update encodes src into a byte string, and then decode it into the object pointed to by dstPtr.

# Constants

these track the start of a range of unique ExtCodes for various types of extensions.
these track the start of a range of unique ExtCodes for various types of extensions.

# Structs

CodecMsgpack implements the Codec interface using msgpack marshaling and unmarshaling.
Extra contains some fake extra fields that can be embedded into a struct to test handling of unknown fields.
Mock of Codec interface.

# Interfaces

Codec encodes and decodes arbitrary data.
CurrentStruct is an interface for the current version of a struct type.
FutureStruct is an interface for a hypothetical future version of a struct type.

# Type aliases

ExtCode is used to register codec extensions.