Versions in this module Expand all Collapse all v0 v0.5.0 Jul 29, 2022 v0.4.0 Jan 17, 2022 Changes in this version + const BOOL + const F64 + const I16 + const I32 + const I64 + const I8 + const STRING + const U16 + const U32 + const U64 + const U8 + var BaseTypeSizes = map[string]int + var BaseTypesGo = map[string]string + var Logger = logrus.New() + var Plugins = map[string]*Plugin + func GenerateDefault(gen *Generator) + func ListImportedTypes(apifiles []*vppapi.File, file *vppapi.File) []string + func RegisterPlugin(name string, genfn func(*Generator, *File) *GenFile) + func RemoveImportedTypes(apifiles []*vppapi.File, apifile *vppapi.File) + func Run(apiDir string, filesToGenerate []string, opts Options, ...) + func RunPlugin(name string, gen *Generator, file *File) error + func SortFileObjectsByName(file *vppapi.File) + func SortFilesByImports(apifiles []*vppapi.File) + type Alias struct + TypeBasic *string + TypeStruct *Struct + TypeUnion *Union + type Enum struct + IsFlag bool + type Field struct + DefaultValue interface{} + FieldSizeFrom *Field + FieldSizeOf *Field + GoName string + Index int + ParentMessage *Message + ParentStruct *Struct + ParentUnion *Union + TypeAlias *Alias + TypeEnum *Enum + TypeStruct *Struct + TypeUnion *Union + type File struct + Aliases []*Alias + Desc vppapi.File + Enums []*Enum + FilenamePrefix string + Generate bool + GoImportPath GoImportPath + Imports []string + Messages []*Message + PackageName GoPackageName + Service *Service + Structs []*Struct + Unions []*Union + Version string + type GenFile struct + func GenerateAPI(gen *Generator, file *File) *GenFile + func GenerateHTTP(gen *Generator, file *File) *GenFile + func GenerateRPC(gen *Generator, file *File) *GenFile + func (g *GenFile) Content() ([]byte, error) + func (g *GenFile) GoIdent(ident GoIdent) string + func (g *GenFile) Import(importPath GoImportPath) + func (g *GenFile) P(v ...interface{}) + func (g *GenFile) Write(p []byte) (n int, err error) + type Generator struct + Files []*File + FilesByName map[string]*File + FilesByPath map[string]*File + func New(opts Options, apiFiles []*vppapi.File, filesToGen []string) (*Generator, error) + func (g *Generator) Generate() error + func (g *Generator) NewGenFile(filename string, importPath GoImportPath) *GenFile + type GoIdent struct + GoImportPath GoImportPath + GoName string + func (id GoIdent) String() string + type GoImportPath string + func (p GoImportPath) Ident(s string) GoIdent + func (p GoImportPath) String() string + type GoPackageName string + type Message struct + CRC string + Fields []*Field + type Options struct + ImportPrefix string + NoSourcePathInfo bool + NoVersionInfo bool + OutputDir string + type Plugin struct + GenerateFile func(*Generator, *File) *GenFile + Name string + type RPC struct + GoName string + MsgReply *Message + MsgRequest *Message + MsgStream *Message + Service *Service + VPP vppapi.RPC + type Service struct + RPCs []*RPC + type Struct struct + Fields []*Field + type Union struct + Fields []*Field