Documentation
¶
Overview ¶
protoutils are a collection of util methods for using proto in rdk
Index ¶
- func ConvertOrientationToProto(o spatialmath.Orientation) *commonpb.Orientation
- func ConvertProtoToOrientation(o *commonpb.Orientation) spatialmath.Orientation
- func ConvertVectorProtoToR3(v *commonpb.Vector3) r3.Vector
- func ConvertVectorR3ToProto(v r3.Vector) *commonpb.Vector3
- func InterfaceToMap(data interface{}) (map[string]interface{}, error)
- func ResourceNameFromProto(name *commonpb.ResourceName) resource.Name
- func ResourceNameToProto(name resource.Name) *commonpb.ResourceName
- func StructToStructPb(i interface{}) (*structpb.Struct, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertOrientationToProto ¶ added in v0.0.6
func ConvertOrientationToProto(o spatialmath.Orientation) *commonpb.Orientation
ConvertOrientationToProto
func ConvertProtoToOrientation ¶ added in v0.0.6
func ConvertProtoToOrientation(o *commonpb.Orientation) spatialmath.Orientation
ConvertProtoToOrientation
func ConvertVectorProtoToR3 ¶ added in v0.0.6
ConvertVectorProtoToR3
func ConvertVectorR3ToProto ¶ added in v0.0.6
ConvertVectorR3ToProto
func InterfaceToMap ¶
InterfaceToMap attempts to coerce an interface into a form acceptable by structpb.NewStruct. Expects a struct or a map-like object.
func ResourceNameFromProto ¶
func ResourceNameFromProto(name *commonpb.ResourceName) resource.Name
ResourceNameFromProto converts a proto ResourceName to its rdk counterpart.
func ResourceNameToProto ¶
func ResourceNameToProto(name resource.Name) *commonpb.ResourceName
ResourceNameToProto converts a resource.Name to its proto counterpart.
func StructToStructPb ¶
StructToStructPb converts an arbitrary Go struct to a *structpb.Struct. Only exported fields are included in the returned proto.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.