storage

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var US = "\x1f"

Functions

This section is empty.

Types

type DbJwt

type DbJwt interface {
	NewUserId() (string, error)
	InsertFamily(userId, family string, value bool) error
	SelectFamily(userId, family string) bool
	InvalidateUser(userId string) error
}

type DbPassword

type DbPassword interface {
	DbTotp
	DbJwt
	InsertUser(username string, password string) error
	InsertSubject(username string, subject string) error
	SelectSubjectByUsername(username string) (string, error)
	SelectPasswordByUsername(username string) (string, error)
}

type DbTotp

type DbTotp interface {
	InsertSecret(userId, secret string) error
	SelectSecret(userId string) (string, error)
}

type VK

type VK struct {
	Client valkey.Client
}

func NewValkey

func NewValkey(addr string, valkeyPrefix string) (*VK, error)

func (*VK) InsertFamily

func (vk *VK) InsertFamily(userId, family string, value bool) error

func (*VK) InsertSecret

func (vk *VK) InsertSecret(subject, secret string) error

func (*VK) InsertSubject

func (vk *VK) InsertSubject(username string, subject string) error

func (*VK) InsertUser

func (vk *VK) InsertUser(username string, password string) error

func (*VK) InvalidateUser

func (vk *VK) InvalidateUser(userId string) error

func (*VK) NewUserId

func (vk *VK) NewUserId() (string, error)

Taken from github.com/google/uuid/version4.go

func (*VK) SelectFamily

func (vk *VK) SelectFamily(userId, family string) bool

func (*VK) SelectPasswordByUsername

func (vk *VK) SelectPasswordByUsername(username string) (string, error)

func (*VK) SelectSecret

func (vk *VK) SelectSecret(subject string) (string, error)

func (*VK) SelectSubjectByUsername

func (vk *VK) SelectSubjectByUsername(username string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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