query

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateImageInfoParams

type CreateImageInfoParams struct {
	LoginName    string       `json:"login_name"`
	Name         string       `json:"name"`
	Digest       string       `json:"digest"`
	Created      int64        `json:"created"`
	Size         int64        `json:"size"`
	Labels       pgtype.JSONB `json:"labels"`
	AptPackages  pgtype.JSONB `json:"apt_packages"`
	PypiCommands pgtype.JSONB `json:"pypi_commands"`
	Services     pgtype.JSONB `json:"services"`
}

type CreateKeyParams added in v0.0.19

type CreateKeyParams struct {
	LoginName string `json:"login_name"`
	Name      string `json:"name"`
	PublicKey []byte `json:"public_key"`
}

type CreateKeyRow added in v0.0.19

type CreateKeyRow struct {
	LoginName string `json:"login_name"`
	Name      string `json:"name"`
	PublicKey []byte `json:"public_key"`
}

type CreateUserParams

type CreateUserParams struct {
	LoginName    string `json:"login_name"`
	PasswordHash string `json:"password_hash"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type GetImageInfoByDigestParams added in v0.0.18

type GetImageInfoByDigestParams struct {
	LoginName string `json:"login_name"`
	Digest    string `json:"digest"`
}

type GetImageInfoByNameParams added in v0.0.18

type GetImageInfoByNameParams struct {
	LoginName string `json:"login_name"`
	Name      string `json:"name"`
}

type GetKeyParams added in v0.0.19

type GetKeyParams struct {
	LoginName string `json:"login_name"`
	Name      string `json:"name"`
}

type ImageInfo

type ImageInfo struct {
	ID           int64        `json:"id"`
	Name         string       `json:"name"`
	Digest       string       `json:"digest"`
	Created      int64        `json:"created"`
	Size         int64        `json:"size"`
	Labels       pgtype.JSONB `json:"labels"`
	LoginName    string       `json:"login_name"`
	AptPackages  pgtype.JSONB `json:"apt_packages"`
	PypiCommands pgtype.JSONB `json:"pypi_commands"`
	Services     pgtype.JSONB `json:"services"`
}

type Key added in v0.0.19

type Key struct {
	ID        int64  `json:"id"`
	Name      string `json:"name"`
	LoginName string `json:"login_name"`
	PublicKey []byte `json:"public_key"`
}

type Querier added in v0.0.10

type Querier interface {
	CreateImageInfo(ctx context.Context, arg CreateImageInfoParams) (ImageInfo, error)
	CreateKey(ctx context.Context, arg CreateKeyParams) (CreateKeyRow, error)
	CreateUser(ctx context.Context, arg CreateUserParams) (string, error)
	DeleteUser(ctx context.Context, id int64) error
	GetImageInfoByDigest(ctx context.Context, arg GetImageInfoByDigestParams) (ImageInfo, error)
	GetImageInfoByName(ctx context.Context, arg GetImageInfoByNameParams) (ImageInfo, error)
	GetKey(ctx context.Context, arg GetKeyParams) (Key, error)
	GetUser(ctx context.Context, loginName string) (User, error)
	ListImageByOwner(ctx context.Context, loginName string) ([]ImageInfo, error)
	ListKeys(ctx context.Context, loginName string) ([]Key, error)
	ListUsers(ctx context.Context) ([]User, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateImageInfo

func (q *Queries) CreateImageInfo(ctx context.Context, arg CreateImageInfoParams) (ImageInfo, error)

func (*Queries) CreateKey added in v0.0.19

func (q *Queries) CreateKey(ctx context.Context, arg CreateKeyParams) (CreateKeyRow, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (string, error)

func (*Queries) DeleteUser added in v0.0.10

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

func (*Queries) GetImageInfoByDigest added in v0.0.18

func (q *Queries) GetImageInfoByDigest(ctx context.Context, arg GetImageInfoByDigestParams) (ImageInfo, error)

func (*Queries) GetImageInfoByName added in v0.0.18

func (q *Queries) GetImageInfoByName(ctx context.Context, arg GetImageInfoByNameParams) (ImageInfo, error)

func (*Queries) GetKey added in v0.0.19

func (q *Queries) GetKey(ctx context.Context, arg GetKeyParams) (Key, error)

func (*Queries) GetUser

func (q *Queries) GetUser(ctx context.Context, loginName string) (User, error)

func (*Queries) ListImageByOwner

func (q *Queries) ListImageByOwner(ctx context.Context, loginName string) ([]ImageInfo, error)

func (*Queries) ListKeys added in v0.0.19

func (q *Queries) ListKeys(ctx context.Context, loginName string) ([]Key, error)

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context) ([]User, error)

func (*Queries) WithTx

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

type User

type User struct {
	ID           int64  `json:"id"`
	LoginName    string `json:"login_name"`
	PasswordHash string `json:"password_hash"`
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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