sqlite

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUserStore

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

AuthUserStore is a SQLite database that is compatible with built-in jelly user authentication mechanisms. It implements jeldb.AuthUserStore and it can be easily integrated into custom structs by embedding it.

Its zero-value should not be used; call NewAuthUserStore to get an AuthUserStore ready for use.

func NewAuthUserStore

func NewAuthUserStore(storageDir string) (*AuthUserStore, error)

func (*AuthUserStore) AuthUsers

func (aus *AuthUserStore) AuthUsers() jelly.AuthUserRepo

func (*AuthUserStore) Close

func (aus *AuthUserStore) Close() error

type AuthUsersDB

type AuthUsersDB struct {
	DB *sql.DB
}

func (*AuthUsersDB) Close

func (repo *AuthUsersDB) Close() error

func (*AuthUsersDB) Create

func (repo *AuthUsersDB) Create(ctx context.Context, u jelly.AuthUser) (jelly.AuthUser, error)

func (*AuthUsersDB) Delete

func (repo *AuthUsersDB) Delete(ctx context.Context, id uuid.UUID) (jelly.AuthUser, error)

func (*AuthUsersDB) Get

func (repo *AuthUsersDB) Get(ctx context.Context, id uuid.UUID) (jelly.AuthUser, error)

func (*AuthUsersDB) GetAll

func (repo *AuthUsersDB) GetAll(ctx context.Context) ([]jelly.AuthUser, error)

func (*AuthUsersDB) GetByUsername

func (repo *AuthUsersDB) GetByUsername(ctx context.Context, username string) (jelly.AuthUser, error)

func (*AuthUsersDB) Update

func (repo *AuthUsersDB) Update(ctx context.Context, id uuid.UUID, u jelly.AuthUser) (jelly.AuthUser, error)

Jump to

Keyboard shortcuts

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