api

package
v0.0.0-...-f5e8e9b Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

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

func NewApi

func NewApi(userRepository models.UserRepository, auth auth.Auth) *Api

func (*Api) AuthMiddleware

func (api *Api) AuthMiddleware(f http.HandlerFunc) http.HandlerFunc

func (*Api) Login

func (api *Api) Login(w http.ResponseWriter, r *http.Request)

func (*Api) Registration

func (api *Api) Registration(w http.ResponseWriter, r *http.Request)

type LoginUser

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

type RegisterUser

type RegisterUser struct {
	Name         string `json:"name"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	Confirmation string `json:"confirmation"`
}

Jump to

Keyboard shortcuts

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