server

package
v0.0.0-...-28d87ae Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpAuthenticateUser

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

type HttpCreateUser

type HttpCreateUser struct {
	Username        string `json:"username"`
	Email           string `json:"email"`
	Password        string `json:"password"`
	ConfirmPassword string `json:"confirm_password"`
}

func (*HttpCreateUser) Validate

func (u *HttpCreateUser) Validate() error

type HttpReadLogin

type HttpReadLogin struct {
	ID          uuid.UUID `json:"id"`
	RedirectURL url.URL   `json:"redirect_url"`
	Status      string    `json:"status"`
	Attempts    int       `json:"attempts"`
	CSRFToken   string    `json:"csrf_token"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

type HttpReadUser

type HttpReadUser struct {
	ID       uuid.UUID `json:"id"`
	Username string    `json:"username"`
	Email    string    `json:"email"`
}

type LoginHandler

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

func NewLoginHandler

func NewLoginHandler(
	repo domain.LoginRepo,
	userRepo domain.UserRepo,
	loginURL url.URL,
) *LoginHandler

func (*LoginHandler) GetLogin

func (h *LoginHandler) GetLogin(w http.ResponseWriter, r *http.Request)

func (*LoginHandler) InitializeLogin

func (h *LoginHandler) InitializeLogin(w http.ResponseWriter, r *http.Request)

func (*LoginHandler) VerifyLogin

func (h *LoginHandler) VerifyLogin(w http.ResponseWriter, r *http.Request)

type UserHandler

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

func NewUserHandler

func NewUserHandler(repo domain.UserRepo) *UserHandler

func (*UserHandler) Create

func (h *UserHandler) Create(w http.ResponseWriter, r *http.Request)

func (*UserHandler) Get

func (h *UserHandler) Get(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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