db

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

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type Deployment

type Deployment struct {
	ID        string `json:"id"`
	HostID    string `json:"host_id"`
	RoleID    string `json:"role_id"`
	Status    string `json:"status"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type Host

type Host struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Hostname   string `json:"hostname"`
	Port       int64  `json:"port"`
	Username   string `json:"username"`
	SshKeyPath string `json:"ssh_key_path"`
	CreatedAt  string `json:"created_at"`
	UpdatedAt  string `json:"updated_at"`
}

type Log

type Log struct {
	ID           string `json:"id"`
	DeploymentID string `json:"deployment_id"`
	Timestamp    string `json:"timestamp"`
	Message      string `json:"message"`
}

type Migrator

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

func NewMigrator

func NewMigrator(db *sql.DB) *Migrator

func (*Migrator) EnsureTable

func (m *Migrator) EnsureTable() error

func (*Migrator) Migrate

func (m *Migrator) Migrate(fsEmbed embed.FS) error

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Role

type Role struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
	RolePath  string `json:"role_path"`
}

Jump to

Keyboard shortcuts

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