proto

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package proto defines a functions to work with proto messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(a, b Message) bool

Equal reports whether two messages are equal.

func Marshal

func Marshal(m Message) ([]byte, error)

Marshal returns the wire-format encoding of m.

func RegisterDefaultTypes

func RegisterDefaultTypes()

RegisterDefaultTypes registers the pair of encoders/decoders for common types.

func Unmarshal

func Unmarshal(b []byte, m Message) error

Unmarshal parses the wire-format message in b and places the result in m. The provided message must be mutable (e.g., a non-nil pointer to a message).

Types

type LinuxIDMapping added in v1.6.0

type LinuxIDMapping struct {
	ContainerID uint32 `protobuf:"1"`
	HostID      uint32 `protobuf:"2"`
	Size        uint32 `protobuf:"3"`
}

LinuxIDMapping specifies UID/GID mappings.

type Message

type Message = proto.Message

Message is the main interface for protobuf API v2 messages.

type Mount

type Mount struct {
	Destination string           `protobuf:"1"`
	Type        string           `protobuf:"2"`
	Source      string           `protobuf:"3"`
	Options     []string         `protobuf:"4"`
	UIDMappings []LinuxIDMapping `protobuf:"5"`
	GIDMappings []LinuxIDMapping `protobuf:"6"`
}

Mount specifies a mount for a container.

type UnmarshalOptions

type UnmarshalOptions = proto.UnmarshalOptions

UnmarshalOptions is alias for proto.UnmarshalOptions.

Jump to

Keyboard shortcuts

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