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 ¶
This section is empty.
Functions ¶
Types ¶
type Generator ¶
type Generator struct { API *design.APIDefinition // The API definition OutDir string // Destination directory Timeout time.Duration // Timeout used by JavaScript client when making requests Scheme string // Scheme used by JavaScript client Host string // Host addressed by JavaScript client NoExample bool // Do not generate an HTML example file // contains filtered or unexported fields }
Generator is the application code generator.
Click to show internal directories.
Click to hide internal directories.