data

package
v0.0.0-...-b557599 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(url *url.URL) (*sqlx.DB, error)

func Downgrade

func Downgrade(url *url.URL) error

func Upgrade

func Upgrade(url *url.URL) error

Types

type PasscodeStore

type PasscodeStore interface {
	Create(string) (string, error)
	Find(string) (string, error)
	Revoke(string) error
}

func NewPasscodeStore

func NewPasscodeStore(client *db.Client, ttl time.Duration) (PasscodeStore, error)

type SessionStore

type SessionStore interface {
	Create(string) (string, error)
	Find(string) (string, error)
}

func NewSessionStore

func NewSessionStore(client *db.Client, ttl time.Duration) (SessionStore, error)

type UserStore

type UserStore interface {
	Create(firstName string, lastName string, email string) (*models.User, error)
	Find(id string) (*models.User, error)
}

func NewUserStore

func NewUserStore(client sqlx.Ext) (UserStore, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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