controllers

package
v0.0.0-...-fad7234 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserTypes = []string{"Admin", "Watcher", "Supervisor", "Resident"}

UserTypes array

Functions

func GenerateGeneralToken

func GenerateGeneralToken(userID string, condoID string, points []*models.Points, assistance *models.Assistances, item *models.Items) (token string, err error)

GenerateGeneralToken ..

func Join

func Join(user string, condoID int, ws *websocket.Conn)

Join ...

func Leave

func Leave(user string)

Leave ...

func VerifyResidentIdentity

func VerifyResidentIdentity(residentID int, newFaceFh *multipart.FileHeader) (resident *models.Residents, ok bool, err error)

VerifyResidentIdentity ...

func VerifyWorkerIdentity

func VerifyWorkerIdentity(workerID int, newFaceFh *multipart.FileHeader) (worker *models.Workers, ok bool, err error)

VerifyWorkerIdentity ...

Types

type AdminController

type AdminController struct {
	BaseController
}

AdminController operations for Admin

func (*AdminController) Login

func (c *AdminController) Login()

Login ... @Title Login @Description Login Admin @router /login [post]

func (*AdminController) URLMapping

func (c *AdminController) URLMapping()

URLMapping ...

func (*AdminController) Update

func (c *AdminController) Update()

Update ... @Title Update @Description Update Admin @router / [put]

type AssistancesController

type AssistancesController struct {
	BaseController
}

AssistancesController operations for Assistances

func (*AssistancesController) Delete

func (c *AssistancesController) Delete()

Delete ... @Title Delete @Description delete the Assistances @router /:id [delete]

func (*AssistancesController) GetAll

func (c *AssistancesController) GetAll()

GetAll ... @Title Get All @Description get Assistances @router / [get]

func (*AssistancesController) GetAllFromTrash

func (c *AssistancesController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*AssistancesController) GetOne

func (c *AssistancesController) GetOne()

GetOne ... @Title Get One @Description get Assistances by id @router /:id [get]

func (*AssistancesController) NewAssistanceExecute

func (c *AssistancesController) NewAssistanceExecute()

NewAssistanceExecute ... @Title New Assistance Execute @Description New Assistance Execute @router /:token [post]

func (*AssistancesController) Post

func (c *AssistancesController) Post()

Post ... @Title Post @Description create Assistances @Accept json @Param Authorization header string true "Watcher's Token" @Param date body string true "date format 'Y-M-d' ej: '2018-08-28'" @Param worker body string true "worker object (only id is required)" @Success 200 {object} models.Assistances @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Worker Don't exists @router / [post]

func (*AssistancesController) Put

func (c *AssistancesController) Put()

Put ... @Title Put @Description update the Assistances @router /:id [put]

func (*AssistancesController) RestoreFromTrash

func (c *AssistancesController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*AssistancesController) URLMapping

func (c *AssistancesController) URLMapping()

URLMapping ...

type AuthController

type AuthController struct {
	BaseController
}

AuthController operations for Middleware

type BaseController

type BaseController struct {
	beego.Controller
}

BaseController operations for Activities

func (*BaseController) BadRequest

func (c *BaseController) BadRequest(err error)

BadRequest =

func (*BaseController) BadRequestDontExists

func (c *BaseController) BadRequestDontExists(message string)

BadRequestDontExists =

func (*BaseController) BadRequestErrors

func (c *BaseController) BadRequestErrors(errors []*validation.Error, entity string)

BadRequestErrors = Validar

func (*BaseController) GenerateToken

func (c *BaseController) GenerateToken(userType string, userID string, condoID string, timeArgs ...int) (token string, err error)

GenerateToken =

func (*BaseController) ServeErrorJSON

func (c *BaseController) ServeErrorJSON(err error)

ServeErrorJSON : Serve Json error

type ChecksController

type ChecksController struct {
	BaseController
}

ChecksController operations for Holidays

func (*ChecksController) Delete

func (c *ChecksController) Delete()

Delete ... @Title Delete @Description delete the Checks @router /:id [delete]

func (*ChecksController) GetAllFromTrash

func (c *ChecksController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*ChecksController) GetOne

func (c *ChecksController) GetOne()

GetOne ... @Title Get One @Description get Checks by id @router /:id [get]

func (*ChecksController) Post

func (c *ChecksController) Post()

Post ... @Title Post @Description create Checks @router / [post]

func (*ChecksController) Put

func (c *ChecksController) Put()

Put ... @Title Put @Description update the Checks @Accept json @Param Authorization header string true "Supervisor's Token" @Param id param int true "Task's id" @Success 200 {object} models.Checks @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Task's Dont exists @router /:id [put]

func (*ChecksController) RestoreFromTrash

func (c *ChecksController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*ChecksController) URLMapping

func (c *ChecksController) URLMapping()

URLMapping ...

type CondosController

type CondosController struct {
	BaseController
}

CondosController operations for Condos

func (*CondosController) AddResidentsToCondosByRUT

func (c *CondosController) AddResidentsToCondosByRUT()

AddResidentsToCondosByRUT ... @Title Add Residents To Condos By RUT @Description Add Residents To Condos By RUT @Accept json @Success 200 {object} models.Residents @Failure 400 Bad Request @Failure 404 Condos Don't Exists @router /rut/:rut/residents [post]

func (*CondosController) AddWatchersToCondosByRUT

func (c *CondosController) AddWatchersToCondosByRUT()

AddWatchersToCondosByRUT ... @Title Add Watchers To Condos By RUT @Description Add Watchers To Condos By RUT @Accept json @Success 200 {object} models.Watchers @Failure 400 Bad Request @Failure 404 Condos Don't Exists @router /rut/:rut/watchers [post]

func (*CondosController) Delete

func (c *CondosController) Delete()

Delete ... @Title Delete @Description delete the Condos @router /:id [delete]

func (*CondosController) GetAll

func (c *CondosController) GetAll()

GetAll ... @Title Get All @Description get Condos @router / [get]

func (*CondosController) GetAllFromTrash

func (c *CondosController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*CondosController) GetByRUT

func (c *CondosController) GetByRUT()

GetByRUT ... @Title Get By RUT @Description Ge tBy RUT @router /rut/:rut [get]

func (*CondosController) GetOne

func (c *CondosController) GetOne()

GetOne ... @Title Get One @Description get Condos by id @router /:id [get]

func (*CondosController) GetSelf

func (c *CondosController) GetSelf()

GetSelf ... @Title Get Self @Description Get Self @Accept json @Param Authorization header string true "Watcher's Token or Supervisor's Token" @Success 200 {object} models.Condos @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Condos Don't Exists @router /self [get]

func (*CondosController) GetSelfChecksByDate

func (c *CondosController) GetSelfChecksByDate()

GetSelfChecksByDate .. @Title Get Self Checks By Date @Description Get Self Checks By Date @Accept json @Param Authorization header string true "Supervisor's Token" @Success 200 {array} models.Checks @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Month without Data @router /checks/:date [get]

func (*CondosController) GetSelfChecksByMonth

func (c *CondosController) GetSelfChecksByMonth()

GetSelfChecksByMonth .. @Title Get Self Checks By Month @Description Get Self Checks By Month @Accept json @Param Authorization header string true "Supervisor's Token" @Param year path int true "year's Date" @Param month path int true "month's Date" @Success 200 {array} models.Checks @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Month without Data @router /checks/:year/:month [get]

func (*CondosController) GetSelfEmptyVerificationsWorker

func (c *CondosController) GetSelfEmptyVerificationsWorker()

GetSelfEmptyVerificationsWorker ... @Title Get Self Empty Verifications Worker @Description Get Self Empty Verifications Worker @router /:id/empty-verifications/:date/workers [get]

func (*CondosController) GetSelfVerificationsByMonth

func (c *CondosController) GetSelfVerificationsByMonth()

GetSelfVerificationsByMonth .. @Title Get Self Verifications By Month @Description Get Self Verifications By Month @Accept json @Param Authorization header string true "Supervisor's Token" @Param year path int true "year's Date" @Param month path int true "month's Date" @Success 200 {array} models.Verfications @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Month without Data @router /verifications/:year/:month [get]

func (*CondosController) GetSupervisorsByCondosID

func (c *CondosController) GetSupervisorsByCondosID()

GetSupervisorsByCondosID ... @Title Get Supervisors By CondosID @Description Get Supervisors By CondosID @router /:id/supervisors [get]

func (*CondosController) Post

func (c *CondosController) Post()

Post ... @Title Post @Description create Condos @Accept json @Param Authorization header string true "Supervisor's Token" @Param user_limit body int true "max users per condo" @Param zone_limit body int true "max zones per condo" @Param hour_value body int true "worker's hour value" @Param extra_hour_increase body int true "Percentage Increase to Hour Value" @Param working_hours body int true "Hours to work" @Param assistances_mod body bool true "Assistances Capabilities" @Param routes_mod body bool true "Routes Capabilities" @Success 201 {object} models.Condos @Failure 400 Bad Request @Failure 403 Invalid Token @router / [post]

func (*CondosController) Put

func (c *CondosController) Put()

Put ... @Title Put @Description update the Condos @router /:id [put]

func (*CondosController) RestoreFromTrash

func (c *CondosController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*CondosController) URLMapping

func (c *CondosController) URLMapping()

URLMapping ...

type DeliveriesController

type DeliveriesController struct {
	BaseController
}

DeliveriesController operations for Holidays

func (*DeliveriesController) ChangeStatus

func (c *DeliveriesController) ChangeStatus()

ChangeStatus ... @Title Change Status @Description ChangeStatus @router /:id/status/:approved [put]

func (*DeliveriesController) Delete

func (c *DeliveriesController) Delete()

Delete ... @Title Delete @Description delete the Deliveries @router /:id [delete]

func (*DeliveriesController) GetAllFromTrash

func (c *DeliveriesController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*DeliveriesController) GetByCondosID

func (c *DeliveriesController) GetByCondosID()

GetByCondosID ... @Title Get By CondosID @Description Get By CondosID @router /condos/self [get]

func (*DeliveriesController) GetByWorkersID

func (c *DeliveriesController) GetByWorkersID()

GetByWorkersID ... @Title Get By WorkersID @Description Get By WorkersID @router /workers/:id [get]

func (*DeliveriesController) GetOne

func (c *DeliveriesController) GetOne()

GetOne ... @Title Get One @Description get Tasks by id @router /:id [get]

func (*DeliveriesController) GetSelf

func (c *DeliveriesController) GetSelf()

GetSelf ... @Title Get Self @Description Get Self @router /self [get]

func (*DeliveriesController) Post

func (c *DeliveriesController) Post()

Post ... @Title Post @Description create Tasks @router / [post]

func (*DeliveriesController) Put

func (c *DeliveriesController) Put()

Put ... @Title Put @Description update the Tasks @Accept json @Param Authorization header string true "Supervisor's Token" @Param id param int true "Delivery's id" @Success 200 {object} models.Deliveries @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Task's Dont exists @router /:id [put]

func (*DeliveriesController) RestoreFromTrash

func (c *DeliveriesController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*DeliveriesController) URLMapping

func (c *DeliveriesController) URLMapping()

URLMapping ...

type GoalsCommentsController

type GoalsCommentsController struct {
	BaseController
}

GoalsCommentsController operations for Holidays

func (*GoalsCommentsController) GetAttachmentByUUID

func (c *GoalsCommentsController) GetAttachmentByUUID()

GetAttachmentByUUID ... @Title Get By UUID @Description Get file By UUID @router /attachment/:uuid [get]

func (*GoalsCommentsController) Post

func (c *GoalsCommentsController) Post()

Post ... @Title Post @Description create Goals comments @router / [post]

func (*GoalsCommentsController) URLMapping

func (c *GoalsCommentsController) URLMapping()

URLMapping ...

type GoalsController

type GoalsController struct {
	BaseController
}

GoalsController operations for Holidays

func (*GoalsController) ChangeStatus

func (c *GoalsController) ChangeStatus()

ChangeStatus ... @Title Change Status @Description Change Status @router /:id/status/:completed [put]

func (*GoalsController) Delete

func (c *GoalsController) Delete()

Delete ... @Title Delete @Description delete the Goals @router /:id [delete]

func (*GoalsController) GetAllFromTrash

func (c *GoalsController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*GoalsController) GetOne

func (c *GoalsController) GetOne()

GetOne ... @Title Get One @Description get Goals by id @router /:id [get]

func (*GoalsController) Post

func (c *GoalsController) Post()

Post ... @Title Post @Description create Tasks @router / [post]

func (*GoalsController) Put

func (c *GoalsController) Put()

Put ... @Title Put @Description update the Goals @Accept json @Param Authorization header string true "Supervisor's Token" @Param id param int true "Goal's id" @Success 200 {object} models.Goals @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Goal's Dont exists @router /:id [put]

func (*GoalsController) RestoreFromTrash

func (c *GoalsController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*GoalsController) URLMapping

func (c *GoalsController) URLMapping()

URLMapping ...

type HolidaysController

type HolidaysController struct {
	BaseController
}

HolidaysController operations for Holidays

func (*HolidaysController) Delete

func (c *HolidaysController) Delete()

Delete ... @Title Delete @Description delete the Holidays @router /:id [delete]

func (*HolidaysController) GetAllFromTrash

func (c *HolidaysController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*HolidaysController) Post

func (c *HolidaysController) Post()

Post ... @Title Post @Description create Holidays @router / [post]

func (*HolidaysController) RestoreFromTrash

func (c *HolidaysController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*HolidaysController) URLMapping

func (c *HolidaysController) URLMapping()

URLMapping ...

type ItemsController

type ItemsController struct {
	BaseController
}

ItemsController operations for Holidays

func (*ItemsController) ChangeStatus

func (c *ItemsController) ChangeStatus()

ChangeStatus ... @Title Change Status @Description ChangeStatus @router /:id/status/:delivered [put]

func (*ItemsController) Delete

func (c *ItemsController) Delete()

Delete ... @Title Delete @Description delete the Items @router /:id [delete]

func (*ItemsController) GetAllFromTrash

func (c *ItemsController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*ItemsController) GetFilesByUUID

func (c *ItemsController) GetFilesByUUID()

GetFilesByUUID ... @Title Get By UUID @Description Get file By UUID @router /image/:uuid [get]

func (*ItemsController) GetOne

func (c *ItemsController) GetOne()

GetOne ... @Title Get One @Description get Tasks by id @router /:id [get]

func (*ItemsController) MakeComment

func (c *ItemsController) MakeComment()

MakeComment ... @Title Make Comment @Description Make comment @router /:id/comment [put]

func (*ItemsController) MakeCommentExecute

func (c *ItemsController) MakeCommentExecute()

MakeCommentExecute ... @Title Make Comment Execute @Description Make comment Execute @router /:id/comment/:token [put]

func (*ItemsController) Post

func (c *ItemsController) Post()

Post ... @Title Post @Description create Tasks @router / [post]

func (*ItemsController) Put

func (c *ItemsController) Put()

Put ... @Title Put @Description update the Tasks @Accept json @Param Authorization header string true "Supervisor's Token" @Param id param int true "Item's id" @Success 200 {object} models.Items @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Task's Dont exists @router /:id [put]

func (*ItemsController) RestoreFromTrash

func (c *ItemsController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*ItemsController) URLMapping

func (c *ItemsController) URLMapping()

URLMapping ...

type JwtToken

type JwtToken struct {
	Type    string `json:"type"`
	UserID  string `json:"user_id"`
	CondoID string `json:"condo_id"`
	jwt.StandardClaims
}

JwtToken =

func VerifyToken

func VerifyToken(tokenString string, userType string) (decodedToken *JwtToken, err error)

VerifyToken =

func VerifyTokenByAllUserTypes

func VerifyTokenByAllUserTypes(ts string) (decodedToken *JwtToken, userType string, err error)

VerifyTokenByAllUserTypes ...

type JwtTokenRoute

type JwtTokenRoute struct {
	UserID     string              `json:"user_id,omitempty"`
	CondoID    string              `json:"condo_id,omitempty"`
	Points     []*models.Points    `json:"points,omitempty"`
	Assistance *models.Assistances `json:"assistances,omitempty"`
	Item       *models.Items       `json:"item,omitempty"`
	jwt.StandardClaims
}

JwtTokenRoute ...

func VerifyGeneralToken

func VerifyGeneralToken(tokenString string) (decodedToken *JwtTokenRoute, err error)

VerifyGeneralToken ...

type MessageResponse

type MessageResponse struct {
	Message       string              `json:"message,omitempty"`
	Code          uint16              `json:"code,omitempty"`
	PrettyMessage string              `json:"pretty_message,omitempty"`
	Errors        []map[string]string `json:"errors,omitempty"`
	Error         string              `json:"error,omitempty"`
}

MessageResponse =

type NotificationsController

type NotificationsController struct {
	BaseController
}

NotificationsController operations for Notifications

func (*NotificationsController) Approve

func (c *NotificationsController) Approve()

Approve ... @Title Approve @router /:id/status/:approved [put]

func (*NotificationsController) Delete

func (c *NotificationsController) Delete()

Delete ... @Title Delete @Description delete the Notifications @router /:id [delete]

func (*NotificationsController) GetAllFromTrash

func (c *NotificationsController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*NotificationsController) GetByCondosSelf

func (c *NotificationsController) GetByCondosSelf()

GetByCondosSelf ... @Title Get By Condos Self @router /condos/self [get]

func (*NotificationsController) GetImageByUUID

func (c *NotificationsController) GetImageByUUID()

GetImageByUUID ... @Title Get By UUID @Description Get file By UUID @router /image/:uuid [get]

func (*NotificationsController) GetOne

func (c *NotificationsController) GetOne()

GetOne ... @Title Get One @Description get Notifications by id @router /:id [get]

func (*NotificationsController) GetSelf

func (c *NotificationsController) GetSelf()

GetSelf ... @Title Get Self @router /self [get]

func (*NotificationsController) Post

func (c *NotificationsController) Post()

Post ... @Title Post @Description create Notifications @router / [post]

func (*NotificationsController) Put

func (c *NotificationsController) Put()

Put ... @Title Put @router /:id [put]

func (*NotificationsController) RestoreFromTrash

func (c *NotificationsController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*NotificationsController) URLMapping

func (c *NotificationsController) URLMapping()

URLMapping ...

func (*NotificationsController) View

func (c *NotificationsController) View()

View ... @Title View @router /:id/view/:viewed [put]

type ObjectsController

type ObjectsController struct {
	BaseController
}

ObjectsController operations for Holidays

func (*ObjectsController) Delete

func (c *ObjectsController) Delete()

Delete ... @Title Delete @Description delete the Objects @router /:id [delete]

func (*ObjectsController) GetAllFromTrash

func (c *ObjectsController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*ObjectsController) GetOne

func (c *ObjectsController) GetOne()

GetOne ... @Title Get One @Description get Objects by id @router /:id [get]

func (*ObjectsController) GetSelf

func (c *ObjectsController) GetSelf()

GetSelf ... @Title Get Self @Description Get Self @Accept json @Param Authorization header string true "Watcher's Token or Supervisor's Token" @Success 200 {array} models.Objects @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Objects Don't Exists @router /self [get]

func (*ObjectsController) Post

func (c *ObjectsController) Post()

Post ... @Title Post @Description create Objects @router / [post]

func (*ObjectsController) Put

func (c *ObjectsController) Put()

Put ... @Title Put @Description update the Objects @Accept json @Param Authorization header string true "Supervisor's Token" @Param id param int true "Task's id" @Success 200 {object} models.Objects @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Task's Dont exists @router /:id [put]

func (*ObjectsController) RestoreFromTrash

func (c *ObjectsController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*ObjectsController) URLMapping

func (c *ObjectsController) URLMapping()

URLMapping ...

type OccurrencesController

type OccurrencesController struct {
	BaseController
}

OccurrencesController operations for Holidays

func (*OccurrencesController) Delete

func (c *OccurrencesController) Delete()

Delete ... @Title Delete @Description delete the Occurrences @router /:id [delete]

func (*OccurrencesController) GetAllFromTrash

func (c *OccurrencesController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*OccurrencesController) GetAttachmentByUUID

func (c *OccurrencesController) GetAttachmentByUUID()

GetAttachmentByUUID ... @Title Get By UUID @Description Get file By UUID @router /attachment/:uuid [get]

func (*OccurrencesController) GetOne

func (c *OccurrencesController) GetOne()

GetOne ... @Title Get One @Description get Occurrences by id @router /:id [get]

func (*OccurrencesController) Post

func (c *OccurrencesController) Post()

Post ... @Title Post @Description create Occurrences @router / [post]

func (*OccurrencesController) Put

func (c *OccurrencesController) Put()

Put ... @Title Put @Description update the Occurrences @Accept json @Param Authorization header string true "Supervisor's Token" @Param id param int true "Task's id" @Success 200 {object} models.Occurrences @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Task's Dont exists @router /:id [put]

func (*OccurrencesController) RestoreFromTrash

func (c *OccurrencesController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*OccurrencesController) URLMapping

func (c *OccurrencesController) URLMapping()

URLMapping ...

type PointsController

type PointsController struct {
	BaseController
}

PointsController operations for Points

func (*PointsController) Delete

func (c *PointsController) Delete()

Delete ... @Title Delete @Description delete the Points @router /:id [delete]

func (*PointsController) GetAll

func (c *PointsController) GetAll()

GetAll ... @Title Get All @Description get Points @router / [get]

func (*PointsController) GetAllFromTrash

func (c *PointsController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*PointsController) GetOne

func (c *PointsController) GetOne()

GetOne ... @Title Get One @Description get Points by id @router /:id [get]

func (*PointsController) Post

func (c *PointsController) Post()

Post ... @Title Post @Description create Points @Accept json @Param Authorization header string true "Supervisor's Token" @Param name body string true "Point's Name" @Param zones body string true "Zone's Object (only id is required)" @Success 201 {object} models.Zones @Failure 400 Bad Request @Failure 403 Invalid Token @router / [post]

func (*PointsController) Put

func (c *PointsController) Put()

Put ... @Title Put @Description update the Points @Accept json @Param Authorization header string true "Supervisor's Token" @Param id param int true "Point's id" @Param name body string true "Point's Name" @Success 200 {object} models.Zones @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Zone's Point Dont exists @router /:id [put]

func (*PointsController) RestoreFromTrash

func (c *PointsController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*PointsController) URLMapping

func (c *PointsController) URLMapping()

URLMapping ...

type QuestionsAttachmentsController

type QuestionsAttachmentsController struct {
	BaseController
}

QuestionsAttachmentsController operations for QuestionsAttachments

func (*QuestionsAttachmentsController) Delete

func (c *QuestionsAttachmentsController) Delete()

Delete ... @Title Delete @Description delete the QuestionsAttachments @router /:id [delete]

func (*QuestionsAttachmentsController) GetAllFromTrash

func (c *QuestionsAttachmentsController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [get]

func (*QuestionsAttachmentsController) GetAttachmentByUUID

func (c *QuestionsAttachmentsController) GetAttachmentByUUID()

GetAttachmentByUUID ... @Title Get By UUID @Description Get file By UUID @router /attachment/:uuid [get]

func (*QuestionsAttachmentsController) Post

Post ... @Title Post @Description create QuestionsAttachments @Accept json @Param Authorization header string true "Resident's Token" @Param name body string true "Resident's Token" @Success 200 {object} models.QuestionsAttachments @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Condos Don't Exists or Condos without QuestionsAttachments @Failure 409 Condo's QuestionAttachment Limit reached @router / [post]

func (*QuestionsAttachmentsController) Put

Put ... @Title Put @Description update the QuestionsAttachments @Accept json @Param Authorization header string true "Resident's Token" @Param id param string true "QuestionAttachment's id" @Param name body string false "QuestionAttachment's new Name" @Success 200 {object} models.QuestionsAttachments @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 QuestionsAttachments Don't exists @router /:id [put]

func (*QuestionsAttachmentsController) RestoreFromTrash

func (c *QuestionsAttachmentsController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*QuestionsAttachmentsController) URLMapping

func (c *QuestionsAttachmentsController) URLMapping()

URLMapping ...

type QuestionsController

type QuestionsController struct {
	BaseController
}

QuestionsController operations for Questions

func (*QuestionsController) Delete

func (c *QuestionsController) Delete()

Delete ... @Title Delete @Description delete the Questions @router /:id [delete]

func (*QuestionsController) GetAllFromTrash

func (c *QuestionsController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [get]

func (*QuestionsController) GetSelf

func (c *QuestionsController) GetSelf()

GetSelf ... @Title Get Self @Description Get Self @Accept json @Param Authorization header string true "Watcher's Token or Resident's Token" @Success 200 {array} models.Questions @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Condos Don't Exists or Condos without Questions @router /self [get]

func (*QuestionsController) Post

func (c *QuestionsController) Post()

Post ... @Title Post @Description create Questions @Accept json @Param Authorization header string true "Resident's Token" @Param name body string true "Resident's Token" @Success 200 {object} models.Questions @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Condos Don't Exists or Condos without Questions @Failure 409 Condo's Question Limit reached @router / [post]

func (*QuestionsController) Put

func (c *QuestionsController) Put()

Put ... @Title Put @Description update the Questions @Accept json @Param Authorization header string true "Resident's Token" @Param id param string true "Question's id" @Param name body string false "Question's new Name" @Success 200 {object} models.Questions @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Questions Don't exists @router /:id [put]

func (*QuestionsController) RestoreFromTrash

func (c *QuestionsController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*QuestionsController) URLMapping

func (c *QuestionsController) URLMapping()

URLMapping ...

type ResidentsController

type ResidentsController struct {
	BaseController
}

ResidentsController operations for Residents

func (*ResidentsController) AddImage

func (c *ResidentsController) AddImage()

AddImage ... @Title Add Image @Description Add Image @Accept plain @Param Authorization header string true "Supervisor's Token" @Param id path int true "Resident's id" @Param faces formData string true "Resident's id" @Success 200 {object} models.Residents @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Residents not Found @Failure 413 File size too High @router /:id/face [post]

func (*ResidentsController) ChangePassword

func (c *ResidentsController) ChangePassword()

ChangePassword .. @Title Change Password @Description Change Password @Accept json @Success 200 {object} models.Residents @Failure 400 Bad Request @Failure 403 Invalid Token @router /change-password/:token [put]

func (*ResidentsController) ChangePublicInfo

func (c *ResidentsController) ChangePublicInfo()

ChangePublicInfo ... @Title ChangePublicInfo @Description update the Residents's ChangePublicInfo @router /change-public-info [put]

func (*ResidentsController) CheckEmail

func (c *ResidentsController) CheckEmail()

CheckEmail .. @Title Check Email @Description CheckEmail only verify if email exist @Accept json @Success 200 {object} models.Supervisors @Failure 400 Bad Request @Failure 403 Invalid Token @router /check-email [post]

func (*ResidentsController) Delete

func (c *ResidentsController) Delete()

Delete ... @Title Delete @Description delete the Residents @router /:id [delete]

func (*ResidentsController) GenerateChangePasswordToken

func (c *ResidentsController) GenerateChangePasswordToken()

GenerateChangePasswordToken .. @Title Generate Change Password Token @Description Generate Change Password Token @Accept json @Success 200 {object} models.Residents @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 email without Data @router /:email/change-password/ [post]

func (*ResidentsController) GetAll

func (c *ResidentsController) GetAll()

GetAll ... @Title Get All @Description get Residents @router / [get]

func (*ResidentsController) GetAllFromTrash

func (c *ResidentsController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*ResidentsController) GetByEmail

func (c *ResidentsController) GetByEmail()

GetByEmail ... @Title Get By Email @Description get By Email by id @router /email/:email [get]

func (*ResidentsController) GetFaceByUUID

func (c *ResidentsController) GetFaceByUUID()

GetFaceByUUID ... @Title Get Face By UUID @Description Get Face By UUID @Accept plain @Param uuid path string true "Resident's face uuid" @Success 200 {string} Face Image @Failure 400 Bad Request @Failure 404 Face not Found @router /face/:uuid [get]

func (*ResidentsController) GetOne

func (c *ResidentsController) GetOne()

GetOne ... @Title Get One @Description get Residents by id @router /:id [get]

func (*ResidentsController) GetSelf

func (c *ResidentsController) GetSelf()

GetSelf ... @Title Get Self @Description Get Self @router /self [get]

func (*ResidentsController) Login

func (c *ResidentsController) Login()

Login ... @Title Login @Description Login @router /login [post]

func (*ResidentsController) Post

func (c *ResidentsController) Post()

Post ... @Title Post @Description create Residents @Accept json @Param Authorization header string true "Supervisor's Token" @Param username body string true "resident's Username" @Param password body string true "resident's password" @Param phone body string false "resident's phone" @Param Resident body object false "Resident object (first name)" @Success 200 {object} models.Residents @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Zones Don't exists @Failure 409 Condo's User limit reached @router / [post]

func (*ResidentsController) Put

func (c *ResidentsController) Put()

Put ... @Title Put @Description update the Residents @router /:id [put]

func (*ResidentsController) RedirectChangePassword

func (c *ResidentsController) RedirectChangePassword()

RedirectChangePassword .. @Title Redirect Change Password @Description Redirect Change Password @Accept json @Failure 400 Bad Request @Failure 403 Invalid Token @router /change-password/redirect [get]

func (*ResidentsController) RestoreFromTrash

func (c *ResidentsController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*ResidentsController) URLMapping

func (c *ResidentsController) URLMapping()

URLMapping ...

type Subscriber

type Subscriber struct {
	Name    string
	CondoID int
	Conn    *websocket.Conn // Only for WebSocket users; otherwise nil.
}

Subscriber ...

type Subscription

type Subscription struct {
	Archive []models.Event      // All the events from the archive.
	New     <-chan models.Event // New events coming in.
}

Subscription ...

type SupervisorsController

type SupervisorsController struct {
	BaseController
}

SupervisorsController operations for Supervisors

func (*SupervisorsController) ChangePassword

func (c *SupervisorsController) ChangePassword()

ChangePassword .. @Title Change Password @Description Change Password @Accept json @Success 200 {object} models.Supervisors @Failure 400 Bad Request @Failure 403 Invalid Token @router /change-password/:token [put]

func (*SupervisorsController) ChangePasswordSelf

func (c *SupervisorsController) ChangePasswordSelf()

ChangePasswordSelf ... @Title Put @Description update the ChangePassword @router /change-password/self [put]

func (*SupervisorsController) Delete

func (c *SupervisorsController) Delete()

Delete ... @Title Delete @Description delete the Supervisors @router /:id [delete]

func (*SupervisorsController) GenerateChangePasswordToken

func (c *SupervisorsController) GenerateChangePasswordToken()

GenerateChangePasswordToken .. @Title Generate Change Password Token @Description Generate Change Password Token @Accept json @Success 200 {object} models.Watchers @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 email without Data @router /:username/change-password/ [post]

func (*SupervisorsController) GetAll

func (c *SupervisorsController) GetAll()

GetAll ... @Title Get All @Description get Supervisors @router / [get]

func (*SupervisorsController) GetAllFromTrash

func (c *SupervisorsController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*SupervisorsController) GetOne

func (c *SupervisorsController) GetOne()

GetOne ... @Title Get One @Description get Supervisors by id @router /:id [get]

func (*SupervisorsController) Login

func (c *SupervisorsController) Login()

Login ... @Title Login @Description Login @router /login [post]

func (*SupervisorsController) Post

func (c *SupervisorsController) Post()

Post ... @Title Post @Description create Supervisors @router / [post]

func (*SupervisorsController) Put

func (c *SupervisorsController) Put()

Put ... @Title Put @Description update the Supervisors @router /:id [put]

func (*SupervisorsController) RestoreFromTrash

func (c *SupervisorsController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*SupervisorsController) URLMapping

func (c *SupervisorsController) URLMapping()

URLMapping ...

type TasksController

type TasksController struct {
	BaseController
}

TasksController operations for Holidays

func (*TasksController) ChangeStatus

func (c *TasksController) ChangeStatus()

ChangeStatus ... @Title Change Status @Description ChangeStatus @router /:id/status/:approved [put]

func (*TasksController) Delete

func (c *TasksController) Delete()

Delete ... @Title Delete @Description delete the Tasks @router /:id [delete]

func (*TasksController) GetAllFromTrash

func (c *TasksController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*TasksController) GetByCondosID

func (c *TasksController) GetByCondosID()

GetByCondosID ... @Title Get By CondosID @Description Get By CondosID @router /condos/self [get]

func (*TasksController) GetByWorkersID

func (c *TasksController) GetByWorkersID()

GetByWorkersID ... @Title Get By WorkersID @Description Get By WorkersID @router /workers/:id [get]

func (*TasksController) GetOne

func (c *TasksController) GetOne()

GetOne ... @Title Get One @Description get Tasks by id @router /:id [get]

func (*TasksController) GetSelf

func (c *TasksController) GetSelf()

GetSelf ... @Title Get Self @Description Get Self @router /self [get]

func (*TasksController) Post

func (c *TasksController) Post()

Post ... @Title Post @Description create Tasks @router / [post]

func (*TasksController) Put

func (c *TasksController) Put()

Put ... @Title Put @Description update the Tasks @Accept json @Param Authorization header string true "Supervisor's Token" @Param id param int true "Task's id" @Success 200 {object} models.Tasks @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Task's Dont exists @router /:id [put]

func (*TasksController) RequestTasks

func (c *TasksController) RequestTasks()

RequestTasks ... @Title Request Tasks @Description Request Tasks @Accept json @Success 200 {string} @Failure 400 Bad Request @Failure 403 Invalid Token @router /request/:id/supervisor [post]

func (*TasksController) RestoreFromTrash

func (c *TasksController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*TasksController) URLMapping

func (c *TasksController) URLMapping()

URLMapping ...

type VerificationsController

type VerificationsController struct {
	BaseController
}

VerificationsController operations for Verifications

func (*VerificationsController) AddImage

func (c *VerificationsController) AddImage()

AddImage ... @Title add Image @Description add Image @router /:id/image [put]

func (*VerificationsController) Comment

func (c *VerificationsController) Comment()

Comment ... @Title Comment @Description comment the Verification @router /:id/comment [put]

func (*VerificationsController) Delete

func (c *VerificationsController) Delete()

Delete ... @Title Delete @Description delete the Verifications @router /:id [delete]

func (*VerificationsController) GetAll

func (c *VerificationsController) GetAll()

GetAll ... @Title Get All @Description get Verifications @router / [get]

func (*VerificationsController) GetAllFromTrash

func (c *VerificationsController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*VerificationsController) GetImagesByUUID

func (c *VerificationsController) GetImagesByUUID()

GetImagesByUUID ... @Title Get By UUID @Description Get image By UUID @router /image/:uuid [get]

func (*VerificationsController) GetOne

func (c *VerificationsController) GetOne()

GetOne ... @Title Get One @Description get Verifications by id @router /:id [get]

func (*VerificationsController) NewRoute

func (c *VerificationsController) NewRoute()

NewRoute ... @Title New Route @Description New Route @router /zones/:id/route [post]

func (*VerificationsController) NewRouteExecute

func (c *VerificationsController) NewRouteExecute()

NewRouteExecute ... @Title New Route Execute @Description New Route Execute @router /route/:token [post]

func (*VerificationsController) Post

func (c *VerificationsController) Post()

Post ... @Title Post @Description create Verifications @router / [post]

func (*VerificationsController) Put

func (c *VerificationsController) Put()

Put ... @Title Put @Description update the Verifications @router /:id [put]

func (*VerificationsController) RestoreFromTrash

func (c *VerificationsController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*VerificationsController) SetStatus

func (c *VerificationsController) SetStatus()

SetStatus .. @Title Set Status @Description SetStatus only set viewed to true @Accept json @Success 200 Retrieve records affected @Failure 400 Bad Request @Failure 403 Invalid Token @router /set-status/:id [get]

func (*VerificationsController) URLMapping

func (c *VerificationsController) URLMapping()

URLMapping ...

type VotesController

type VotesController struct {
	BaseController
}

VotesController operations for Votes

func (*VotesController) Delete

func (c *VotesController) Delete()

Delete ... @Title Delete @Description delete the Votes @router /:id [delete]

func (*VotesController) GetAllFromTrash

func (c *VotesController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [get]

func (*VotesController) Post

func (c *VotesController) Post()

Post ... @Title Post @Description create Votes @Accept json @Param Authorization header string true "Supervisor's Token" @Param name body string true "Supervisor's Token" @Success 200 {object} models.Votes @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Condos Don't Exists or Condos without Votes @Failure 409 Condo's Zone Limit reached @router / [post]

func (*VotesController) Put

func (c *VotesController) Put()

Put ... @Title Put @Description update the Votes @Accept json @Param Authorization header string true "Supervisor's Token" @Param id param string true "Zone's id" @Param name body string false "Zone's new Name" @Success 200 {object} models.Votes @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Votes Don't exists @router /:id [put]

func (*VotesController) RestoreFromTrash

func (c *VotesController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*VotesController) URLMapping

func (c *VotesController) URLMapping()

URLMapping ...

type WatchersController

type WatchersController struct {
	BaseController
}

WatchersController operations for Watchers

func (*WatchersController) ChangePassword

func (c *WatchersController) ChangePassword()

ChangePassword .. @Title Change Password @Description Change Password @Accept json @Success 200 {object} models.Watchers @Failure 400 Bad Request @Failure 403 Invalid Token @router /change-password/:token [put]

func (*WatchersController) ChangePublicInfo

func (c *WatchersController) ChangePublicInfo()

ChangePublicInfo ... @Title ChangePublicInfo @Description update the Watchers's ChangePublicInfo @router /change-public-info [put]

func (*WatchersController) Delete

func (c *WatchersController) Delete()

Delete ... @Title Delete @Description delete the Watchers @router /:id [delete]

func (*WatchersController) GenerateChangePasswordToken

func (c *WatchersController) GenerateChangePasswordToken()

GenerateChangePasswordToken .. @Title Generate Change Password Token @Description Generate Change Password Token @Accept json @Success 200 {object} models.Watchers @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 email without Data @router /:username/change-password/ [post]

func (*WatchersController) GetAll

func (c *WatchersController) GetAll()

GetAll ... @Title Get All @Description get Watchers @router / [get]

func (*WatchersController) GetAllFromTrash

func (c *WatchersController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*WatchersController) GetByUsername

func (c *WatchersController) GetByUsername()

GetByUsername ... @Title Get By Username @Description get By Username by id @router /username/:username [get]

func (*WatchersController) GetOne

func (c *WatchersController) GetOne()

GetOne ... @Title Get One @Description get Watchers by id @router /:id [get]

func (*WatchersController) GetSelf

func (c *WatchersController) GetSelf()

GetSelf ... @Title Get Self @Description Get Self @router /self [get]

func (*WatchersController) GetVerificationsByDate

func (c *WatchersController) GetVerificationsByDate()

GetVerificationsByDate ... @Title Get Verifications By Date @Description Get Verifications By Date @router /:id/verifications/:date [get]

func (*WatchersController) GetWatchersVerificationsByMonth

func (c *WatchersController) GetWatchersVerificationsByMonth()

GetWatchersVerificationsByMonth .. @Title Get Watchers Verifications By Month @Description Get Watchers Verifications By Month @Accept json @Param Authorization header string true "Supervisor's Token" @Param year path int true "year's Date" @Param month path int true "month's Date" @Success 200 {array} models.Verfications @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Month without Data @router /:id/verifications/:year/:month [get]

func (*WatchersController) Login

func (c *WatchersController) Login()

Login ... @Title Login @Description Login @router /login [post]

func (*WatchersController) Post

func (c *WatchersController) Post()

Post ... @Title Post @Description create Watchers @Accept json @Param Authorization header string true "Supervisor's Token" @Param username body string true "watcher's Username" @Param password body string true "watcher's password" @Param phone body string false "watcher's phone" @Param worker body object false "Worker object (first name)" @Success 200 {object} models.Watchers @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Zones Don't exists @Failure 409 Condo's User limit reached @router / [post]

func (*WatchersController) Put

func (c *WatchersController) Put()

Put ... @Title Put @Description update the Watchers @router /:id [put]

func (*WatchersController) RedirectChangePassword

func (c *WatchersController) RedirectChangePassword()

RedirectChangePassword .. @Title Redirect Change Password @Description Redirect Change Password @Accept json @Failure 400 Bad Request @Failure 403 Invalid Token @router /change-password/redirect [get]

func (*WatchersController) RestoreFromTrash

func (c *WatchersController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*WatchersController) URLMapping

func (c *WatchersController) URLMapping()

URLMapping ...

type WebSocketController

type WebSocketController struct {
	BaseController
}

WebSocketController handles WebSocket requests.

func (*WebSocketController) Join

func (c *WebSocketController) Join()

Join ... @Title Join @Description Join @router /join [get]

func (*WebSocketController) Test

func (c *WebSocketController) Test()

Test ... @Title Test @Description test @router /test [get]

type WorkersController

type WorkersController struct {
	BaseController
}

WorkersController ...

func (*WorkersController) AddImage

func (c *WorkersController) AddImage()

AddImage ... @Title Add Image @Description Add Image @Accept plain @Param Authorization header string true "Supervisor's Token" @Param id path int true "worker's id" @Param faces formData string true "worker's id" @Success 200 {object} models.Workers @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Workers not Found @Failure 413 File size too High @router /:id/face [post]

func (*WorkersController) Approve

func (c *WorkersController) Approve()

Approve .. @Title Approve Worker @Description Approve Worker @Accept json @Param id path string true "Pending approve Worker's id" @Success 200 {object} models.Workers @Failure 400 Bad Request @Failure 404 Worker not Found @Failure 409 Worker already approved @router /:id/approve [patch]

func (*WorkersController) Delete

func (c *WorkersController) Delete()

Delete ... @Title Delete @Description delete the Workers @router /:id [delete]

func (*WorkersController) DownloadAssistancesDataByMonth

func (c *WorkersController) DownloadAssistancesDataByMonth()

DownloadAssistancesDataByMonth ... @Titile Download Assistances Data By Month @Description Download Assistances Data By Month @Accept plain @Param id path int true "Worker's id" @Param year path int true "year's Date" @Param month path int true "month's Date" @Success 200 {object} models.Workers @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Worker or Assistances not Found @router /:id/data/:year/:month/download [get]

func (*WorkersController) DownloadAssistancesDataByYear

func (c *WorkersController) DownloadAssistancesDataByYear()

DownloadAssistancesDataByYear ... @Title Download Assistances Data By Year @Description Download Assistances Data By Year @Accept plain @Param id path int true "Worker's id" @Param year path int true "year's Date" @Success 200 {string} Csv data @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Worker or Assistances not Found @router /:id/data/:year/download [get]

func (*WorkersController) GetAll

func (c *WorkersController) GetAll()

GetAll ... @Title Get All @Description get Workers @router / [get]

func (*WorkersController) GetAllFromTrash

func (c *WorkersController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [patch]

func (*WorkersController) GetAssistancesDataByMonth

func (c *WorkersController) GetAssistancesDataByMonth()

GetAssistancesDataByMonth .. @Title Get Assistances Data By Month @Description Get Assistances Data By Month @Accept json @Param Authorization header string true "Supervisor's Token" @Param year path int true "year's Date" @Param month path int true "month's Date" @Success 200 {object} models.Workers @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Month without Data @router /:id/data/:year/:month [get]

func (*WorkersController) GetAssistancesDataByYear

func (c *WorkersController) GetAssistancesDataByYear()

GetAssistancesDataByYear .. @Title Get Assistances Data By Year @Description Get Assistances Data By Year @Accept json @Param Authorization header string true "Supervisor's Token" @Param year path int true "year's Date" @Success 200 {object} models.Workers @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Year without Data @router /:id/data/:year/ [get]

func (*WorkersController) GetFaceByUUID

func (c *WorkersController) GetFaceByUUID()

GetFaceByUUID ... @Title Get Face By UUID @Description Get Face By UUID @Accept plain @Param uuid path string true "worker's face uuid" @Success 200 {string} Face Image @Failure 400 Bad Request @Failure 404 Face not Found @router /face/:uuid [get]

func (*WorkersController) GetOne

func (c *WorkersController) GetOne()

GetOne ... @Title Get One @Description get Workers by id @Accept json @Param id path string true "Worker's id" @Success 200 {object} models.Workers @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Worker Don't exist @router /:id [get]

func (*WorkersController) GetSelf

func (c *WorkersController) GetSelf()

GetSelf ... @Title Get Self @Description Get Workers from Watcher's Condo or Supervisor's Condo @Accept json @Param Authorization header string true "Watcher's Token or Supervisor's Token" @Success 200 {array} models.Workers @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Condos without Workers @router /self [get]

func (*WorkersController) Post

func (c *WorkersController) Post()

Post ... @Title Post @Description create Workers @Accept json @Param Authorization header string true "Watcher's Token" @Param first_name body string true "New Worker's first name" @Success 201 {object} models.Workers @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 409 Condo's user limit reached @router / [post]

func (*WorkersController) Put

func (c *WorkersController) Put()

Put ... @Title Put @Description update the Workers @router /:id [put]

func (*WorkersController) RestoreFromTrash

func (c *WorkersController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*WorkersController) URLMapping

func (c *WorkersController) URLMapping()

URLMapping ...

type ZonesController

type ZonesController struct {
	BaseController
}

ZonesController operations for Zones

func (*ZonesController) Delete

func (c *ZonesController) Delete()

Delete ... @Title Delete @Description delete the Zones @router /:id [delete]

func (*ZonesController) GetAllFromTrash

func (c *ZonesController) GetAllFromTrash()

GetAllFromTrash ... @Title Get All From Trash @Description Get All From Trash @router /trashed [get]

func (*ZonesController) GetSelf

func (c *ZonesController) GetSelf()

GetSelf ... @Title Get Self @Description Get Self @Accept json @Param Authorization header string true "Watcher's Token or Supervisor's Token" @Success 200 {array} models.Zones @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Condos Don't Exists or Condos without Zones @router /self [get]

func (*ZonesController) Post

func (c *ZonesController) Post()

Post ... @Title Post @Description create Zones @Accept json @Param Authorization header string true "Supervisor's Token" @Param name body string true "Supervisor's Token" @Success 200 {object} models.Zones @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Condos Don't Exists or Condos without Zones @Failure 409 Condo's Zone Limit reached @router / [post]

func (*ZonesController) Put

func (c *ZonesController) Put()

Put ... @Title Put @Description update the Zones @Accept json @Param Authorization header string true "Supervisor's Token" @Param id param string true "Zone's id" @Param name body string false "Zone's new Name" @Success 200 {object} models.Zones @Failure 400 Bad Request @Failure 403 Invalid Token @Failure 404 Zones Don't exists @router /:id [put]

func (*ZonesController) RestoreFromTrash

func (c *ZonesController) RestoreFromTrash()

RestoreFromTrash ... @Title Restore From Trash @Description Restore From Trash @router /:id/restore [put]

func (*ZonesController) URLMapping

func (c *ZonesController) URLMapping()

URLMapping ...

Directories

Path Synopsis
services

Jump to

Keyboard shortcuts

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