Documentation
¶
Overview ¶
Package vppapi parses VPP API files without any additional processing.
Index ¶
- Constants
- func FindFiles(dir string, deep int) (files []string, err error)
- func GetVPPVersionInstalled() (string, error)
- func GetVPPVersionRepo(repoDir string) (string, error)
- func ResolveVPPVersion(apidir string) string
- type AliasType
- type EnumEntry
- type EnumType
- type Field
- type File
- type Message
- type RPC
- type Service
- type StructType
- type UnionType
Constants ¶
View Source
const ( VPPVersionEnvVar = "VPP_VERSION" VPPDirEnvVar = "VPP_DIR" )
View Source
const ( // DefaultDir is default location of API files. DefaultDir = "/usr/share/vpp/api" // APIFileExtension is a VPP API file extension suffix APIFileExtension = ".api.json" )
Variables ¶
This section is empty.
Functions ¶
func FindFiles ¶
FindFiles finds API files located in dir or in a nested directory that is not nested deeper than deep.
func GetVPPVersionInstalled ¶
GetVPPVersionInstalled retrieves VPP version of installed package using dpkg-query.
func GetVPPVersionRepo ¶
GetVPPVersionRepo retrieves VPP version using script in repo directory.
func ResolveVPPVersion ¶
ResolveVPPVersion resolves version of the VPP for target directory.
Version resolved here can be overriden by setting VPP_VERSION env var.
Types ¶
type File ¶
type File struct { Name string Path string CRC string Options map[string]string `json:",omitempty"` Imports []string `json:",omitempty"` AliasTypes []AliasType `json:",omitempty"` EnumTypes []EnumType `json:",omitempty"` EnumflagTypes []EnumType `json:",omitempty"` StructTypes []StructType `json:",omitempty"` UnionTypes []UnionType `json:",omitempty"` Messages []Message `json:",omitempty"` Service *Service `json:",omitempty"` }
func ParseDir ¶
ParseDir finds and parses API files in given directory and returns parsed files. Supports API files in JSON format (.api.json) only.
type StructType ¶
Click to show internal directories.
Click to hide internal directories.