package
0.7.0
Repository: https://github.com/ubclaunchpad/inertia.git
Documentation: pkg.go.dev

# README

Client

PkgGoDev

This package contains Inertia's clientside interface to remote Inertia daemons. It can be imported for use if you don't like the CLI - for example:

package main

import (
	"context"

	"github.com/ubclaunchpad/inertia/cfg"
	"github.com/ubclaunchpad/inertia/client"
	"github.com/ubclaunchpad/inertia/client/bootstrap"
)

func main() {
	// set up a client to your remote
	inertia, _ := client.NewClient(
		&cfg.Remote{
			Version: "v0.6.0",
			Name:    "gcloud",
			IP:      "my.host.addr",
			/* ... */
		},
		client.Options{ /* ... */ })

	// bootstrap your remote
	bootstrap.Bootstrap(inertia, bootstrap.Options{ /* ... */ })

	// deploy your project!
	inertia.Up(context.Background(), client.UpRequest{
		Project: "my-project",
		URL:     "[email protected]:me/project.git",
		Profile: cfg.Profile{
			Name:   "default",
			Branch: "master",
			Build: &cfg.Build{
				Type:          cfg.DockerCompose,
				BuildFilePath: "Dockerfile",
			},
		},
	})
}

# Packages

Package bootstrap provides Inertia's remote bootstrapping script, based off of inertia/client.Client.
Package runner provides the Inertia client's low-level SSH command runner.

# Functions

NewClient sets up a client to communicate to the daemon at the given remote.
NewUserClient instantiates a new client for user management functions.

# Variables

ErrNeedTotp is used to indicate that a 2FA-enabled user has not provided a TOTP.
MinDaemonVersion is the minimum inertiad version supported by this library.

# Structs

AuthenticateRequest denotes options for authenticating with the Inertia daemon.
Client manages a deployment.
LogsRequest denotes parameters for log querying.
Options denotes configuration options for a Client.
SSHClient implements Inertia's SSH commands.
UpRequest declares parameters for project deployment.
UserClient is used to access Inertia's /user APIs.

# Interfaces

SocketReader is an interface to a websocket connection.