Documentation ¶
Overview ¶
nolint
Index ¶
- func Command(descriptor protoreflect.Descriptor) string
- func FullMethod(c protoreflect.MethodDescriptor) string
- func MakeJSONTemplate(md protoreflect.MessageDescriptor) (map[string]interface{}, string)
- func MakeTemplate(md protoreflect.MessageDescriptor, path []protoreflect.MessageDescriptor) proto.Message
- func MethodsFromServiceDescriptor(c protoreflect.ServiceDescriptor) []protoreflect.MethodDescriptor
- func ServicesFromFileDescriptor(c protoreflect.FileDescriptor) []protoreflect.ServiceDescriptor
- func ToInterfaceMap(v interface{}) (map[string]interface{}, error)
- type DataMap
- type DataValue
- type List
- func (l *List) Append(v protoreflect.Value)
- func (l *List) AppendMutable() protoreflect.Value
- func (l *List) Get(i int) protoreflect.Value
- func (l *List) IsValid() bool
- func (l *List) Len() int
- func (l *List) NewElement() protoreflect.Value
- func (l *List) Set(i int, val protoreflect.Value)
- func (l *List) Truncate(i int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Command ¶
func Command(descriptor protoreflect.Descriptor) string
func FullMethod ¶
func FullMethod(c protoreflect.MethodDescriptor) string
func MakeJSONTemplate ¶
func MakeJSONTemplate(md protoreflect.MessageDescriptor) (map[string]interface{}, string)
Adapted from https://github.com/fullstorydev/grpcurl/blob/de25c898228e36e8539862ed08de69598e64cb76/grpcurl.go#L400
func MakeTemplate ¶
func MakeTemplate(md protoreflect.MessageDescriptor, path []protoreflect.MessageDescriptor) proto.Message
func MethodsFromServiceDescriptor ¶
func MethodsFromServiceDescriptor(c protoreflect.ServiceDescriptor) []protoreflect.MethodDescriptor
func ServicesFromFileDescriptor ¶
func ServicesFromFileDescriptor(c protoreflect.FileDescriptor) []protoreflect.ServiceDescriptor
func ToInterfaceMap ¶
Types ¶
type DataMap ¶
func (DataMap) ToInterfaceMap ¶
type DataValue ¶
type DataValue struct { Kind protoreflect.Kind `json:"-"` Proto bool `json:"-"` Value interface{} `json:"value"` Empty bool `json:"-"` }
type List ¶
type List struct {
// contains filtered or unexported fields
}
func (*List) Append ¶
func (l *List) Append(v protoreflect.Value)
Append appends the provided value to the end of the list. When appending a composite type, it is unspecified whether the appended value aliases the source's memory in any way.
Append is a mutating operation and unsafe for concurrent use.
func (*List) AppendMutable ¶
func (l *List) AppendMutable() protoreflect.Value
AppendMutable appends a new, empty, mutable message value to the end of the list and returns it. It panics if the list does not contain a message type.
func (*List) Get ¶
func (l *List) Get(i int) protoreflect.Value
Get retrieves the value at the given index. It never returns an invalid value.
func (*List) IsValid ¶
IsValid reports whether the list is valid.
An invalid list is an empty, read-only value.
Validity is not part of the protobuf data model, and may not be preserved in marshaling or other operations.
func (*List) Len ¶
Len reports the number of entries in the List. Get, Set, and Truncate panic with out of bound indexes.
func (*List) NewElement ¶
func (l *List) NewElement() protoreflect.Value
NewElement returns a new value for a list element. For enums, this returns the first enum value. For other scalars, this returns the zero value. For messages, this returns a new, empty, mutable value.