Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidSourceFile is thrown when the source file cannot be resolved ErrInvalidSourceFile = errors.New("source file must be specified") // ErrNoDefinitionsInSourceFile is thrown when the source directory does not contain any valid // ECS definitions. ErrNoDefinitionsInSourceFile = errors.New("source directory does not contain any valid ecs definitions") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SourceFile string // contains filtered or unexported fields }
Config holds the parameters needed for proper generation of Go code.
func NewEmptyConfig ¶
NewEmptyConfig is a constructor for an empty Config object.
func (*Config) Blacklist ¶
func (c *Config) Blacklist() (FilterList, error)
Blacklist is used to generate a FilterList of ECS keys that should not be allowed inside the model and is populated from a given Config object.
func (*Config) CLIFlags ¶
CLIFlags is a helper to automatically set fields within a Config object based on CLI flags using the github.com/urfave/cli framework.
func (*Config) Generators ¶
Generators returns the set of enabled generators for the config.
func (*Config) Whitelist ¶
func (c *Config) Whitelist() (FilterList, error)
Whitelist is used to generate a Whitelist from a given Config object.
type FilterList ¶
FilterList is a type alias that is used to evaluate possible
func (FilterList) Empty ¶
func (w FilterList) Empty() bool
Empty is a convienience function that is used to check if a FilterList is populated.
func (FilterList) Match ¶
func (w FilterList) Match(val string) bool
Match is used to check an arbitrary string against a filter list.