entities

package
v0.0.0-...-b38aa6c Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidPassword

func IsValidPassword(password string, confirmPassword string) bool

Types

type RefreshToken

type RefreshToken struct {
	UserId    string
	Email     string
	Token     string
	CreatedAt time.Time
	RevokedAt *time.Time
}

https://travix.io/encapsulating-dependencies-in-go-b0fd74021f5a

func NewRefreshToken

func NewRefreshToken(userId string, email string, token string) (*RefreshToken, error)

func RevokeRefreshToken

func RevokeRefreshToken(email string, token string) (*RefreshToken, error)

type User

omitempty to protect against zeroed _id insertion

func NewUser

func NewUser(email string, password string) (*User, error)

Jump to

Keyboard shortcuts

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