sqlitedb

package
v0.0.0-...-b1f9b26 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddGraphEncryptKeyParams

type AddGraphEncryptKeyParams struct {
	ID                  string
	GraphID             string
	EncryptedPrivateKey string
	PublicKey           string
}

type AddGraphSaltParams

type AddGraphSaltParams struct {
	ID        string
	GraphID   string
	Value     []byte
	ExpiresAt time.Time
}

type BatchFileMetasParams

type BatchFileMetasParams struct {
	GraphID string
	FileIds []string
}

type CreateGraphParams

type CreateGraphParams struct {
	ID   string
	Name string
}

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 FileMeta

type FileMeta struct {
	ID             string
	GraphID        string
	FileID         string
	BlobPath       string
	Checksum       []byte
	Size           int64
	LastModifiedAt time.Time
	LastModifiedTx int64
}

type Graph

type Graph struct {
	ID        string
	Name      string
	CurrentTx int64
}

type GraphEncryptKey

type GraphEncryptKey struct {
	ID                  string
	GraphID             string
	EncryptedPrivateKey string
	PublicKey           string
}

type GraphSalt

type GraphSalt struct {
	ID        string
	GraphID   string
	Value     []byte
	ExpiresAt time.Time
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddGraphEncryptKey

func (q *Queries) AddGraphEncryptKey(ctx context.Context, arg AddGraphEncryptKeyParams) error

func (*Queries) AddGraphSalt

func (q *Queries) AddGraphSalt(ctx context.Context, arg AddGraphSaltParams) error

func (*Queries) AllFileMeta

func (q *Queries) AllFileMeta(ctx context.Context, graphID string) ([]FileMeta, error)

func (*Queries) BatchFileMetas

func (q *Queries) BatchFileMetas(ctx context.Context, arg BatchFileMetasParams) ([]FileMeta, error)

func (*Queries) CreateGraph

func (q *Queries) CreateGraph(ctx context.Context, arg CreateGraphParams) (int64, error)

func (*Queries) DeleteGraph

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

func (*Queries) Graph

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

func (*Queries) GraphEncryptKeys

func (q *Queries) GraphEncryptKeys(ctx context.Context, graphID string) ([]GraphEncryptKey, error)

func (*Queries) GraphSalts

func (q *Queries) GraphSalts(ctx context.Context, graphID string) ([]GraphSalt, error)

func (*Queries) Graphs

func (q *Queries) Graphs(ctx context.Context) ([]Graph, error)

func (*Queries) IncrementTx

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

func (*Queries) SetFileMeta

func (q *Queries) SetFileMeta(ctx context.Context, arg SetFileMetaParams) error

func (*Queries) SetTx

func (q *Queries) SetTx(ctx context.Context, arg SetTxParams) error

func (*Queries) WithTx

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

type SetFileMetaParams

type SetFileMetaParams struct {
	ID             string
	GraphID        string
	FileID         string
	BlobPath       string
	Checksum       []byte
	Size           int64
	LastModifiedTx int64
}

type SetTxParams

type SetTxParams struct {
	CurrentTx int64
	ID        string
}

Jump to

Keyboard shortcuts

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