storage

package
v0.1.0-beta.11 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sql.DB
}

func New

func New() (*DB, error)

func (*DB) GetDeployment

func (db *DB) GetDeployment(deploymentID string) (Deployment, error)

func (*DB) GetDeploymentHistory

func (db *DB) GetDeploymentHistory(appName string, limit int) ([]Deployment, error)

func (*DB) Migrate

func (db *DB) Migrate() error

func (*DB) PruneOldDeployments

func (db *DB) PruneOldDeployments(appName string, deploymentsToKeep int) error

func (*DB) SaveDeployment

func (db *DB) SaveDeployment(deployment Deployment) error

type Deployment

type Deployment struct {
	ID             string          `db:"id" json:"id"`
	AppName        string          `db:"app_name" json:"appName"`
	RawAppConfig   json.RawMessage `db:"raw_app_config" json:"rawAppConfig"`
	DeployedImage  json.RawMessage `db:"deployed_image" json:"deployedImage"`
	RolledBackFrom *string         `db:"rolled_back_from" json:"rolledBackFrom,omitempty"`
}

func (*Deployment) GetDeployedImage

func (d *Deployment) GetDeployedImage() (config.Image, error)

GetDeployedImage parses and returns the deployed image configuration

func (*Deployment) GetImageRef

func (d *Deployment) GetImageRef() (string, error)

Jump to

Keyboard shortcuts

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