oficina / base Public

Clone
git clone https://amadan.net/oficina/base

Plain git — no account needed to clone.

Download

Download this file

1// Package platform talks to the CARLOS Platform account Base runs on.
2package platform
3
4import "context"
5
6// Client is the part of Platform's CLI API that Base uses.
7type Client interface {
8 // SetEnv sets plain environment variables in an app's config environment.
9 SetEnv(ctx context.Context, app, environment string, vars map[string]string) error
10 // CreateInstance creates an instance of app at host, bound to the config
11 // environment. An instance of app already at host and bound to the same
12 // environment (Platform's 409, then a matching record) counts as
13 // success; any other conflict is an error.
14 CreateInstance(ctx context.Context, app, host, environment string) error
15 // DeleteInstance retires the instance's route. Its data is kept.
16 DeleteInstance(ctx context.Context, app, host string) error
17}
18