Versions in this module Expand all Collapse all v0 v0.8.0 Sep 20, 2024 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() + func CleanMessageComment(comment string) string + func GenerateDefault(gen *Generator) error + func GeneratePlugins(genPlugins []string) func(*Generator) error + func ListImportedFiles(files []vppapi.File, file *vppapi.File) []vppapi.File + func ListImportedTypes(apifiles []vppapi.File, file *vppapi.File) []string + func RegisterPlugin(name string, genfn GenerateFileFn) + func RemoveImportedTypes(apifiles []vppapi.File, apifile *vppapi.File) + func ResolveImportPath(dir string) (string, error) + func Run(vppInput *vppapi.VppInput, opts Options, f func(*Generator) error) + func RunPlugin(name string, gen *Generator, file *File) error + func SortFileObjectsByName(file *vppapi.File) + func SortFilesByImports(apifiles []vppapi.File) + func SortFilesByName(apifiles []vppapi.File) + func StripMessageCommentFields(comment string, fields ...string) string + func WriteContentToFile(outputFile string, content []byte) error + 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 + func (f *File) IsStable() bool + 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) GetFile() *File + 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 GenerateAllFn = func(*Generator) []*GenFile + type GenerateFileFn = func(*Generator, *File) *GenFile + type Generator struct + Files []*File + FilesByName map[string]*File + FilesByPath map[string]*File + func New(opts Options, input *vppapi.VppInput) (*Generator, error) + func (g *Generator) Generate() error + func (g *Generator) GetMessageByName(name string) *Message + func (g *Generator) GetOpts() Options + func (g *Generator) NewGenFile(filename string, file *File) *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 + Comment string + Fields []*Field + File *File + type Options struct + GenerateFiles []string + ImportPrefix string + NoSourcePathInfo bool + NoVersionInfo bool + OutputDir string + type Plugin struct + External bool + GenerateAll GenerateAllFn + GenerateFile GenerateFileFn + 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