api

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2021 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	HttpClient *http.Client
	WsDialer   *websocket.Dialer
	// contains filtered or unexported fields
}

API represents a client that can interact with a Cloudfauj Server REST API

func NewClient

func NewClient(serverAddr string) (*API, error)

NewClient returns a new, initialized client to interact with a Cloudfauj Server.

func (*API) AddDomain added in v0.0.2

func (a *API) AddDomain(d *domain.Domain) (<-chan *server.Event, error)

func (*API) CreateEnvironment

func (a *API) CreateEnvironment(env *environment.Environment) (<-chan *server.Event, error)

func (*API) DeleteDomain added in v0.0.2

func (a *API) DeleteDomain(name string) (<-chan *server.Event, error)

func (*API) Deploy

func (a *API) Deploy(spec *deployment.Spec) (<-chan *server.Event, error)

Deploy requests the server to deploy an application. It streams all the deployment logs.

func (*API) Deployment

func (a *API) Deployment(id string) (*deployment.Deployment, error)

func (*API) DeploymentLogs

func (a *API) DeploymentLogs(id string) ([]string, error)

func (*API) DestroyApp

func (a *API) DestroyApp(app, env string) error

func (*API) DestroyEnvironment

func (a *API) DestroyEnvironment(name string) (<-chan *server.Event, error)

func (*API) ListDeployments

func (a *API) ListDeployments() ([]*deployment.Deployment, error)

func (*API) ListDomains added in v0.0.2

func (a *API) ListDomains() ([]string, error)

func (*API) ListEnvironments

func (a *API) ListEnvironments() ([]string, error)

func (*API) TFApplyDomain added in v0.0.4

func (a *API) TFApplyDomain(name string) (<-chan *server.Event, error)

func (*API) TFApplyEnv added in v0.0.4

func (a *API) TFApplyEnv(name string) (<-chan *server.Event, error)

func (*API) TFPlanDomain added in v0.0.4

func (a *API) TFPlanDomain(name string) (<-chan *server.Event, error)

func (*API) TFPlanEnv added in v0.0.4

func (a *API) TFPlanEnv(name string) (<-chan *server.Event, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL