litedb

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 2 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 GasAuthApiKey

type GasAuthApiKey struct {
	ID        string
	Subject   string
	Name      string
	KeyHash   string
	KeyPrefix string
	Scopes    string
	Metadata  string
	LastUsed  *string
	ExpiresAt *string
	CreatedAt string
	DeletedAt *string
}

type InsertKeyParams

type InsertKeyParams struct {
	ID        string
	Subject   string
	Name      string
	KeyHash   string
	KeyPrefix string
	Scopes    string
	Metadata  string
	ExpiresAt *string
	CreatedAt string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetKeyByHash

func (q *Queries) GetKeyByHash(ctx context.Context, keyHash string) (*GasAuthApiKey, error)

func (*Queries) HardDeleteKeyByID

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

func (*Queries) HardDeleteKeysBySubject

func (q *Queries) HardDeleteKeysBySubject(ctx context.Context, subject string) error

func (*Queries) InsertKey

func (q *Queries) InsertKey(ctx context.Context, arg *InsertKeyParams) error

func (*Queries) ListAllKeysBySubject

func (q *Queries) ListAllKeysBySubject(ctx context.Context, subject string) ([]*GasAuthApiKey, error)

func (*Queries) ListKeysBySubject

func (q *Queries) ListKeysBySubject(ctx context.Context, subject string) ([]*GasAuthApiKey, error)

func (*Queries) SoftDeleteKeyByID

func (q *Queries) SoftDeleteKeyByID(ctx context.Context, arg *SoftDeleteKeyByIDParams) error

func (*Queries) SoftDeleteKeysBySubject

func (q *Queries) SoftDeleteKeysBySubject(ctx context.Context, arg *SoftDeleteKeysBySubjectParams) error

func (*Queries) UpdateLastUsed

func (q *Queries) UpdateLastUsed(ctx context.Context, arg *UpdateLastUsedParams) error

func (*Queries) WithTx

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

type SoftDeleteKeyByIDParams

type SoftDeleteKeyByIDParams struct {
	DeletedAt *string
	ID        string
}

type SoftDeleteKeysBySubjectParams

type SoftDeleteKeysBySubjectParams struct {
	DeletedAt *string
	Subject   string
}

type UpdateLastUsedParams

type UpdateLastUsedParams struct {
	LastUsed *string
	ID       string
}

Jump to

Keyboard shortcuts

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