controllers

package
v0.0.0-...-5b5ecee Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpResponse

func HttpResponse(ctx *gin.Context, code int, msg string, data interface{})

send an http response

Types

type ErrorOutput

type ErrorOutput struct {
	Msg     string `json:"message"`
	Summary string `json:"summary"`
	Code    int    `json:"statusCode"`
}

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type of Response object

type UserController

type UserController interface {
	Register(*gin.Context)
	Update(*gin.Context)

	Login(ctx *gin.Context)
	GetUserByID(*gin.Context)
	GetUsers(*gin.Context)
	GetProfile(*gin.Context)
	ResetPassword(*gin.Context)
	ForgotPassword(*gin.Context)
	// contains filtered or unexported methods
}

func NewUserController

NewUserService creates a an instance of User Service

type UserInput

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

* * --- Types ---

type UserOutput

type UserOutput struct {
	ID        uint   `json:"ID"`
	FirstName string `json:"firstname"`
	LastName  string `json:"lastname"`
	Email     string `json:"email"`
	Role      string `json:"role"`
	Active    bool   `json:"acive"`
}

type UserUpdateInput

type UserUpdateInput struct {
	FirstName string `json:"firstname"`
	LastName  string `json:"lastname"`
	Email     string `json:"email"`
}

Jump to

Keyboard shortcuts

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