Exemple #1
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flags().BoolVar(&Force, "force", false, "overwrite existing files")
	r.Flags().StringVar(&AppName, "name", "API", "application name")
	if r.Flags().Lookup("pkg") == nil {
		// Special case because the bootstrap command calls RegisterFlags on genapp which
		// already registers that flag.
		r.Flags().StringVar(&TargetPackage, "pkg", "app", "Name of generated Go package containing controllers supporting code (contexts, media types, user types etc.)")
	}
}
Exemple #2
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flags().DurationVar(&Timeout, "timeout", time.Duration(20)*time.Second, `the duration before the request times out.`)
	r.Flags().StringVar(&Scheme, "scheme", "http", `the URL scheme used to make requests to the API, defaults to the scheme defined in the API design if any.`)
	r.Flags().StringVar(&Host, "host", "", `the API hostname, defaults to the hostname defined in the API design if any`)
}
Exemple #3
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flags().StringVar(&GenPkgPath, "pkg-path", "", "Go package path to generator package. The package must implement the Generate global function.")
	r.Flags().StringVar(&GenPkgName, "pkg-name", "", "Go package name of generator package. Defaults to name of inner most directory in package path.")
}
Exemple #4
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flags().StringSliceVar(&Signers, "signer", nil, `Adds support for the given request signer, e.g. "--signer goa.BasicSigner --signer goa.JWTSigner"`)
	r.Flags().StringSliceVar(&SignerPackages, "signerPkg", nil, `Adds the given Go package path to the import directive in files using signers`)
	r.Flags().StringVar(&Version, "cli-version", "1.0", "Generated client version")
}
Exemple #5
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flags().StringVar(&TargetPackage, "pkg", "app", "Name of generated Go package containing controllers supporting code (contexts, media types, user types etc.)")
}
Exemple #6
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flags().StringVar(&TargetPackage, "pkg", "genmodels", "Name of generated Go package containing models")
	r.Flags().StringVar(&AppPackage, "app", "app", "Name of goa generated Go package containing controllers, etc.")
}
Exemple #7
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flags().StringVarP(&ServiceURL, "url", "u", "http://localhost", "API base URL used to build JSON schema ID, e.g. https://www.myapi.com")
}
Exemple #8
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flags().StringVar(&Version, "cli-version", "1.0", "Generated client version")
}
Exemple #9
0
// RegisterFlags registers the command line flags with the given registry.
func (c *Command) RegisterFlags(r codegen.FlagRegistry) {
	r.Flags().StringVar(&TargetPackage, "pkg", "app", "Name of generated Go package containing controllers supporting code (contexts, media types, user types etc.)")
	r.Flags().BoolVar(&NoGenTest, "notest", false, "Prevent generation of test helpers")
}