sqlite

package
v0.0.0-...-8bc3ba8 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 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 ExternalIdentity

type ExternalIdentity struct {
	Uid       string
	PublicKey []byte
}

type Identity

type Identity struct {
	Uid        string
	PrivateKey []byte
	PublicKey  []byte
	Signature  []byte
	AuthToken  string
	Active     int64
}

type Querier

type Querier interface {
	GetExternalIdentityUUIDs(ctx context.Context) ([]string, error)
	GetIdentityUUIDs(ctx context.Context) ([]string, error)
	LoadActiveFlag(ctx context.Context, uid string) (int64, error)
	LoadActiveFlagForUpdate(ctx context.Context, uid string) (int64, error)
	LoadAuthForUpdate(ctx context.Context, uid string) (string, error)
	LoadExternalIdentity(ctx context.Context, uid string) (ExternalIdentity, error)
	LoadIdentity(ctx context.Context, uid string) (Identity, error)
	LoadSignatureForUpdate(ctx context.Context, uid string) ([]byte, error)
	StoreActiveFlag(ctx context.Context, arg StoreActiveFlagParams) error
	StoreAuth(ctx context.Context, arg StoreAuthParams) error
	StoreExternalIdentity(ctx context.Context, arg StoreExternalIdentityParams) error
	StoreIdentity(ctx context.Context, arg StoreIdentityParams) error
	StoreSignature(ctx context.Context, arg StoreSignatureParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetExternalIdentityUUIDs

func (q *Queries) GetExternalIdentityUUIDs(ctx context.Context) ([]string, error)

func (*Queries) GetIdentityUUIDs

func (q *Queries) GetIdentityUUIDs(ctx context.Context) ([]string, error)

func (*Queries) LoadActiveFlag

func (q *Queries) LoadActiveFlag(ctx context.Context, uid string) (int64, error)

func (*Queries) LoadActiveFlagForUpdate

func (q *Queries) LoadActiveFlagForUpdate(ctx context.Context, uid string) (int64, error)

func (*Queries) LoadAuthForUpdate

func (q *Queries) LoadAuthForUpdate(ctx context.Context, uid string) (string, error)

func (*Queries) LoadExternalIdentity

func (q *Queries) LoadExternalIdentity(ctx context.Context, uid string) (ExternalIdentity, error)

func (*Queries) LoadIdentity

func (q *Queries) LoadIdentity(ctx context.Context, uid string) (Identity, error)

func (*Queries) LoadSignatureForUpdate

func (q *Queries) LoadSignatureForUpdate(ctx context.Context, uid string) ([]byte, error)

func (*Queries) StoreActiveFlag

func (q *Queries) StoreActiveFlag(ctx context.Context, arg StoreActiveFlagParams) error

func (*Queries) StoreAuth

func (q *Queries) StoreAuth(ctx context.Context, arg StoreAuthParams) error

func (*Queries) StoreExternalIdentity

func (q *Queries) StoreExternalIdentity(ctx context.Context, arg StoreExternalIdentityParams) error

func (*Queries) StoreIdentity

func (q *Queries) StoreIdentity(ctx context.Context, arg StoreIdentityParams) error

func (*Queries) StoreSignature

func (q *Queries) StoreSignature(ctx context.Context, arg StoreSignatureParams) error

func (*Queries) WithTx

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

type StoreActiveFlagParams

type StoreActiveFlagParams struct {
	Active int64
	Uid    string
}

type StoreAuthParams

type StoreAuthParams struct {
	AuthToken string
	Uid       string
}

type StoreExternalIdentityParams

type StoreExternalIdentityParams struct {
	Uid       string
	PublicKey []byte
}

type StoreIdentityParams

type StoreIdentityParams struct {
	Uid        string
	PrivateKey []byte
	PublicKey  []byte
	Signature  []byte
	AuthToken  string
	Active     int64
}

type StoreSignatureParams

type StoreSignatureParams struct {
	Signature []byte
	Uid       string
}

Jump to

Keyboard shortcuts

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