Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAuthMiddleware ¶
func CreateAuthMiddleware(repo repo.UserRepository) (err error)
CreateAuthMiddleware creates the authentication middleware
Types ¶
type GeneralResponse ¶
type GeneralResponse struct { Code int `json:"code" example:"0"` Message string `json:"message" example:"success"` Data interface{} `json:"data" swaggertype:"object"` }
GeneralResponse is used for typical API response
type JobController ¶
type JobController struct {
// contains filtered or unexported fields
}
JobController handles job related APIs
func NewJobController ¶
func NewJobController(jobRepo repo.JobRepository, jobParticipantRepo repo.JobParticipantRepository, projectRepo repo.ProjectRepository, siteRepo repo.SiteRepository, projectDataRepo repo.ProjectDataRepository, modelRepo repo.ModelRepository) *JobController
NewJobController returns a controller instance to handle job API requests
func (*JobController) Route ¶
func (controller *JobController) Route(r *gin.RouterGroup)
Route set up route mappings to job related APIs
type LocalDataController ¶
type LocalDataController struct {
// contains filtered or unexported fields
}
LocalDataController handles local data related APIs
func NewLocalDataController ¶
func NewLocalDataController(localDataRepo repo.LocalDataRepository, siteRepo repo.SiteRepository, projectRepo repo.ProjectRepository, projectDataRepo repo.ProjectDataRepository) *LocalDataController
NewLocalDataController returns a controller instance to handle local data API requests
func (*LocalDataController) Route ¶
func (controller *LocalDataController) Route(r *gin.RouterGroup)
Route set up route mappings to local data related APIs
type ModelController ¶
type ModelController struct {
// contains filtered or unexported fields
}
ModelController handles model related APIs
func NewModelController ¶
func NewModelController(modelRepo repo.ModelRepository, modelDeploymentRepo repo.ModelDeploymentRepository, siteRepo repo.SiteRepository, projectRepo repo.ProjectRepository) *ModelController
NewModelController returns a controller instance to handle model API requests
func (*ModelController) Route ¶
func (controller *ModelController) Route(r *gin.RouterGroup)
Route set up route mappings to model related APIs
type ProjectController ¶
type ProjectController struct {
// contains filtered or unexported fields
}
ProjectController handles project related APIs
func NewProjectController ¶
func NewProjectController(projectRepo repo.ProjectRepository, siteRepo repo.SiteRepository, participantRepo repo.ProjectParticipantRepository, invitationRepo repo.ProjectInvitationRepository, projectDataRepo repo.ProjectDataRepository, localDataRepo repo.LocalDataRepository, jobRepo repo.JobRepository, jobParticipantRepo repo.JobParticipantRepository, modelRepo repo.ModelRepository) *ProjectController
NewProjectController returns a controller instance to handle project API requests
func (*ProjectController) Route ¶
func (controller *ProjectController) Route(r *gin.RouterGroup)
Route set up route mappings to project related APIs
type SiteController ¶
type SiteController struct {
// contains filtered or unexported fields
}
SiteController provides API handlers for the site related APIs
func NewSiteController ¶
func NewSiteController(repo repo.SiteRepository) *SiteController
NewSiteController returns a controller instance to handle site API requests
func (*SiteController) Route ¶
func (controller *SiteController) Route(r *gin.RouterGroup)
Route set up route mappings to site related APIs
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
UserController manages user related API calls
func NewUserController ¶
func NewUserController(repo repo.UserRepository) *UserController
NewUserController returns a controller instance to handle user API requests
func (*UserController) Route ¶
func (controller *UserController) Route(r *gin.RouterGroup)
Route set up route mappings to user related APIs