Documentation
¶
Index ¶
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type Client
- func (c *Client) AddUser(username, password string, admin bool) (*http.Response, error)
- func (c *Client) BootstrapRemote(repoName string) error
- func (c *Client) DaemonDown() error
- func (c *Client) DaemonUp(daemonVersion, host, daemonPort string) error
- func (c *Client) Down() (*http.Response, error)
- func (c *Client) ListUsers() (*http.Response, error)
- func (c *Client) Logs(stream bool, container string) (*http.Response, error)
- func (c *Client) RemoveUser(username string) (*http.Response, error)
- func (c *Client) Reset() (*http.Response, error)
- func (c *Client) ResetUsers() (*http.Response, error)
- func (c *Client) Status() (*http.Response, error)
- func (c *Client) Up(gitRemoteURL, buildType string, stream bool) (*http.Response, error)
- type Config
- type DaemonConfig
- type RemoteVPS
- type SSHRunner
- type SSHSession
Constants ¶
This section is empty.
Variables ¶
var (
// NoInertiaRemote is used to warn about missing inertia remote
NoInertiaRemote = "No inertia remote"
)
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type Client ¶ added in v0.4.0
type Client struct { *RemoteVPS // contains filtered or unexported fields }
Client manages a deployment
func NewClient ¶ added in v0.4.0
NewClient sets up a client to communicate to the daemon at the given named remote.
func (*Client) BootstrapRemote ¶ added in v0.4.0
BootstrapRemote configures a remote vps for continuous deployment by installing docker, starting the daemon and building a public-private key-pair. It outputs configuration information for the user.
func (*Client) DaemonDown ¶ added in v0.4.0
DaemonDown brings the daemon down on the remote instance
func (*Client) Down ¶ added in v0.4.0
Down brings the project down on the remote VPS instance specified in the configuration object.
func (*Client) RemoveUser ¶ added in v0.4.0
RemoveUser prevents a user from accessing Inertia Web
func (*Client) Reset ¶ added in v0.4.0
Reset shuts down deployment and deletes the contents of the deployment's project directory
func (*Client) ResetUsers ¶ added in v0.4.0
ResetUsers resets all users on the remote.
type Config ¶
type Config struct { Version string `toml:"version"` Project string `toml:"project-name"` BuildType string `toml:"build-type"` Remotes []*RemoteVPS `toml:"remote"` }
Config represents the current projects configuration.
func (*Config) RemoveRemote ¶
RemoveRemote removes remote with given name
type DaemonConfig ¶
type DaemonConfig struct { Port string `toml:"port"` Token string `toml:"token"` Secret string `toml:"secret"` }
DaemonConfig contains parameters for the Daemon
type RemoteVPS ¶
type RemoteVPS struct { Name string `toml:"name"` IP string `toml:"IP"` User string `toml:"user"` PEM string `toml:"pemfile"` Branch string `toml:"branch"` SSHPort string `toml:"ssh_port"` Daemon *DaemonConfig `toml:"daemon"` }
RemoteVPS contains parameters for the VPS
func (*RemoteVPS) GetIPAndPort ¶
GetIPAndPort creates the IP:Port string.