Exemple #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)
}
Exemple #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)
}
Exemple #3
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)
}
Exemple #4
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)
}
Exemple #5
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)
}
Exemple #6
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)
}