instances

package
v0.1.39 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstanceStore

type InstanceStore struct {
	// contains filtered or unexported fields
}

func NewInstanceStore

func NewInstanceStore(db *sqlx.DB) *InstanceStore

func (*InstanceStore) Create

func (s *InstanceStore) Create(name string, port int, version, password, containerID string, cpuCores, ramMB int, parameterGroup, image string) (*RDBMSInstance, error)

func (*InstanceStore) Delete

func (s *InstanceStore) Delete(name string) error

func (*InstanceStore) Get

func (s *InstanceStore) Get(name string) (*RDBMSInstance, error)

func (*InstanceStore) GetDecryptedPassword

func (s *InstanceStore) GetDecryptedPassword(name string, masterKey []byte) (string, error)

GetDecryptedPassword returns the decrypted password for an instance

func (*InstanceStore) IsNameInUse

func (s *InstanceStore) IsNameInUse(name string) (bool, error)

func (*InstanceStore) IsPortInUse

func (s *InstanceStore) IsPortInUse(port int) (bool, string, error)

func (*InstanceStore) List

func (s *InstanceStore) List() ([]RDBMSInstance, error)

func (*InstanceStore) UpdateContainerID

func (s *InstanceStore) UpdateContainerID(name, containerID string) error

func (*InstanceStore) UpdateImage

func (s *InstanceStore) UpdateImage(name, image, version string) error

func (*InstanceStore) UpdateParameterGroup

func (s *InstanceStore) UpdateParameterGroup(name, parameterGroup string) error

func (*InstanceStore) UpdatePassword

func (s *InstanceStore) UpdatePassword(name, encryptedPassword string) error

func (*InstanceStore) UpdateStatus

func (s *InstanceStore) UpdateStatus(name, status string) error

type RDBMSInstance

type RDBMSInstance struct {
	ID             int              `db:"id" json:"id,omitempty"`
	Name           string           `db:"name" json:"name"`
	Port           int              `db:"port" json:"port"`
	Version        string           `db:"version" json:"version"`
	Status         string           `db:"status" json:"status"`
	ContainerID    string           `db:"container_id" json:"containerId,omitempty"`
	Password       string           `db:"password" json:"password,omitempty"`
	CPUCores       int              `db:"cpu_cores" json:"cpuCores"`
	RAMMB          int              `db:"ram_mb" json:"ramMb"`
	ParameterGroup string           `db:"parameter_group" json:"parameterGroup"`
	Image          string           `db:"image" json:"image"`
	CreatedAt      rfc3339time.Time `db:"created_at" json:"createdAt"`
	UpdatedAt      rfc3339time.Time `db:"updated_at" json:"updatedAt,omitzero"`
}

Jump to

Keyboard shortcuts

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