auth

package
v0.0.0-...-ebedddc Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInvalidUserNameOrPasswordCode = iota + 11000
	ErrGenerateTokenCode
	ErrRegisterUserCode
	ErrUpdateLastLoginAtCode
	ErrUnAuthorizationCode
)

Variables

View Source
var (
	ErrInvalidUserNameOrPassword = exception.Err("invalid username or password")
	ErrGenerateToken             = exception.Err("failed to create token")
	ErrRegisterUser              = exception.Err("register error")
	ErrUpdateLastLoginAt         = exception.Err("update loginAt error")
	ErrUnAuthorization           = exception.Err("user not login")
)

Functions

func Login

func Login(ctx *gin.Context) (any, error)

func Query

func Query(ctx *gin.Context) (any, error)

func Register

func Register(ctx *gin.Context) (any, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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