handler

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler added in v0.1.3

type Handler struct {
	Repo *repo.UserRepo
	Jwt  *jwt.Jwt
	// contains filtered or unexported fields
}

func Init added in v0.1.3

func Init(ctx context.Context, repo *repo.UserRepo, jwt *jwt.Jwt) *Handler

func (*Handler) HandleSignIn added in v0.1.3

func (h *Handler) HandleSignIn(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleVerify added in v0.1.3

func (h *Handler) HandleVerify(w http.ResponseWriter, r *http.Request)

func (*Handler) PasswordSignIn added in v0.1.3

func (h *Handler) PasswordSignIn(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Handler) StartServer added in v0.1.3

func (h *Handler) StartServer() error

type SignInRequest added in v0.1.3

type SignInRequest struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type SignInResponse added in v0.1.3

type SignInResponse struct {
	Token string `json:"token,omitempty"`
	Exp   int64  `json:"exp,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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