utils

package
v0.0.0-...-c7ab4d1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func HashPassword

func HashPassword(password string) (string, error)

func LoadTemplates

func LoadTemplates(template_path string) string

Types

type AccessTokens

type AccessTokens struct {
	Token   string `json:"token"`
	Expires int64  `json:"expires"`
}

type AuthTokensObject

type AuthTokensObject struct {
	Access  AccessTokens  `json:"access"`
	Refresh RefreshTokens `json:"refresh"`
}

type EmailVerification

type EmailVerification struct {
	GreetUseStyle     string `json:"greet_use_style"`
	Username          string `json:"username"`
	VerifyLink        string `json:"verify_link"`
	SignatureGreeting string `json:"signature_greeting"`
	EmailSignature    string `json:"email_signature"`
}

type ForgotPass

type ForgotPass struct {
	Email string `json:"email" validate:"required,email,max=255"`
}

type MongoInstance

type MongoInstance struct {
	Client *mongo.Client
	DB     *mongo.Database
}

type RefreshToken

type RefreshToken struct {
	RefreshToken string `json:"refresh_token"`
}

type RefreshTokens

type RefreshTokens struct {
	Token   string `json:"token"`
	Expires int64  `json:"expires"`
}

type ResetPass

type ResetPass struct {
	Password string `json:"password"`
}

type SignIn

type SignIn struct {
	Identity string `json:"identity"`
	Password string `json:"password"`
}

type Success

type Success struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
	Data    string `json:"data"`
}

type UpdatePassword

type UpdatePassword struct {
	OldPassword string `json:"old_password" validate:"required"`
	NewPassword string `json:"new_password" validate:"required"`
}

Jump to

Keyboard shortcuts

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