goparser

package
v0.0.0-...-9998f82 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

func New

func New() *Generator

func (*Generator) AddDir

func (g *Generator) AddDir(dir string, allStructs bool) error

func (*Generator) AddImport

func (g *Generator) AddImport(imports ...string)

func (*Generator) SetAPIDomain

func (g *Generator) SetAPIDomain(d, s string)

func (*Generator) SetAPIVersion

func (g *Generator) SetAPIVersion(v string)

func (*Generator) SetGoPackage

func (g *Generator) SetGoPackage(p string)

func (*Generator) SetImportPrefix

func (g *Generator) SetImportPrefix(v string)

func (*Generator) SetKubeprotoPackage

func (g *Generator) SetKubeprotoPackage(v string)

func (*Generator) SetProtoPackage

func (g *Generator) SetProtoPackage(p string)

func (*Generator) WriteFile

func (g *Generator) WriteFile(outputFilePath string) error

type ProtobufField

type ProtobufField struct {
	Name            string
	GoName          string
	APIFieldName    string
	Kind            string
	SubResource     bool
	IsMap           bool
	InvalidProtobuf bool
	MapKeyKind      string
	MapValueKind    string
	Index           int
	Repeated        bool
	Optional        bool
	Inline          bool
	ExternalPackage string
	Doc             string
}

type ProtobufFile

type ProtobufFile struct {
	Package   string
	GoPackage string
	Domain    string
	SubGroup  string
	Version   string

	Messages []*ProtobufMessage
}

type ProtobufMessage

type ProtobufMessage struct {
	Name        string
	Fields      []*ProtobufField
	UseFieldsOf string
	Option      *ProtobufMessageOption
}

func (*ProtobufMessage) IsRuntimeObject

func (m *ProtobufMessage) IsRuntimeObject() bool

type ProtobufMessageOption

type ProtobufMessageOption struct {
	ClusterScope bool
}

Jump to

Keyboard shortcuts

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