auth

package
v0.0.0-...-31041b1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() *jwtauth.JWTAuth

Init Auth

func Login

func Login(w http.ResponseWriter, req *http.Request)

Login Handler

func Register

func Register(w http.ResponseWriter, req *http.Request)

Register Handler

func Routes

func Routes() *chi.Mux

Routes Auth definitions

Types

type DataResponse

type DataResponse struct {
	Response
	Data models.User `json:"data"`
}

DataResponse structure

type Response

type Response struct {
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
}

Response structure

type TokenResponse

type TokenResponse struct {
	Response
	Token string `json:"token,omitempty"`
}

TokenResponse structure

type ValidationErrors

type ValidationErrors struct {
	Errors map[string]string `json:"validationErrors"`
}

ValidationErrors type

Jump to

Keyboard shortcuts

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