inmem

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUserRepo

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

func NewAuthUserRepository

func NewAuthUserRepository() *AuthUserRepo

func (*AuthUserRepo) Close

func (aur *AuthUserRepo) Close() error

func (*AuthUserRepo) Create

func (aur *AuthUserRepo) Create(ctx context.Context, u jelly.AuthUser) (jelly.AuthUser, error)

func (*AuthUserRepo) Delete

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

func (*AuthUserRepo) Get

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

func (*AuthUserRepo) GetAll

func (aur *AuthUserRepo) GetAll(ctx context.Context) ([]jelly.AuthUser, error)

func (*AuthUserRepo) GetByUsername

func (aur *AuthUserRepo) GetByUsername(ctx context.Context, username string) (jelly.AuthUser, error)

func (*AuthUserRepo) Update

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

type AuthUserStore

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

AuthUserStore is an in-memory database that is compatible with built-in jelly user authentication mechanisms. It implements jeldao.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() *AuthUserStore

func (*AuthUserStore) AuthUsers

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

func (*AuthUserStore) Close

func (aus *AuthUserStore) Close() error

Jump to

Keyboard shortcuts

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