Documentation ¶
Overview ¶
Package genjs provides a goa generator for a javascript client module. The module exposes functions for calling the API actions. It relies on the axios (https://github.com/mzabriskie/axios) javascript library to perform the actual HTTP requests.
The generator also produces an example controller and index HTML that shows how to use the module. The controller simply serves all the files under the "js" directory so that loading "/js" in a browser triggers the example code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Timeout is the request timeout before it gets aborted. Timeout time.Duration // Scheme is the URL scheme used to make requests to the API. Scheme string // Host is the API hostname. Host string )
Functions ¶
Types ¶
type Command ¶
type Command struct {
*codegen.BaseCommand
}
Command is the goa application code generator command line data structure. It implements meta.Command.
func (*Command) RegisterFlags ¶
func (c *Command) RegisterFlags(r codegen.FlagRegistry)
RegisterFlags registers the command line flags with the given registry.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator is the application code generator.
func NewGenerator ¶
NewGenerator returns the application code generator.