Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Debug bool Dryrun bool VersionFlagSet bool // ConfigFilePath is `.` if not set through the `-configFile` flag ConfigFilePath string // ProcWorkingDir is set through calling os.Getwd() ProcWorkingDir string ExePath string )
TODO: move these flags into the config and embed the config into the renderer/engine where needed in order to expose them.
var SemVer string
Functions ¶
This section is empty.
Types ¶
type Data ¶ added in v0.0.7
type Data struct { Template // left public due to it's need to be unmarshalled by Data.Load() TemplatesDir string `yaml:"templatesDir"` // OpenAPIFile represents the path to the yaml OpenAPI 3 file to render OpenAPIFile string OutputPath string // contains filtered or unexported fields }
Data represents the config data used in the day-to-day running of can
TODO this may be vague in definition for the sake of its legibility in use
func (*Data) GetOpenAPIFilepath ¶ added in v0.0.7
GetOpenAPIFilepath uses the current working directory, resolved config file and the openAPI file that was specified in the config file to determine the absolute path to an OpenAPI file. It takes into account that any of these, except the working directory could be relative. It returns the absolute value on every call by caching the result of it's first run and returning that on successive calls
func (*Data) GetOutputDir ¶ added in v0.0.7
GetOutputDir is used by the render engine to determine where rendered files will be written to
func (*Data) GetTemplateFilesDir ¶ added in v0.0.8
type Template ¶ added in v0.0.7
type Template struct { Name string ModuleName string Strategy string // BasePackageName represents the BasePackageName string // contains filtered or unexported fields }
Template's fields are dependant on there being a defined templated name in the CLI arguments or config file.