protoutils

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 30

Documentation

Overview

Package protoutils are a collection of util methods for using proto

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterfaceToMap

func InterfaceToMap(data interface{}) (map[string]interface{}, error)

InterfaceToMap attempts to coerce an interface into a form acceptable by structpb.NewStruct. Expects a struct or a map-like object.

func StructToStructPb

func StructToStructPb(i interface{}) (*structpb.Struct, error)

StructToStructPb converts an arbitrary Go struct to a *structpb.Struct. Only exported fields are included in the returned proto.

Types

This section is empty.

Jump to

Keyboard shortcuts

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