sqlc

package
v0.1.21-beta Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 InsertSecretParams

type InsertSecretParams struct {
	Hash      []byte
	Secret    []byte
	CreatedAt time.Time
}

type Onion

type Onion struct {
	PrivateKey []byte
	CreatedAt  time.Time
}

type Querier

type Querier interface {
	DeleteOnionPrivateKey(ctx context.Context) error
	DeleteSecretByHash(ctx context.Context, hash []byte) (int64, error)
	GetSecretByHash(ctx context.Context, hash []byte) ([]byte, error)
	InsertSecret(ctx context.Context, arg InsertSecretParams) (int32, error)
	SelectOnionPrivateKey(ctx context.Context) ([]byte, error)
	UpsertOnion(ctx context.Context, arg UpsertOnionParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteOnionPrivateKey

func (q *Queries) DeleteOnionPrivateKey(ctx context.Context) error

func (*Queries) DeleteSecretByHash

func (q *Queries) DeleteSecretByHash(ctx context.Context, hash []byte) (int64, error)

func (*Queries) GetSecretByHash

func (q *Queries) GetSecretByHash(ctx context.Context, hash []byte) ([]byte, error)

func (*Queries) InsertSecret

func (q *Queries) InsertSecret(ctx context.Context, arg InsertSecretParams) (int32, error)

func (*Queries) SelectOnionPrivateKey

func (q *Queries) SelectOnionPrivateKey(ctx context.Context) ([]byte, error)

func (*Queries) UpsertOnion

func (q *Queries) UpsertOnion(ctx context.Context, arg UpsertOnionParams) error

func (*Queries) WithTx

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

type Secret

type Secret struct {
	ID        int32
	Hash      []byte
	Secret    []byte
	CreatedAt time.Time
}

type UpsertOnionParams

type UpsertOnionParams struct {
	PrivateKey []byte
	CreatedAt  time.Time
}

Jump to

Keyboard shortcuts

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