converter

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFrom

func ConvertFrom(rd io.Reader) (*plugin.CodeGeneratorResponse, error)

ConvertFrom converts input from protoc to a CodeGeneratorRequest and starts conversion Returning a CodeGeneratorResponse containing either an error or the results of converting the given proto

Types

type Comments

type Comments map[string]string

Comments is a map between path in FileDescriptorProto and leading/trailing comments for each field.

func ParseComments

func ParseComments(fd *descriptor.FileDescriptorProto) Comments

ParseComments reads FileDescriptorProto and parses comments into a map.

func (Comments) Get

func (c Comments) Get(path string) string

Get returns comment for path or empty string if path has no comment.

type Field

type Field struct {
	Name                   string      `json:"name"`
	Type                   string      `json:"type"`
	Mode                   string      `json:"mode"`
	Description            string      `json:"description,omitempty"`
	Fields                 []*Field    `json:"fields,omitempty"`
	PolicyTags             *PolicyTags `json:"policyTags,omitempty"`
	DefaultValueExpression string      `json:"defaultValueExpression,omitempty"`
}

Field describes the schema of a field in BigQuery.

type PolicyTags

type PolicyTags struct {
	Names []string `json:"names,omitempty"`
}

PolicyTags describes the structure of a Policy Tag

type ProtoPackage

type ProtoPackage struct {
	// contains filtered or unexported fields
}

ProtoPackage describes a package of Protobuf, which is an container of message types.

Jump to

Keyboard shortcuts

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