Пример #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.)")
	}
}
Пример #2
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)
}
Пример #3
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)
}
Пример #4
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)
}
Пример #5
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`)
}
Пример #6
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)
}
Пример #7
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)
}
Пример #8
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)
}
Пример #9
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.")
}
Пример #10
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")
}
Пример #11
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")
}
Пример #12
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")
}