kubernetes/staging/src/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go

type genProtoIDL

func (g *genProtoIDL) PackageVars(c *generator.Context) []string {}

func (g *genProtoIDL) Filename() string {}

func (g *genProtoIDL) FileType() string {}

func (g *genProtoIDL) Namers(c *generator.Context) namer.NameSystems {}

// Filter ignores types that are identified as not exportable.
func (g *genProtoIDL) Filter(c *generator.Context, t *types.Type) bool {}

func isProtoable(seen map[*types.Type]bool, t *types.Type) bool {}

// isOptionalAlias should return true if the specified type has an underlying type
// (is an alias) of a map or slice and has the comment tag protobuf.nullable=true,
// indicating that the type should be nullable in protobuf.
func isOptionalAlias(t *types.Type) bool {}

func (g *genProtoIDL) Imports(c *generator.Context) (imports []string) {}

// GenerateType makes the body of a file implementing a set for type t.
func (g *genProtoIDL) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error {}

type ProtobufFromGoNamer

type ProtobufLocator

type protobufLocator

// CastTypeName returns the cast type name of a Go type
// TODO: delegate to a new localgo namer?
func (p protobufLocator) CastTypeName(name types.Name) string {}

func (p protobufLocator) GoTypeForName(name types.Name) *types.Type {}

// ProtoTypeFor locates a Protobuf type for the provided Go type (if possible).
func (p protobufLocator) ProtoTypeFor(t *types.Type) (*types.Type, error) {}

type bodyGen

func (b bodyGen) unknown() error {}

func (b bodyGen) doAlias(sw *generator.SnippetWriter) error {}

func (b bodyGen) doStruct(sw *generator.SnippetWriter) error {}

type protoField

var errUnrecognizedType

func isFundamentalProtoType(t *types.Type) (*types.Type, bool) {}

func memberTypeToProtobufField(locator ProtobufLocator, field *protoField, t *types.Type) error {}

// protobufTagToField extracts information from an existing protobuf tag
func protobufTagToField(tag string, field *protoField, m types.Member, t *types.Type, localPackage types.Name) error {}

func membersToFields(locator ProtobufLocator, t *types.Type, localPackage types.Name, omitFieldTypes map[types.Name]struct{}

func genComment(out io.Writer, lines []string, indent string) {}

func formatProtoFile(source []byte) ([]byte, error) {}

func assembleProtoFile(w io.Writer, f *generator.File) {}

func NewProtoFile() *generator.DefaultFileType {}