proto

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MPL-2.0 Imports: 8 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 added in v0.13.0

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 added in v1.2.0

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 Message

type Message = proto.Message

Message is the main interface for protobuf API v2 messages.

type Mount added in v1.2.0

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

Mount specifies a mount for a container.

Jump to

Keyboard shortcuts

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