database

package
v0.0.0-...-6ff77cb Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(databaseSource string)

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 Queries

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

func GetQueries

func GetQueries() *Queries

func New

func New(db DBTX) *Queries

func (*Queries) DeleteRepo

func (q *Queries) DeleteRepo(ctx context.Context, id int64) error

-- name: CreateAuthor :one INSERT INTO authors (

name, bio

) VALUES (

?, ?

) RETURNING *; -- name: UpdateAuthor :exec UPDATE authors set name = ?, bio = ? WHERE id = ?;

func (*Queries) GetRepo

func (q *Queries) GetRepo(ctx context.Context, id int64) (Repository, error)

func (*Queries) ListRepos

func (q *Queries) ListRepos(ctx context.Context) ([]Repository, error)

func (*Queries) UpdateRepoContainerId

func (q *Queries) UpdateRepoContainerId(ctx context.Context, arg UpdateRepoContainerIdParams) error

func (*Queries) WithTx

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

type Repository

type Repository struct {
	ID             int64
	Name           string
	Url            string
	ContainerRepo  sql.NullString
	ContainerTag   sql.NullString
	ContainerID    sql.NullString
	ComposeFile    sql.NullString
	ComposeService sql.NullString
}

type UpdateRepoContainerIdParams

type UpdateRepoContainerIdParams struct {
	ContainerID sql.NullString
	ID          int64
}

Jump to

Keyboard shortcuts

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