package protobuf
import "github.com/containerd/containerd/protobuf"
Index ¶
- Variables
- func FromAny(from typeurl.Any) *anypb.Any
- func FromTimestamp(from *timestamppb.Timestamp) time.Time
- func MarshalAnyToProto(from interface{}) (*anypb.Any, error)
- func ToTimestamp(from time.Time) *timestamppb.Timestamp
Variables ¶
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 ¶
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 ¶
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.
Source Files ¶
any.go compare.go timestamp.go
Directories ¶
Path | Synopsis |
---|---|
protobuf/plugin | |
protobuf/proto | Package proto provides convinient aliases that make google.golang.org/protobuf migration easier. |
protobuf/types | Package types provides convinient aliases that make google.golang.org/protobuf migration easier. |
- Version
- v1.7.14
- Published
- Mar 11, 2024
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 1 minute ago –
Tools for package owners.