proto

package
v1.4.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 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

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 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"`
}

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