Categorygithub.com/containerd/typeurl/v2
modulepackage
2.2.3
Repository: https://github.com/containerd/typeurl.git
Documentation: pkg.go.dev

# README

typeurl

PkgGoDev Build Status codecov Go Report Card

A Go package for managing the registration, marshaling, and unmarshaling of encoded types.

This package helps when types are sent over a ttrpc/GRPC API and marshaled as a protobuf Any

Project details

typeurl is a containerd sub-project, licensed under the Apache 2.0 license. As a containerd sub-project, you will find the:

information in our containerd/project repository.

Optional

By default, support for gogoproto is available along side the standard Google protobuf types. You can choose to leave gogo support out by using the !no_gogo build tag.

# Functions

Is returns true if the type of the Any is the same as v.
MarshalAny marshals the value v into an any with the correct TypeUrl.
MarshalAnyToProto converts an arbitrary interface to google.golang.org/protobuf/types/known/anypb.Any.
MarshalProto converts typeurl.Any to google.golang.org/protobuf/types/known/anypb.Any.
Register a type with a base URL for JSON marshaling.
TypeURL returns the type url for a registered type.
UnmarshalAny unmarshals the any type into a concrete type.
UnmarshalByTypeURL unmarshals the given type and value to into a concrete type.
UnmarshalTo unmarshals the any type into a concrete type passed in the out argument.
UnmarshalToByTypeURL unmarshals the given type and value into a concrete type passed in the out argument.

# Variables

No description provided by the author

# Interfaces

Any contains an arbitrary protcol buffer message along with its type.