user

package
v0.0.0-...-501be23 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Username     string `json:"username"`
	PasswordHash string `json:"passwordHash"`
}

type Storer

type Storer struct {
	DB *sql.DB
}

func (Storer) CreateUser

func (s Storer) CreateUser(creds Credentials) (User, error)

func (Storer) GetUser

func (s Storer) GetUser(username string) (User, error)

type User

type User struct {
	Id           int    `json:"id"`
	Tag          string `json:"tag"`
	PasswordHash string `json:"passwordHash"`
}

Jump to

Keyboard shortcuts

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