dockerinstall

package
v0.0.0-...-5a7324f Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvironmentKindDocker = "docker"
)

Variables

View Source
var (
	NameRegex = regexp.MustCompile(`^[a-z][a-z\-0-9]{1,23}$`)

	DefaultEnvironmentName = "local"
	DefaultPostgresImage   = "postgres:16.2"
)

Functions

func GenerateSigningKeyPair

func GenerateSigningKeyPair(publicPath, privatePath string) error

func RenderConfig

func RenderConfig(templateValues ConfigTemplateValues, writer io.Writer) error

Types

type ConfigTemplateValues

type ConfigTemplateValues struct {
	PublicSigningKeyPath  string
	PrivateSigningKeyPath string
	DataPlanePort         int
}

type DataPlaneSigningKeys

type DataPlaneSigningKeys struct {
	Primary   *KeyPair `json:"primary"`
	Secondary *KeyPair `json:"secondary"`
}

type DockerEnvironmentConfig

type DockerEnvironmentConfig struct {
	Kind string `json:"kind"`

	EnvironmentName string `json:"environmentName"`

	DataPlanePort int `json:"dataPlanePort"`

	UserId         string `json:"userId"`
	AllowedGroupId string `json:"allowedGroupId"`

	InstallationPath string `json:"installationPath"`

	PostgresImage      string `json:"postgresImage"`
	ControlPlaneImage  string `json:"controlPlaneImage"`
	DataPlaneImage     string `json:"dataPlaneImage"`
	BufferSidecarImage string `json:"bufferSidecarImage"`
	GatewayImage       string `json:"gatewayImage"`

	UseGateway *bool `json:"useGateway"`

	SigningKeys DataPlaneSigningKeys `json:"signingKeys"`

	InitialDatabaseVersion *int `json:"initialDatabaseVersion"`
}

func (*DockerEnvironmentConfig) GetGroupIdInt

func (c *DockerEnvironmentConfig) GetGroupIdInt() int

func (*DockerEnvironmentConfig) GetUserIdInt

func (c *DockerEnvironmentConfig) GetUserIdInt() int

type Installer

type Installer struct {
	Config *DockerEnvironmentConfig
	// contains filtered or unexported fields
}

func NewInstaller

func NewInstaller(config *DockerEnvironmentConfig) (*Installer, error)

func (*Installer) ApplyMigrations

func (inst *Installer) ApplyMigrations(ctx context.Context, targetVersion int, latest, offline, waitForCompletion bool) error

func (*Installer) GetMigrationLogs

func (inst *Installer) GetMigrationLogs(ctx context.Context, id int, destination io.Writer) error

func (*Installer) InstallTyger

func (inst *Installer) InstallTyger(ctx context.Context) error

func (*Installer) ListDatabaseVersions

func (inst *Installer) ListDatabaseVersions(ctx context.Context, allVersions bool) ([]install.DatabaseVersion, error)

func (*Installer) QuickValidateConfig

func (inst *Installer) QuickValidateConfig() bool

func (*Installer) UninstallTyger

func (inst *Installer) UninstallTyger(ctx context.Context, deleteData bool) error

type KeyPair

type KeyPair struct {
	PublicKey  string `json:"public"`
	PrivateKey string `json:"private"`
}

Jump to

Keyboard shortcuts

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