Documentation
¶
Overview ¶
Package cli implements command line commands.
Index ¶
Constants ¶
const ( // CLIOwner is the owner of the CLI's Github repository. CLIOwner = "stratumn" // CLIRepo is the name of the CLI's Github repository. CLIRepo = "go" // CLIAssetFormat is the format of the CLI GIthub asset. CLIAssetFormat = "strat-%s-%s.zip" // CLIAssetBinary is the file name of the binary within the CLI asset. CLIAssetBinary = "strat/strat" // CLIAssetBinaryWin is the file name of the binary within the CLI asset // on Windows. CLIAssetBinaryWin = "strat/strat.exe" // CLIOldBinary is the name of the old binary after an update. CLIOldBinary = ".strat.old" // CLISigExt the extension of the signature of the binary. CLISigExt = ".sig" // DefaultGeneratorsOwner is the default owner of the generators' Github // repository. DefaultGeneratorsOwner = "stratumn" // DefaultGeneratorsRepo is the default name of the generators' Github // repository. DefaultGeneratorsRepo = "generators" // DefaultGeneratorsRef is the default reference of the generators' // Github repository. DefaultGeneratorsRef = "master" // StratumnConfigEnv is the name of the environment variable to override // the default configuration path. StratumnConfigEnv = "STRATUMN_CONFIG" // DefaultStratumnDir is the name of the Stratumn directory within the // home folder. DefaultStratumnDir = ".stratumn" // GeneratorsDir is the name of the generators directory within the // configuration directory. GeneratorsDir = "generators" // VarsFile is the name of the variable file within the configuration directory. VarsFile = "variables.json" // ProjectFile is the name of the project file within the project // directory. ProjectFile = "stratumn.json" // InitScript is the name of the project init script. InitScript = "init" // UpScript is the name of the project up script. UpScript = "up" // DownScript is the name of the project down script. DownScript = "down" // BuildScript is the name of the project build script. BuildScript = "build" // TestScript is the name of the project test script. TestScript = "test" // PullScript is the name of the project pull script. PullScript = "pull" // PushScript is the name of the project push script. PushScript = "push" // DeployScriptFmt is the format of the name of the project deploy // script for an environment. DeployScriptFmt = "deploy:%s" // DownTestScript is the name of the project down script for test. DownTestScript = "down:test" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { }
Build is a project command that builds the project.
func (*Build) Execute ¶
func (cmd *Build) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Deploy ¶
type Deploy struct { }
Deploy is a project command that deploys a project to an environment.
func (*Deploy) Execute ¶
func (cmd *Deploy) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Down ¶
type Down struct { }
Down is a project command that stops the services.
func (*Down) Execute ¶
func (cmd *Down) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Generate ¶
type Generate struct {
// contains filtered or unexported fields
}
Generate is a generator command that generates a project.
func (*Generate) Execute ¶
func (cmd *Generate) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Generators ¶
type Generators struct {
// contains filtered or unexported fields
}
Generators is a generator command that lists generators.
func (*Generators) Execute ¶
func (cmd *Generators) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
func (*Generators) Name ¶
func (*Generators) Name() string
Name implements github.com/google/subcommands.Command.Name().
func (*Generators) SetFlags ¶
func (cmd *Generators) SetFlags(f *flag.FlagSet)
SetFlags implements github.com/google/subcommands.Command.SetFlags().
func (*Generators) Synopsis ¶
func (*Generators) Synopsis() string
Synopsis implements github.com/google/subcommands.Command.Synopsis().
func (*Generators) Usage ¶
func (*Generators) Usage() string
Usage implements github.com/google/subcommands.Command.Usage().
type Info ¶
Info is a CLI command that prints info about the program.
func (*Info) Execute ¶
func (cmd *Info) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Project ¶
Project describes a project.
func NewProjectFromFile ¶
NewProjectFromFile instantiates a project from a project file.
type Pull ¶
type Pull struct { }
Pull is a project command that pulls updates.
func (*Pull) Execute ¶
func (cmd *Pull) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Push ¶
type Push struct { }
Push is a project command that pushes updates.
func (*Push) Execute ¶
func (cmd *Push) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Run ¶
type Run struct { }
Run is a project command that runs script by name.
func (*Run) Execute ¶
func (cmd *Run) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Test ¶
type Test struct { }
Test is a project command that runs tests.
func (*Test) Execute ¶
func (cmd *Test) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Up ¶
type Up struct { }
Up is a project command that starts the services.
func (*Up) Execute ¶
func (cmd *Up) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Update ¶
type Update struct { Version string // contains filtered or unexported fields }
Update is a CLI command that updates the CLI or generators.
func (*Update) Execute ¶
func (cmd *Update) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().
type Version ¶
Version is a CLI command that prints the version.
func (*Version) Execute ¶
func (cmd *Version) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus
Execute implements github.com/google/subcommands.Command.Execute().