schema

package
v0.0.0-...-fc5a9bb Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cert

type Cert struct {
	ID        uuid.UUID          `json:"id"`
	Der       []byte             `json:"der"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type CreateCertParams

type CreateCertParams struct {
	ID  uuid.UUID `json:"id"`
	Der []byte    `json:"der"`
}

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 Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateCert

func (q *Queries) CreateCert(ctx context.Context, arg CreateCertParams) (Cert, error)

func (*Queries) FindCertByID

func (q *Queries) FindCertByID(ctx context.Context, id uuid.UUID) (Cert, error)

func (*Queries) WithTx

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

Jump to

Keyboard shortcuts

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