Documentation ¶
Index ¶
- Constants
- func NewUi(raw cli.Ui) ui.Ui
- type BuildCommand
- type CompileCommand
- type DeployCommand
- type DevCommand
- type FlagSetFlags
- 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() (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 ¶
This section is empty.
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 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