handler

package
v0.0.0-...-1dfef78 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: GPL-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 CRUDReq

type CRUDReq struct {
	Data map[string]interface{} `json:"data"`
}

CRUDReq for CreateUpdateReq

type Credentials

type Credentials struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type DeleteReq

type DeleteReq struct {
	Data struct {
		Entity string `json:"entity"`
		ID     int    `json:"ID"`
		UID    string `json:"uid"`
	} `json:"data"`
}

type Handler

type Handler struct {
	AccStore store.AccessStore
	EduStore store.EducationStore
	ProStore store.ProjectStore
}

func (*Handler) ChangePassword

func (h *Handler) ChangePassword(c echo.Context) error

func (*Handler) CreateUser

func (h *Handler) CreateUser(c echo.Context) error

func (*Handler) DecodeCRUDReq

func (h *Handler) DecodeCRUDReq(c echo.Context, req *CRUDReq, data interface{}) error

func (*Handler) Login

func (h *Handler) Login(c echo.Context) error

func (*Handler) Me

func (h *Handler) Me(c echo.Context) error

func (*Handler) Register

func (h *Handler) Register(v1 *echo.Group)

func (*Handler) SignUp

func (h *Handler) SignUp(c echo.Context) error

SignUp registers a new User

func (*Handler) UpdateAccount

func (h *Handler) UpdateAccount(c echo.Context) error

type LoginResponse

type LoginResponse struct {
	User  models.User `json:"user"`
	Token string      `json:"token"`
}

func NewLoginResp

func NewLoginResp(u *models.User) (*LoginResponse, error)

type NewPasswordForm

type NewPasswordForm struct {
	CurrentPass string `json:"current_pass"`
	NewPass     string `json:"new_pass"`
}

type NewPasswordReq

type NewPasswordReq struct {
	Data NewPasswordForm `json:"data"`
}

type Tokened

type Tokened struct {
	Token string `json:"token"`
}

type UpdateAccountForm

type UpdateAccountForm struct {
	Account models.Account `json:"account"`
}

type UpdateAccountReq

type UpdateAccountReq struct {
	Data UpdateAccountForm `json:"data"`
}

type UserLoginReq

type UserLoginReq struct {
	Credentials Credentials `json:"user"`
}

type UserUpdateResponse

type UserUpdateResponse struct {
	User  models.User `json:"user"`
	Token string      `json:"token"`
}

Jump to

Keyboard shortcuts

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