models

package
v0.0.0-...-d7024bd Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNotFound = errors.New("user not found")
)

Functions

func SeedUserData

func SeedUserData(rc *rdb.Client) error

func ValidateHashedString

func ValidateHashedString(hashed, clear, salt string) bool

Types

type AccessToken

type AccessToken struct {
	ID       string
	Value    string
	ExpireAt time.Time
}

type Note

type Note struct {
	Title string
}

type RefreshToken

type RefreshToken struct {
	ID       string
	Value    string
	ExpireAt time.Time
}

type User

type User struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Password string `json:"password"`
	Salt     string `json:"salt"`
}

func GetUser

func GetUser(rc *rdb.Client, id string) (*User, error)

func GetUserByUsername

func GetUserByUsername(rc *rdb.Client, username string) (*User, error)

Jump to

Keyboard shortcuts

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