controllers

package
v0.0.0-...-501be23 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteError

func WriteError(w http.ResponseWriter, err utils.HttpError)

Types

type Endpoint

type Endpoint interface {
	Handle(http.ResponseWriter, *http.Request)
	Add(*mux.Router)
}

type LoginEndpoint

type LoginEndpoint struct {
	// contains filtered or unexported fields
}

func NewLoginEndpoint

func NewLoginEndpoint(method string, name string, service services.UserService, jwtStrat utils.JWTStrategy) LoginEndpoint

func (LoginEndpoint) Add

func (le LoginEndpoint) Add(router *mux.Router)

func (LoginEndpoint) Handle

func (le LoginEndpoint) Handle(w http.ResponseWriter, r *http.Request)

type RegisterEndpoint

type RegisterEndpoint struct {
	// contains filtered or unexported fields
}

func NewRegisterEndpoint

func NewRegisterEndpoint(method string, name string, service services.UserService, jwtStrat utils.JWTStrategy) RegisterEndpoint

func (RegisterEndpoint) Add

func (re RegisterEndpoint) Add(router *mux.Router)

func (RegisterEndpoint) Handle

func (re RegisterEndpoint) Handle(w http.ResponseWriter, r *http.Request)

type TokenBody

type TokenBody struct {
	Token string `json:"token"`
}

type ValidateTokenEndpoint

type ValidateTokenEndpoint struct {
	// contains filtered or unexported fields
}

func NewValidateTokenEndpoint

func NewValidateTokenEndpoint(method string, name string, jwtStrat utils.JWTStrategy) ValidateTokenEndpoint

func (ValidateTokenEndpoint) Add

func (vte ValidateTokenEndpoint) Add(router *mux.Router)

func (ValidateTokenEndpoint) Handle

Jump to

Keyboard shortcuts

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