controller

package
v0.0.0-...-6e75e83 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	responder.Responder
	godecoder.Decoder
	// contains filtered or unexported fields
}

func (*Auth) Login

func (a *Auth) Login(w http.ResponseWriter, r *http.Request)

func (*Auth) Refresh

func (a *Auth) Refresh(w http.ResponseWriter, r *http.Request)

func (*Auth) Register

func (a *Auth) Register(w http.ResponseWriter, r *http.Request)

type Auther

type Auther interface {
	Register(w http.ResponseWriter, r *http.Request)
	Login(w http.ResponseWriter, r *http.Request)
	Refresh(w http.ResponseWriter, r *http.Request)
}

func NewAuth

func NewAuth(service service.Auther, components *component.Components) Auther

type LoginData

type LoginData struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

type LoginRequest

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

type RegisterRequest

type RegisterRequest struct {
	Username       string `json:"username"`
	Password       string `json:"password"`
	RetypePassword string `json:"retype_password"`
}

Jump to

Keyboard shortcuts

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