sqlc

package
v0.3.14-beta Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 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 InsertSessionParams

type InsertSessionParams struct {
	PassphraseWords    string
	PassphraseEntropy  []byte
	LocalStaticPrivKey []byte
	MailboxAddr        string
	CreatedAt          time.Time
	Expiry             sql.NullTime
	DevServer          bool
}

type LncSession

type LncSession struct {
	ID                 int32
	PassphraseWords    string
	PassphraseEntropy  []byte
	RemoteStaticPubKey []byte
	LocalStaticPrivKey []byte
	MailboxAddr        string
	CreatedAt          time.Time
	Expiry             sql.NullTime
	DevServer          bool
}

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)
	GetSession(ctx context.Context, passphraseEntropy []byte) (LncSession, error)
	InsertSecret(ctx context.Context, arg InsertSecretParams) (int32, error)
	InsertSession(ctx context.Context, arg InsertSessionParams) error
	SelectOnionPrivateKey(ctx context.Context) ([]byte, error)
	SetExpiry(ctx context.Context, arg SetExpiryParams) error
	SetRemotePubKey(ctx context.Context, arg SetRemotePubKeyParams) 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) GetSession

func (q *Queries) GetSession(ctx context.Context, passphraseEntropy []byte) (LncSession, error)

func (*Queries) InsertSecret

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

func (*Queries) InsertSession

func (q *Queries) InsertSession(ctx context.Context, arg InsertSessionParams) error

func (*Queries) SelectOnionPrivateKey

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

func (*Queries) SetExpiry

func (q *Queries) SetExpiry(ctx context.Context, arg SetExpiryParams) error

func (*Queries) SetRemotePubKey

func (q *Queries) SetRemotePubKey(ctx context.Context, arg SetRemotePubKeyParams) 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 SetExpiryParams

type SetExpiryParams struct {
	Expiry            sql.NullTime
	PassphraseEntropy []byte
}

type SetRemotePubKeyParams

type SetRemotePubKeyParams struct {
	RemoteStaticPubKey []byte
	PassphraseEntropy  []byte
}

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