routes

package
v0.0.0-...-b557599 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Healthcheck

func Healthcheck(w http.ResponseWriter, r *http.Request)

func NewHandler

func NewHandler(application *warden.Application) http.Handler

Types

type ConfirmUserRequest

type ConfirmUserRequest struct {
	Passcode string `json:"passcode"`
}

type CreateUserRequest

type CreateUserRequest struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email"`
}

type ErrorResponse

type ErrorResponse struct {
	Status int    `json:"-"`
	Error  string `json:"error"`
}

func ApplicationError

func ApplicationError(message string) *ErrorResponse

func BadRequestError

func BadRequestError(message string) *ErrorResponse

func MethodNotAllowedError

func MethodNotAllowedError() *ErrorResponse

func NotFoundError

func NotFoundError() *ErrorResponse

func UnauthorizedError

func UnauthorizedError(message string) *ErrorResponse

func (*ErrorResponse) Render

type GetProfileResponse

type GetProfileResponse struct {
	*User       `json:"user"`
	AccessToken string `json:"access_token"`
}

type User

type User struct {
	ID        string `json:"id"`
	Email     string `json:"email,omitempty"`
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
}

Jump to

Keyboard shortcuts

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