controllers

package
v0.0.0-...-f0ca03d Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

Controllers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentUser

func CurrentUser(c *gin.Context)

func GetUsers

func GetUsers(c *gin.Context)

func Login

func Login(c *gin.Context)

func LoginCheck

func LoginCheck(email string, password string) (string, error)

func Register

func Register(c *gin.Context)

func VerifyPassword

func VerifyPassword(password, hashedPassword string) error

Types

type FactoryController

type FactoryController struct {
}

func (*FactoryController) Create

func (hc *FactoryController) Create(c *gin.Context)

func (*FactoryController) Delete

func (hc *FactoryController) Delete(c *gin.Context)

func (*FactoryController) GetAll

func (hc *FactoryController) GetAll(c *gin.Context)

func (*FactoryController) GetByID

func (hc *FactoryController) GetByID(c *gin.Context)

func (*FactoryController) Update

func (hc *FactoryController) Update(c *gin.Context)

type HospitalController

type HospitalController struct {
}

func (*HospitalController) Create

func (hc *HospitalController) Create(c *gin.Context)

func (*HospitalController) Delete

func (hc *HospitalController) Delete(c *gin.Context)

func (*HospitalController) GetAll

func (hc *HospitalController) GetAll(c *gin.Context)

func (*HospitalController) GetByID

func (hc *HospitalController) GetByID(c *gin.Context)

func (*HospitalController) Update

func (hc *HospitalController) Update(c *gin.Context)

type LoginInput

type LoginInput struct {
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type MockPatientController

type MockPatientController struct{}

func (*MockPatientController) CreatePatient

func (c *MockPatientController) CreatePatient(ctx *gin.Context)

func (*MockPatientController) DeletePatient

func (c *MockPatientController) DeletePatient(ctx *gin.Context)

func (*MockPatientController) GetAllPatients

func (c *MockPatientController) GetAllPatients(ctx *gin.Context)

func (*MockPatientController) GetPatientByID

func (c *MockPatientController) GetPatientByID(ctx *gin.Context)

func (*MockPatientController) UpdatePatient

func (c *MockPatientController) UpdatePatient(ctx *gin.Context)

type Patient

type Patient struct {
	ID        string
	Name      string
	Age       int
	Gender    string
	Condition string
}

func CreateDummyPatient

func CreateDummyPatient() *Patient

type PatientController

type PatientController interface {
	GetAllPatients(ctx *gin.Context)
	CreatePatient(ctx *gin.Context)
	GetPatientByID(ctx *gin.Context)
	UpdatePatient(ctx *gin.Context)
	DeletePatient(ctx *gin.Context)
}

type RegisterInput

type RegisterInput struct {
	ID       int    `json:"patientId" binding:"required"`
	Name     string `json:"fullName" binding:"required"`
	Age      int    `json:"age"`
	Address  string `json:"address"`
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
	Role     string `json:"role" binding:"required"`
}

func GetUserByID

func GetUserByID(uid int) (RegisterInput, error)

type ShopController

type ShopController struct {
}

func (*ShopController) Create

func (hc *ShopController) Create(c *gin.Context)

func (*ShopController) Delete

func (hc *ShopController) Delete(c *gin.Context)

func (*ShopController) GetAll

func (hc *ShopController) GetAll(c *gin.Context)

func (*ShopController) GetByID

func (hc *ShopController) GetByID(c *gin.Context)

func (*ShopController) Update

func (hc *ShopController) Update(c *gin.Context)

Jump to

Keyboard shortcuts

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