db

package
v0.0.0-...-92b599d Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmailInUse      = util.NewRichError(409, "email address in use", nil)
	ErrExternalIDInUse = util.NewRichError(409, "external ID in use", nil)
)
View Source
var ErrNotFound = util.NewRichError(404, "Item not found", nil)

Functions

This section is empty.

Types

type DB

type DB struct {
	ContextTimeout time.Duration
	// contains filtered or unexported fields
}

func New

func New() (*DB, error)

func (*DB) FetchSigningKey

func (db *DB) FetchSigningKey() (*models.SigningKey, error)

func (*DB) GetUserByExternalID

func (db *DB) GetUserByExternalID(extern string) (*models.User, error)

func (*DB) GetUserByID

func (db *DB) GetUserByID(id snowflake.ID) (*models.User, error)

func (*DB) Migrate

func (db *DB) Migrate() error

func (*DB) RegisterUser

func (db *DB) RegisterUser(user *models.User) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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