Documentation ¶
Overview ¶
Package client provides the interface through which Inertia communicates with a serverside daemon
Index ¶
- 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(version string) error
- func (c *Client) DisableTotp() (*http.Response, error)
- func (c *Client) Down() (*http.Response, error)
- func (c *Client) EnableTotp(username, password string) (*http.Response, error)
- func (c *Client) ListEnv() (*http.Response, error)
- func (c *Client) ListUsers() (*http.Response, error)
- func (c *Client) LogIn(user, password, totp string) (*http.Response, error)
- func (c *Client) Logs(container string, entries int) (*http.Response, error)
- func (c *Client) LogsWebSocket(container string, entries int) (SocketReader, error)
- func (c *Client) Prune() (*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) SetSSLVerification(verify bool)
- func (c *Client) Status() (*http.Response, error)
- func (c *Client) Token() (*http.Response, error)
- func (c *Client) UninstallInertia() error
- func (c *Client) Up(gitRemoteURL, buildType string, stream bool, dontKillOnDeath ...bool) (*http.Response, error)
- func (c *Client) UpdateEnv(name, value string, encrypt, remove bool) (*http.Response, error)
- type SSHRunner
- func (r *SSHRunner) CopyFile(file io.Reader, remotePath string, permissions string) error
- func (r *SSHRunner) Run(cmd string) (cmdout *bytes.Buffer, cmderr *bytes.Buffer, err error)
- func (r *SSHRunner) RunSession(commands ...string) error
- func (r *SSHRunner) RunStream(cmd string, interactive bool) error
- type SSHSession
- type SocketReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.4.0
type Client struct { *cfg.RemoteVPS SSH SSHSession // contains filtered or unexported fields }
Client manages a deployment
func NewClient ¶ added in v0.4.0
func NewClient(remoteName, keyPassphrase string, config *cfg.Config, out ...io.Writer) (*Client, bool)
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) DisableTotp ¶ added in v0.5.0
DisableTotp disables Totp for a given user
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) EnableTotp ¶ added in v0.5.0
EnableTotp enables Totp for a given user
func (*Client) ListEnv ¶ added in v0.4.0
ListEnv lists environment variables currently set on remote
func (*Client) LogIn ¶ added in v0.5.0
LogIn gets an access token for the user with the given credentials. Use "" for totp if none is required.
func (*Client) LogsWebSocket ¶ added in v0.4.0
func (c *Client) LogsWebSocket(container string, entries int) (SocketReader, error)
LogsWebSocket opens a websocket connection to given container's logs
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.
func (*Client) SetSSLVerification ¶ added in v0.4.0
SetSSLVerification toggles whether client should verify all SSL communications. This requires a signed certificate to be in use on your daemon.
func (*Client) Status ¶ added in v0.4.0
Status lists the currently active containers on the remote VPS instance
func (*Client) UninstallInertia ¶ added in v0.5.0
UninstallInertia removes the inertia/ directory on the remote instance
type SSHRunner ¶
type SSHRunner struct {
// contains filtered or unexported fields
}
SSHRunner runs commands over SSH and captures results.
func NewSSHRunner ¶
NewSSHRunner returns a new SSHRunner
func (*SSHRunner) RunSession ¶ added in v0.1.1
RunSession sets up a SSH shell to the remote