controller

package
v0.0.0-...-28b6f11 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Index

func Index(ctx *fasthttp.RequestCtx)

Index Router

func Signin

func Signin(ctx *fasthttp.RequestCtx)

Signin function

Types

type Claims

type Claims struct {
	Username string `json:"username"`
	jwt.StandardClaims
}

Claims Create a struct that will be encoded to a JWT. We add jwt.StandardClaims as an embedded type, to provide fields like expiry time

type Credentials

type Credentials struct {
	Password string `json:"password"`
	Username string `json:"username"`
}

Credentials Create a struct to read the username and password from the request body

Jump to

Keyboard shortcuts

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