Documentation ¶
Overview ¶
Package gen generates codes for egbuilder.
Index ¶
Constants ¶
View Source
const ( KindName = "Kind" SpecName = "Spec" )
Variables ¶
This section is empty.
Functions ¶
func CreateController ¶
func CreateFilter ¶
func CreateRegistry ¶
func CreateServer ¶
Types ¶
type Config ¶
type Config struct { Repo string `json:"repo"` Controllers []string `json:"controllers"` Filters []string `json:"filters"` }
Config is the configuration for generate files.
func (*Config) CheckDuplicate ¶
CheckDuplicate checks if the config has duplicate controllers or filters.
func (*Config) GenControllers ¶
func (*Config) GenFilters ¶
func (*Config) GenRegistry ¶
type ControllerInfo ¶
ControllerInfo is the information of a controller. Name: "TestFilter", used for struct name LowerName: "testfilter", used for file name, pkg name VarKind: "TestFilterKind", used for registry ResultFail: "resultTestFilterFail", used for result Most of these fields are used as identifier.
func NewControllerInfo ¶
func NewControllerInfo(name string) *ControllerInfo
NewInfo creates a new Info.
type FilterInfo ¶
FilterInfo is the information of a filter.
Click to show internal directories.
Click to hide internal directories.