Documentation ¶
Overview ¶
Package cmd provides subcommands for the vervet CLI.
Index ¶
- Variables
- func Compile(ctx *cli.Context) error
- func Lint(ctx *cli.Context) error
- func Localize(ctx *cli.Context) error
- func Resolve(ctx *cli.Context) error
- func ScaffoldInit(ctx *cli.Context) error
- func VersionFiles(ctx *cli.Context) error
- func VersionList(ctx *cli.Context) error
- func VersionNew(ctx *cli.Context) error
- type Prompt
- type VervetApp
- type VervetParams
- type VervetPrompt
Constants ¶
This section is empty.
Variables ¶
var Vervet = NewApp(VervetParams{ Stdin: os.Stdin, Stdout: os.Stdout, Stderr: os.Stderr, Prompt: Prompt{}, })
Vervet is the vervet application with the CLI application.
Functions ¶
func Compile ¶
func Compile(ctx *cli.Context) error
Compile compiles versioned resources into versioned API specs.
func Lint ¶
func Lint(ctx *cli.Context) error
Lint checks versioned resources against linting rules.
func Localize ¶
func Localize(ctx *cli.Context) error
Localize references and validate a single OpenAPI spec file
func Resolve ¶
func Resolve(ctx *cli.Context) error
Resolve aggregates, renders and validates resource specs at a particular version.
func ScaffoldInit ¶
func ScaffoldInit(ctx *cli.Context) error
ScaffoldInit creates a new project configuration from a provided scaffold directory.
func VersionFiles ¶
func VersionFiles(ctx *cli.Context) error
VersionFiles is a command that lists all versioned OpenAPI spec files of matching resources. It takes optional arguments to filter the output: api resource
func VersionList ¶
func VersionList(ctx *cli.Context) error
VersionList is a command that lists all the versions of matching resources. It takes optional arguments to filter the output: api resource
Types ¶
type Prompt ¶ added in v1.1.0
type Prompt struct{}
Prompt is the default interactive prompt for vervet.
type VervetApp ¶ added in v1.1.0
type VervetApp struct { App *cli.App Params VervetParams }
VervetApp contains the cli Application.
func NewApp ¶ added in v1.1.0
func NewApp(vp VervetParams) *VervetApp
NewApp returns a new VervetApp with the provided params.
type VervetParams ¶ added in v1.1.0
type VervetParams struct { Stdin io.ReadCloser Stdout io.WriteCloser Stderr io.WriteCloser Prompt VervetPrompt }
VervetParams contains configuration parameters for the Vervet CLI application.
type VervetPrompt ¶ added in v1.1.0
type VervetPrompt interface { Confirm(label string) (bool, error) // Confirm y/n an action Entry(label string) (string, error) // Gather a freeform entry in response to a question Select(label string, items []string) (string, error) // Select from a limited number of entries }
VervetPrompt defines the interface for interactive prompts in vervet.