format

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 10 modules, 27 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const EncodingOffset int = 2
View Source
const EnvelopeOffset int = 2

Variables

This section is empty.

Functions

func MarshalEnvelope

func MarshalEnvelope(model Model) ([]byte, error)

func MarshalProto

func MarshalProto(v Model) ([]byte, error)

func UnmarshalEnvelope

func UnmarshalEnvelope(logger lager.Logger, unencodedPayload []byte, model Model) error

func UnmarshalProto

func UnmarshalProto(logger lager.Logger, marshaledPayload []byte, model Model) error

Types

type Encoder

type Encoder interface {
	Encode(payload []byte) ([]byte, error)
	Decode(payload []byte) ([]byte, error)
}

func NewEncoder

func NewEncoder(cryptor encryption.Cryptor) Encoder

type Encoding

type Encoding [EncodingOffset]byte
var (
	BASE64_ENCRYPTED Encoding = [2]byte{'0', '2'}
)

type EnvelopeFormat

type EnvelopeFormat byte
const (
	PROTO EnvelopeFormat = 2
)

type Model

type Model interface {
	proto.Message
}

type Serializer

type Serializer interface {
	Marshal(logger lager.Logger, model Model) ([]byte, error)
	Unmarshal(logger lager.Logger, encodedPayload []byte, model Model) error
}

func NewSerializer

func NewSerializer(cryptor encryption.Cryptor) Serializer

type Version

type Version byte
const (
	V0 Version = 0
	V1 Version = 1
	V2 Version = 2
	V3 Version = 3
)

Jump to

Keyboard shortcuts

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