users

package
v0.0.0-...-5cdcd7b Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserByToken

func GetUserByToken(ctx *fasthttp.RequestCtx)

last queue number

url: http://localhost:8020/queue/@token method:GET params: @token => eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6IjExZjE5Y2M2Njg2Y2QxOWI1NTM2OTI1YmU3ODNlMDRlZjlmZDViZDk1MTVmMzA1YmQ5OTE4NjZmM2YwMGRmNjAiLCJ1c2VybmFtZSI6IjA5MTIxMjEyMzEifQ.eTH8Qo8P_MZ7Ui1WOm4Cl-9VHLiDiq4Z668cobhJdFM

func GetUserHistoryByToken

func GetUserHistoryByToken(ctx *fasthttp.RequestCtx)

get all turn for user with token auth

url: http://localhost:8020/user/@token/history method:GET params: @token => eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6IjExZjE5Y2M2Njg2Y2QxOWI1NTM2OTI1YmU3ODNlMDRlZjlmZDViZDk1MTVmMzA1YmQ5OTE4NjZmM2YwMGRmNjAiLCJ1c2VybmFtZSI6IjA5MTIxMjEyMzEifQ.eTH8Qo8P_MZ7Ui1WOm4Cl-9VHLiDiq4Z668cobhJdFM

func Login

func Login(ctx *fasthttp.RequestCtx)

if user auth with `phone` and `password` generate token token like this token = token+@+reverse(name)+!+3423423423423423jhb234g3h2ik53l5g34h5jgv234oy5gv43jh25v34l5v43uo25vy

url: http://localhost:8020/user/login method:POST body: { "MobilePhone":"0912121231", "Password":"momy8" }

func Register

func Register(ctx *fasthttp.RequestCtx)

register user with `name` and `password` and `email` and `MobilePhone`

url: http://localhost:8020/user/register method:POST body: { "Name":"ali", "Password":"momy8", "Email":"ali@gmail.com", "MobilePhone":"989012122131" }

func ValidateMiddleware

func ValidateMiddleware(t string) string

check user is validate and auth

Types

This section is empty.

Jump to

Keyboard shortcuts

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