Documentation ¶
Index ¶
- func FindFieldByName(descriptor *descriptor.DescriptorProto, name string) *descriptor.FieldDescriptorProto
- func GetBuffer() *proto.Buffer
- func GetFileDescSet(path string) (*descriptor.FileDescriptorSet, error)
- func PutBuffer(b *proto.Buffer)
- func ToFloat(v interface{}) (float64, bool)
- func ToInt64(v interface{}) (int64, bool)
- type Encoder
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFieldByName ¶
func FindFieldByName(descriptor *descriptor.DescriptorProto, name string) *descriptor.FieldDescriptorProto
FindFieldByName finds a field descriptor by its name.
func GetFileDescSet ¶
func GetFileDescSet(path string) (*descriptor.FileDescriptorSet, error)
GetFileDescSet reads proto filedescriptor set from a given file.
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder transforms yaml that represents protobuf data into []byte
func NewEncoder ¶
func NewEncoder(fds *descriptor.FileDescriptorSet) *Encoder
NewEncoder creates an Encoder
type Resolver ¶
type Resolver interface { ResolveMessage(name string) *descriptor.DescriptorProto ResolveEnum(name string) *descriptor.EnumDescriptorProto // Resolve service contained in the proto ResolveService(namePrefix string) (svc *descriptor.ServiceDescriptorProto, pkg string) }
Resolver type is used for finding and resolving references inside proto descriptors.
func NewResolver ¶
func NewResolver(fds *descriptor.FileDescriptorSet) Resolver
NewResolver creates a new resolver
Click to show internal directories.
Click to hide internal directories.