protobuf

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 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

This section is empty.

Variables

View Source
var Compare = cmp.FilterValues(
	func(x, y interface{}) bool {
		_, xok := x.(proto.Message)
		_, yok := y.(proto.Message)
		return xok && yok
	},
	cmp.Comparer(func(x, y interface{}) bool {
		vx, ok := x.(proto.Message)
		if !ok {
			return false
		}
		vy, ok := y.(proto.Message)
		if !ok {
			return false
		}
		return proto.Equal(vx, vy)
	}),
)

Functions

func FromAny

func FromAny(from typeurl.Any) *anypb.Any

FromAny converts typeurl.Any to github.com/containerd/containerd/protobuf/types.Any.

func FromTimestamp

func FromTimestamp(from *timestamppb.Timestamp) time.Time

FromTimestamp creates time.Time from protobuf's Timestamp.

func MarshalAnyToProto

func MarshalAnyToProto(from interface{}) (*anypb.Any, error)

FromAny converts an arbitrary interface to github.com/containerd/containerd/protobuf/types.Any.

func ToTimestamp

func ToTimestamp(from time.Time) *timestamppb.Timestamp

ToTimestamp creates protobuf's Timestamp from time.Time.

Types

This section is empty.

Directories

Path Synopsis
Package proto provides convinient aliases that make google.golang.org/protobuf migration easier.
Package proto provides convinient aliases that make google.golang.org/protobuf migration easier.
Package types provides convinient aliases that make google.golang.org/protobuf migration easier.
Package types provides convinient aliases that make google.golang.org/protobuf migration easier.

Jump to

Keyboard shortcuts

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