Documentation ¶
Index ¶
- Variables
- func ComparePasswordAndHash(password, encodedHash string) (match bool, err error)
- func GenerateSessionToken() string
- func HashPassword(plainPassword string) (hashedPassword string, err error)
- func Login(conn *pgxpool.Pool) func(ctx context.Context, input ...) (*LoginOutput, error)
- func Register(conn *pgxpool.Pool) func(ctx context.Context, input ...) (*UserOutput, error)
- type LoginOutput
- type User
- type UserOutput
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHash = errors.New("the encoded hash is not in the correct format") ErrIncompatibleVersion = errors.New("incompatible version of argon2") )
Functions ¶
func ComparePasswordAndHash ¶
func GenerateSessionToken ¶
func GenerateSessionToken() string
func HashPassword ¶
Types ¶
type LoginOutput ¶
type UserOutput ¶
type UserOutput struct {
Body UserResponse `json:"body"`
}
type UserResponse ¶
Click to show internal directories.
Click to hide internal directories.