Documentation
¶
Overview ¶
Package saiast contains information parsed from AST of the SAI header.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TrimSAIName ¶
TrimSAIName trims sai_ prefix and _t from the string
Types ¶
type FuncMetadata ¶
type FuncMetadata struct {
// Name is the name of the function: create_acl_table
Name string
// Operation is the action to take: create
Operation string
// TypeName is the name of the type: acl_table
TypeName string
// Entry is the name of the entry using the instead of id.
Entry string
// IsSwitchScoped is whether the API take a switch id as a parameter.
IsSwitchScoped bool
}
FuncMetadata contains additional information derived from a func definition.
type SAIAPI ¶
type SAIAPI struct {
Ifaces []*SAIInterface
Funcs map[string]*SAIFunc
}
SAIAPI contains the information retreived from the AST.
func (*SAIAPI) GetFuncMeta ¶
func (sai *SAIAPI) GetFuncMeta(fn *TypeDecl) *FuncMetadata
GetFuncMeta returns the metadata for a SAI func.
type SAIInterface ¶
SAIInterface contains the functions contained in the interface.
Click to show internal directories.
Click to hide internal directories.