Documentation ¶
Index ¶
- Constants
- Variables
- func NewUi(raw cli.Ui) ui.Ui
- type BuildCommand
- type CompileCommand
- type DeployCommand
- type DevCommand
- type FlagSetFlags
- type HelpCommand
- type InfraCommand
- type Meta
- func (m *Meta) Appfile() (*appfile.Compiled, error)
- func (m *Meta) Core(f *appfile.Compiled) (*otto.Core, error)
- func (m *Meta) DataDir() (string, error)
- func (m *Meta) Directory(config *otto.CoreConfig) (directory.Backend, error)
- func (m *Meta) FlagSet(n string, fs FlagSetFlags) *flag.FlagSet
- func (m *Meta) OttoUi() ui.Ui
- func (m *Meta) RootDir(startDir string) (string, error)
- type StatusCommand
- type VersionCheckFunc
- type VersionCheckInfo
- type VersionCommand
Constants ¶
const ( // DefaultAppfile is the default filename for the Appfile DefaultAppfile = "Appfile" // DefaultLocalDataDir is the default path to the local data // directory. DefaultLocalDataDir = "~/.otto.d" DefaultLocalDataDetectorDir = "detect" // DefaultOutputDir is the default filename for the output directory DefaultOutputDir = ".otto" DefaultOutputDirCompiledAppfile = "appfile" DefaultOutputDirCompiledData = "compiled" DefaultOutputDirLocalData = "data" // DefaultDataDir is the default directory for the directory // data if a directory in the Appfile isn't specified. DefaultDataDir = "otto-data" )
Variables ¶
var ( // AltAppfiles is the list of alternative names for an Appfile that Otto can // detect and load automatically AltAppfiles = []string{"appfile.hcl"} )
Functions ¶
Types ¶
type BuildCommand ¶
type BuildCommand struct {
Meta
}
BuildCommand is the command that builds a deployable artifact for this version of the app.
func (*BuildCommand) Help ¶
func (c *BuildCommand) Help() string
func (*BuildCommand) Run ¶
func (c *BuildCommand) Run(args []string) int
func (*BuildCommand) Synopsis ¶
func (c *BuildCommand) Synopsis() string
type CompileCommand ¶
CompileCommand is the command that is responsible for "compiling" the Appfile into a set of data that is used by the other commands for execution.
func (*CompileCommand) Help ¶
func (c *CompileCommand) Help() string
func (*CompileCommand) Run ¶
func (c *CompileCommand) Run(args []string) int
func (*CompileCommand) Synopsis ¶
func (c *CompileCommand) Synopsis() string
type DeployCommand ¶
type DeployCommand struct {
Meta
}
DeployCommand is the command that deploys the app once it is built.
func (*DeployCommand) Help ¶
func (c *DeployCommand) Help() string
func (*DeployCommand) Run ¶
func (c *DeployCommand) Run(args []string) int
func (*DeployCommand) Synopsis ¶
func (c *DeployCommand) Synopsis() string
type DevCommand ¶
type DevCommand struct {
Meta
}
DevCommand is the command that manages (starts, stops, etc.) the development environment for an Appfile.
func (*DevCommand) Help ¶
func (c *DevCommand) Help() string
func (*DevCommand) Run ¶
func (c *DevCommand) Run(args []string) int
func (*DevCommand) Synopsis ¶
func (c *DevCommand) Synopsis() string
type FlagSetFlags ¶
type FlagSetFlags uint
FlagSetFlags is an enum to define what flags are present in the default FlagSet returned by Meta.FlagSet
const (
FlagSetNone FlagSetFlags = 0
)
type HelpCommand ¶ added in v0.1.2
type HelpCommand struct {
Meta
}
HelpCommand is not a real command. It just shows help output for people expecting `otto help` to work.
func (*HelpCommand) Help ¶ added in v0.1.2
func (c *HelpCommand) Help() string
func (*HelpCommand) Run ¶ added in v0.1.2
func (c *HelpCommand) Run(args []string) int
func (*HelpCommand) Synopsis ¶ added in v0.1.2
func (c *HelpCommand) Synopsis() string
type InfraCommand ¶
type InfraCommand struct {
Meta
}
InfraCommand is the command that sets up the infrastructure for an Appfile.
func (*InfraCommand) Help ¶
func (c *InfraCommand) Help() string
func (*InfraCommand) Run ¶
func (c *InfraCommand) Run(args []string) int
func (*InfraCommand) Synopsis ¶
func (c *InfraCommand) Synopsis() string
type Meta ¶
type Meta struct { CoreConfig *otto.CoreConfig Ui cli.Ui }
Meta are the meta-options that are available on all or most commands.
func (*Meta) Appfile ¶
Appfile loads the compiled Appfile. If the Appfile isn't compiled yet, then an error will be returned.
func (*Meta) Core ¶
Core returns the core for the given Appfile. The file where the Appfile was loaded from should be set in appfile.File.Path. This root appfile path will be used as the default output directory for Otto.
func (*Meta) Directory ¶
Directory returns the Otto directory backend for the given Appfile. If no directory backend is specified, a local folder will be used.
type StatusCommand ¶
type StatusCommand struct {
Meta
}
StatusCommand is the command that shows the status of the various stages of this application.
func (*StatusCommand) Help ¶
func (c *StatusCommand) Help() string
func (*StatusCommand) Run ¶
func (c *StatusCommand) Run(args []string) int
func (*StatusCommand) Synopsis ¶
func (c *StatusCommand) Synopsis() string
type VersionCheckFunc ¶
type VersionCheckFunc func() (VersionCheckInfo, error)
VersionCheckFunc is the callback called by the Version command to check if there is a new version of Otto.
type VersionCheckInfo ¶
VersionCheckInfo is the return value for the VersionCheckFunc callback and tells the Version command information about the latest version of Otto.
type VersionCommand ¶
type VersionCommand struct { Meta Revision string Version string VersionPrerelease string CheckFunc VersionCheckFunc }
VersionCommand is a Command implementation prints the version.
func (*VersionCommand) Help ¶
func (c *VersionCommand) Help() string
func (*VersionCommand) Run ¶
func (c *VersionCommand) Run(args []string) int
func (*VersionCommand) Synopsis ¶
func (c *VersionCommand) Synopsis() string