db

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sql.DB
	// contains filtered or unexported fields
}

func Open

func Open(ctx context.Context, path string) (*DB, error)

func (*DB) Init

func (d *DB) Init(
	appVersion string, serverTLSCert, serverTLSKey []byte, serverTLSSAN string,
	logger *slog.Logger,
) (localUser *models.User, err error)

Init creates the database schema and initial records.

func (*DB) NewContext

func (d *DB) NewContext() context.Context

NewContext returns a new child context of the main database context.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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