reposdb

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 3 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 InsertRepoParams

type InsertRepoParams struct {
	ID          string
	DisplayName string
	Owner       string
	Name        string
	Path        string
	Remote      string
	AddedBy     string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteRepo

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

func (*Queries) GetRepo

func (q *Queries) GetRepo(ctx context.Context, id string) (Repo, error)

func (*Queries) InsertRepo

func (q *Queries) InsertRepo(ctx context.Context, arg InsertRepoParams) (Repo, error)

func (*Queries) ListRepos

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

func (*Queries) WithTx

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

type Repo

type Repo struct {
	ID          string
	DisplayName string
	Owner       string
	Name        string
	Path        string
	Remote      string
	CreatedAt   time.Time
	UpdatedAt   time.Time
	AddedBy     string
}

Jump to

Keyboard shortcuts

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