Пример #1
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flag("signer", `Adds support for the given request signer, e.g. "--signer goa.BasicSigner --signer goa.JWTSigner"`).
		StringsVar(&Signers)
	r.Flag("signerPkg", `Adds the given Go package path to the import directive in files using signers`).
		StringsVar(&SignerPackages)
	r.Flag("cli-version", "Generated client version").Default("1.0").StringVar(&Version)
}
Пример #2
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flag("timeout", `the duration before the request times out.`).Default("20s").
		DurationVar(&Timeout)
	r.Flag("scheme", `the URL scheme used to make requests to the API, defaults to the scheme defined in the API design if any.`).
		EnumVar(&Scheme, "http", "https")
	r.Flag("host", `the API hostname, defaults to the hostname defined in the API design if any`).
		StringVar(&Host)
}
Пример #3
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flag("force", "overwrite existing files").BoolVar(&Force)
	r.Flag("name", "application name").Default("API").StringVar(&AppName)
	r.Flag("pkg", "Name of generated Go package containing controllers supporting code (contexts, media types, user types etc.)").
		Default("app").StringVar(&TargetPackage)
}
Пример #4
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flag("pkg", "Name of generated Go package containing controllers supporting code (contexts, media types, user types etc.)").
		Default("app").StringVar(&TargetPackage)
}
Пример #5
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flag("pkg-path", "Go package path to generator package. The package must implement the Generate global function.").Required().StringVar(&GenPkgPath)
	r.Flag("pkg-name", "Go package name of generator package. Defaults to name of inner most directory in package path.").StringVar(&GenPkgName)
}
Пример #6
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flag("url", "API base URL used to build JSON schema ID, e.g. https://www.myapi.com").
		Short('u').
		Default("http://localhost").
		StringVar(&ServiceURL)
}