fly_client

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppListItem

type AppListItem struct {
	Name string `json:"name"`
	Org  string `json:"org"`
}

type ExistsSecretCmd

type ExistsSecretCmd struct {
	AppName    string
	SecretName string
}

type FlyClient

type FlyClient interface {
	CreateOrgToken(
		ctx context.Context,
		orgSlug string,
	) (string, error)

	ExistsSecret(
		ctx context.Context,
		cmd ExistsSecretCmd,
	) (bool, error)

	StoreSecret(
		ctx context.Context,
		cmd StoreSecretCmd,
	) error

	ExistsApp(
		ctx context.Context,
		name string,
	) (bool, error)

	GetDeployedAppConfig(
		ctx context.Context,
		name string,
	) (model.AppConfig, error)

	GetAppVolumes(
		ctx context.Context,
		name string,
	) ([]model.VolumeState, error)

	CreateNewApp(
		ctx context.Context,
		cfg model.AppConfig,
		tempDir util_work_dir.WorkDir,
		twoStep bool,
	) error

	DeployExistingApp(
		ctx context.Context,
		cfg model.AppConfig,
		tempDir util_work_dir.WorkDir,
		deployCfg model.DeployConfig,
		region string,
	) error

	CreateVolume(
		ctx context.Context,
		app string,
		cfg model.VolumeConfig,
		region string,
	) (model.VolumeState, error)

	GetAppScale(
		ctx context.Context,
		app string,
	) ([]model.ScaleState, error)

	ExtendVolume(
		ctx context.Context,
		appName string,
		volumeId string,
		gb int,
	) error

	ScaleApp(
		ctx context.Context,
		app string,
		region string,
		count int,
	) error

	SaveSecrets(
		ctx context.Context,
		app string,
		secrets []Secret,
		stage bool,
	) error

	ListApps(
		ctx context.Context,
	) ([]AppListItem, error)
}

func NewFlyClient

func NewFlyClient() FlyClient

type FlyClientImpl

type FlyClientImpl struct{}

func (FlyClientImpl) CreateNewApp

func (c FlyClientImpl) CreateNewApp(
	ctx context.Context,
	cfg model.AppConfig,
	tempDir util_work_dir.WorkDir,
	twoStep bool,
) error

func (FlyClientImpl) CreateOrgToken

func (c FlyClientImpl) CreateOrgToken(ctx context.Context, orgSlug string) (string, error)

func (FlyClientImpl) CreateVolume

func (c FlyClientImpl) CreateVolume(
	ctx context.Context,
	app string,
	cfg model.VolumeConfig,
	region string,
) (model.VolumeState, error)

func (FlyClientImpl) DeployExistingApp

func (c FlyClientImpl) DeployExistingApp(
	ctx context.Context,
	cfg model.AppConfig,
	tempDir util_work_dir.WorkDir,
	deployCfg model.DeployConfig,
	region string,
) error

func (FlyClientImpl) ExistsApp

func (c FlyClientImpl) ExistsApp(ctx context.Context, name string) (bool, error)

func (FlyClientImpl) ExistsSecret

func (c FlyClientImpl) ExistsSecret(ctx context.Context, cmd ExistsSecretCmd) (bool, error)

func (FlyClientImpl) ExtendVolume

func (c FlyClientImpl) ExtendVolume(
	ctx context.Context,
	appName string,
	volumeId string,
	gb int,
) error

func (FlyClientImpl) GetAppScale

func (c FlyClientImpl) GetAppScale(
	ctx context.Context,
	app string,
) ([]model.ScaleState, error)

func (FlyClientImpl) GetAppVolumes

func (c FlyClientImpl) GetAppVolumes(
	ctx context.Context,
	name string,
) ([]model.VolumeState, error)

func (FlyClientImpl) GetDeployedAppConfig

func (c FlyClientImpl) GetDeployedAppConfig(ctx context.Context, name string) (model.AppConfig, error)

func (FlyClientImpl) ListApps

func (c FlyClientImpl) ListApps(ctx context.Context) ([]AppListItem, error)

func (FlyClientImpl) SaveSecrets

func (c FlyClientImpl) SaveSecrets(
	ctx context.Context,
	app string,
	secrets []Secret,
	stage bool,
) error

func (FlyClientImpl) ScaleApp

func (c FlyClientImpl) ScaleApp(
	ctx context.Context,
	app string,
	region string,
	count int,
) error

func (FlyClientImpl) StoreSecret

func (c FlyClientImpl) StoreSecret(ctx context.Context, cmd StoreSecretCmd) error

type Secret

type Secret struct {
	Name  string
	Value string
}

type StoreSecretCmd

type StoreSecretCmd struct {
	AppName     string
	SecretName  string
	SecretValue string
}

Jump to

Keyboard shortcuts

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