Documentation ¶
Overview ¶
Package controller provides controller
Package controller provides the controllers for handling HTTP requests and managing the application's business logic.
Index ¶
- Constants
- func AddRouterForAICCFinetuneController(rg *gin.RouterGroup, as app.AICCFinetuneService, pros papp.PromotionService)
- func AddRouterForActivityController(rg *gin.RouterGroup, repo repository.Activity, user userrepo.User, ...)
- func AddRouterForBigModelController(rg *gin.RouterGroup, s app.BigModelService, us userapp.RegService)
- func AddRouterForChallengeController(rg *gin.RouterGroup, crepo repository.Competition, qrepo repository.AIQuestion, ...)
- func AddRouterForCloudController(rg *gin.RouterGroup, s app.CloudService, us userapp.WhiteListService)
- func AddRouterForCompetitionController(rg *gin.RouterGroup, s app.CompetitionService, us userapp.RegService, ...)
- func AddRouterForComputilityWebController(rg *gin.RouterGroup, s app.ComputilityAppService)
- func AddRouterForCourseController(rg *gin.RouterGroup, s app.CourseService, us userapp.RegService, ...)
- func AddRouterForDatasetController(rg *gin.RouterGroup, user userrepo.User, repo repository.Dataset, ...)
- func AddRouterForFinetuneController(rg *gin.RouterGroup, fs finetune.Finetune, repo repository.Finetune, ...)
- func AddRouterForHomeController(rg *gin.RouterGroup, course courseapp.CourseService, ...)
- func AddRouterForInferenceController(rg *gin.RouterGroup, p platform.RepoFile, repo spaceappApprepo.Inference, ...)
- func AddRouterForInferenceInternalController(rg *gin.RouterGroup, p platform.RepoFile, repo spaceappApprepo.Inference, ...)
- func AddRouterForLikeController(rg *gin.RouterGroup, repo repository.Like, user userrepo.User, ...)
- func AddRouterForLoginController(rg *gin.RouterGroup, us userapp.UserService, auth authing.User, ...)
- func AddRouterForModelController(rg *gin.RouterGroup, user userrepo.User, repo repository.Model, ...)
- func AddRouterForProjectController(rg *gin.RouterGroup, user userrepo.User, repo spacerepo.Project, ...)
- func AddRouterForProjectInternalController(rg *gin.RouterGroup, user userrepo.User, repo spacerepo.Project, ...)
- func AddRouterForPromotionController(rg *gin.RouterGroup, pros app.PromotionService, ps app.PointsService)
- func AddRouterForRepoFileController(rg *gin.RouterGroup, p platform.RepoFile, model repository.Model, ...)
- func AddRouterForSearchController(rg *gin.RouterGroup, user userrepo.User, proj spacerepo.Project, ...)
- func AddRouterForTagsController(rg *gin.RouterGroup, repo repository.Tags)
- func AddRouterForTrainingController(rg *gin.RouterGroup, ts training.Training, repo repository.Training, ...)
- func AddRouterForUserController(rg *gin.RouterGroup, us userapp.UserService, repo userrepo.User, ...)
- func AddRouterForUserPointsController(rg *gin.RouterGroup, s app.UserPointsAppService, ts app.TaskAppService)
- func ClearSensitiveInfoMiddleware() gin.HandlerFunc
- func EncryptHelperToken() utils.SymmetricEncryption
- func GetOperateLog(ctx *gin.Context) string
- func Init(cfg *APIConfig, l *logrus.Entry) error
- type AICCFinetuneController
- func (ctl *AICCFinetuneController) Create(ctx *gin.Context)
- func (ctl *AICCFinetuneController) Delete(ctx *gin.Context)
- func (ctl *AICCFinetuneController) Get(ctx *gin.Context)
- func (ctl *AICCFinetuneController) GetResultDownloadURL(ctx *gin.Context)
- func (ctl *AICCFinetuneController) List(ctx *gin.Context)
- func (ctl *AICCFinetuneController) ListByWS(ctx *gin.Context)
- func (ctl *AICCFinetuneController) Terminate(ctx *gin.Context)
- func (ctl *AICCFinetuneController) UploadData(ctx *gin.Context)
- type AICCKeyValue
- type APIConfig
- type ActivityController
- type AddCourseRelatedProjectRequest
- type BigModelController
- func (ctl *BigModelController) AIDetector(ctx *gin.Context)
- func (ctl *BigModelController) AddDigg(ctx *gin.Context)
- func (ctl *BigModelController) AddLike(ctx *gin.Context)
- func (ctl *BigModelController) AddPublic(ctx *gin.Context)
- func (ctl *BigModelController) ApplyApi(ctx *gin.Context)
- func (ctl *BigModelController) BaiChuan(ctx *gin.Context)
- func (ctl *BigModelController) CancelDigg(ctx *gin.Context)
- func (ctl *BigModelController) CancelLike(ctx *gin.Context)
- func (ctl *BigModelController) CancelPublic(ctx *gin.Context)
- func (ctl *BigModelController) GLM2(ctx *gin.Context)
- func (ctl *BigModelController) GenDownloadURL(ctx *gin.Context)
- func (ctl *BigModelController) GenWuKongSamples(ctx *gin.Context)
- func (ctl *BigModelController) GetApiInfo(ctx *gin.Context)
- func (ctl *BigModelController) GetPublicsGlobal(ctx *gin.Context)
- func (ctl *BigModelController) GetUserApplyRecord(ctx *gin.Context)
- func (ctl *BigModelController) IFlytekSpark(ctx *gin.Context)
- func (ctl *BigModelController) IsApplied(ctx *gin.Context)
- func (ctl *BigModelController) LLAMA2(ctx *gin.Context)
- func (ctl *BigModelController) ListLike(ctx *gin.Context)
- func (ctl *BigModelController) ListLuoJiaRecord(ctx *gin.Context)
- func (ctl *BigModelController) ListPublic(ctx *gin.Context)
- func (ctl *BigModelController) LuoJia(ctx *gin.Context)
- func (ctl *BigModelController) LuoJiaUploadPicture(ctx *gin.Context)
- func (ctl *BigModelController) RefreshApiToken(ctx *gin.Context)
- func (ctl *BigModelController) SkyWork(ctx *gin.Context)
- func (ctl *BigModelController) WuKong(ctx *gin.Context)
- func (ctl *BigModelController) WuKongAsync(ctx *gin.Context)
- func (ctl *BigModelController) WuKongLastFinishedTask(ctx *gin.Context)
- func (ctl *BigModelController) WuKongRank(ctx *gin.Context)
- func (ctl *BigModelController) WukongAPI(ctx *gin.Context)
- type ChallengeController
- type CloudController
- func (ctl *CloudController) CanRead(ctx *gin.Context)
- func (ctl *CloudController) Get(ctx *gin.Context)
- func (ctl *CloudController) GetHttp(ctx *gin.Context)
- func (ctl *CloudController) List(ctx *gin.Context)
- func (ctl *CloudController) ReleasePod(ctx *gin.Context)
- func (ctl *CloudController) Subscribe(ctx *gin.Context)
- func (ctl *CloudController) WsSendReleasedPod(ctx *gin.Context)
- type CompetitionController
- func (ctl *CompetitionController) AddRelatedProject(ctx *gin.Context)
- func (ctl *CompetitionController) Apply(ctx *gin.Context)
- func (ctl *CompetitionController) ChangeName(ctx *gin.Context)
- func (ctl *CompetitionController) CreateTeam(ctx *gin.Context)
- func (ctl *CompetitionController) DeleteMember(ctx *gin.Context)
- func (ctl *CompetitionController) Dissolve(ctx *gin.Context)
- func (ctl *CompetitionController) Get(ctx *gin.Context)
- func (ctl *CompetitionController) GetMyTeam(ctx *gin.Context)
- func (ctl *CompetitionController) GetRankingList(ctx *gin.Context)
- func (ctl *CompetitionController) GetRegisterInfo(ctx *gin.Context)
- func (ctl *CompetitionController) GetSubmissions(ctx *gin.Context)
- func (ctl *CompetitionController) JoinTeam(ctx *gin.Context)
- func (ctl *CompetitionController) List(ctx *gin.Context)
- func (ctl *CompetitionController) QuitTeam(ctx *gin.Context)
- func (ctl *CompetitionController) Submit(ctx *gin.Context)
- func (ctl *CompetitionController) TransferLeader(ctx *gin.Context)
- type Compute
- type ComputilityWebController
- type ContainFileInfo
- type CourseController
- func (ctl *CourseController) AddCourseRelatedProject(ctx *gin.Context)
- func (ctl *CourseController) AddPlayRecord(ctx *gin.Context)
- func (ctl *CourseController) Apply(ctx *gin.Context)
- func (ctl *CourseController) Get(ctx *gin.Context)
- func (ctl *CourseController) GetAssignment(ctx *gin.Context)
- func (ctl *CourseController) GetCertification(ctx *gin.Context)
- func (ctl *CourseController) GetRegisterInfo(ctx *gin.Context)
- func (ctl *CourseController) GetSubmissions(ctx *gin.Context)
- func (ctl *CourseController) List(ctx *gin.Context)
- func (ctl *CourseController) ListAssignments(ctx *gin.Context)
- type DatasetController
- func (ctl *DatasetController) Check(ctx *gin.Context)
- func (ctl *DatasetController) Create(ctx *gin.Context)
- func (ctl *DatasetController) Delete(ctx *gin.Context)
- func (ctl *DatasetController) Get(ctx *gin.Context)
- func (ctl *DatasetController) List(ctx *gin.Context)
- func (ctl *DatasetController) ListGlobal(ctx *gin.Context)
- func (ctl *DatasetController) SetTags(ctx *gin.Context)
- func (ctl *DatasetController) Update(ctx *gin.Context)
- type EmailCode
- type EmailSend
- type FinetuneController
- func (ctl *FinetuneController) Create(ctx *gin.Context)
- func (ctl *FinetuneController) Delete(ctx *gin.Context)
- func (ctl *FinetuneController) List(ctx *gin.Context)
- func (ctl *FinetuneController) Log(ctx *gin.Context)
- func (ctl *FinetuneController) Terminate(ctx *gin.Context)
- func (ctl *FinetuneController) WatchFinetunes(ctx *gin.Context)
- func (ctl *FinetuneController) WatchSingle(ctx *gin.Context)
- type FinetuneCreateRequest
- type HomeController
- type InferenceController
- type InferenceInternalController
- type KeyValue
- type LikeController
- type LoginController
- type ModelController
- func (ctl *ModelController) AddRelatedDataset(ctx *gin.Context)
- func (ctl *ModelController) Check(ctx *gin.Context)
- func (ctl *ModelController) Create(ctx *gin.Context)
- func (ctl *ModelController) Delete(ctx *gin.Context)
- func (ctl *ModelController) Get(ctx *gin.Context)
- func (ctl *ModelController) List(ctx *gin.Context)
- func (ctl *ModelController) ListGlobal(ctx *gin.Context)
- func (ctl *ModelController) RemoveRelatedDataset(ctx *gin.Context)
- func (ctl *ModelController) SetTags(ctx *gin.Context)
- func (ctl *ModelController) Update(ctx *gin.Context)
- type PlayRecordRequest
- type ProjectController
- func (ctl *ProjectController) AddRelatedDataset(ctx *gin.Context)
- func (ctl *ProjectController) AddRelatedModel(ctx *gin.Context)
- func (ctl *ProjectController) Check(ctx *gin.Context)
- func (ctl *ProjectController) Create(ctx *gin.Context)
- func (ctl *ProjectController) Delete(ctx *gin.Context)
- func (ctl *ProjectController) Fork(ctx *gin.Context)
- func (ctl *ProjectController) Get(ctx *gin.Context)
- func (ctl *ProjectController) List(ctx *gin.Context)
- func (ctl *ProjectController) ListGlobal(ctx *gin.Context)
- func (ctl *ProjectController) RemoveRelatedDataset(ctx *gin.Context)
- func (ctl *ProjectController) RemoveRelatedModel(ctx *gin.Context)
- func (ctl *ProjectController) SetTags(ctx *gin.Context)
- func (ctl *ProjectController) Update(ctx *gin.Context)
- type ProjectInternalController
- type PromotionController
- func (ctl *PromotionController) Apply(ctx *gin.Context)
- func (ctl *PromotionController) Get(ctx *gin.Context)
- func (ctl *PromotionController) GetUserPoints(ctx *gin.Context)
- func (ctl *PromotionController) GetUserRanking(ctx *gin.Context)
- func (ctl *PromotionController) GetUserRegistration(ctx *gin.Context)
- func (ctl *PromotionController) List(ctx *gin.Context)
- type RepoFileController
- func (ctl *RepoFileController) ContainApp(ctx *gin.Context)
- func (ctl *RepoFileController) ContainReadme(ctx *gin.Context)
- func (ctl *RepoFileController) Create(ctx *gin.Context)
- func (ctl *RepoFileController) Delete(ctx *gin.Context)
- func (ctl *RepoFileController) DeleteDir(ctx *gin.Context)
- func (ctl *RepoFileController) Download(ctx *gin.Context)
- func (ctl *RepoFileController) DownloadRepo(ctx *gin.Context)
- func (ctl *RepoFileController) List(ctx *gin.Context)
- func (ctl *RepoFileController) Preview(ctx *gin.Context)
- func (ctl *RepoFileController) Update(ctx *gin.Context)
- type RepoFileCreateRequest
- type RepoFileUpdateRequest
- type SearchController
- type StudentApplyRequest
- type Tags
- type TagsController
- type TrainingController
- func (ctl *TrainingController) Create(ctx *gin.Context)
- func (ctl *TrainingController) Delete(ctx *gin.Context)
- func (ctl *TrainingController) Get(ctx *gin.Context)
- func (ctl *TrainingController) GetLastTrainingConfig(ctx *gin.Context)
- func (ctl *TrainingController) GetResultDownloadURL(ctx *gin.Context)
- func (ctl *TrainingController) List(ctx *gin.Context)
- func (ctl *TrainingController) ListByWS(ctx *gin.Context)
- func (ctl *TrainingController) Recreate(ctx *gin.Context)
- func (ctl *TrainingController) Terminate(ctx *gin.Context)
- type TrainingCreateRequest
- type TrainingRef
- type UserAgreement
- type UserController
- func (ctl *UserController) AddFollowing(ctx *gin.Context)
- func (ctl *UserController) BindEmail(ctx *gin.Context)
- func (ctl *UserController) CheckEmail(ctx *gin.Context)
- func (ctl *UserController) CheckWhiteList(ctx *gin.Context)
- func (ctl *UserController) Get(ctx *gin.Context)
- func (ctl *UserController) GetInfo(ctx *gin.Context)
- func (ctl *UserController) GitlabToken(ctx *gin.Context)
- func (ctl *UserController) ListFollower(ctx *gin.Context)
- func (ctl *UserController) ListFollowing(ctx *gin.Context)
- func (ctl *UserController) ListWhitelist(ctx *gin.Context)
- func (ctl *UserController) RefreshGitlabToken(ctx *gin.Context)
- func (ctl *UserController) RemoveFollowing(ctx *gin.Context)
- func (ctl *UserController) SendBindEmail(ctx *gin.Context)
- func (ctl *UserController) UpdateAgreement(ctx *gin.Context)
- func (ctl *UserController) UpdateUserRegistrationInfo(ctx *gin.Context)
- type UserPointsController
Constants ¶
const ( PrivateToken = "PRIVATE-TOKEN" Token = "token" PayLoad = "PAYLOAD" )
const ( OPERATE_LOG = "operate_log" OPERATE_TYPE_USER = "user" OPERATE_TYPE_SYSTEM = "system" )
Variables ¶
This section is empty.
Functions ¶
func AddRouterForAICCFinetuneController ¶
func AddRouterForAICCFinetuneController( rg *gin.RouterGroup, as app.AICCFinetuneService, pros papp.PromotionService, )
func AddRouterForActivityController ¶
func AddRouterForActivityController( rg *gin.RouterGroup, repo repository.Activity, user userrepo.User, proj spacerepo.Project, model repository.Model, dataset repository.Dataset, )
func AddRouterForBigModelController ¶
func AddRouterForBigModelController( rg *gin.RouterGroup, s app.BigModelService, us userapp.RegService, )
func AddRouterForChallengeController ¶
func AddRouterForChallengeController( rg *gin.RouterGroup, crepo repository.Competition, qrepo repository.AIQuestion, h challenge.Challenge, user userrepo.User, )
func AddRouterForCloudController ¶
func AddRouterForCloudController( rg *gin.RouterGroup, s app.CloudService, us userapp.WhiteListService, )
func AddRouterForCompetitionController ¶
func AddRouterForCompetitionController( rg *gin.RouterGroup, s app.CompetitionService, us userapp.RegService, project spacerepo.Project, )
func AddRouterForComputilityWebController ¶ added in v1.5.0
func AddRouterForComputilityWebController( rg *gin.RouterGroup, s app.ComputilityAppService, )
AddRouterForComputilityWebController adds routes to the given router group for the AddRouterForComputilityWebController.
func AddRouterForCourseController ¶
func AddRouterForCourseController( rg *gin.RouterGroup, s app.CourseService, us userapp.RegService, project spacerepo.Project, user userrepo.User, )
func AddRouterForDatasetController ¶
func AddRouterForDatasetController( rg *gin.RouterGroup, user userrepo.User, repo repository.Dataset, model repository.Model, proj spacerepo.Project, activity repository.Activity, tags repository.Tags, like repository.Like, sender message.ResourceProducer, newPlatformRepository func(token, namespace string) platform.Repository, )
func AddRouterForFinetuneController ¶
func AddRouterForFinetuneController( rg *gin.RouterGroup, fs finetune.Finetune, repo repository.Finetune, sender message.Sender, )
func AddRouterForHomeController ¶
func AddRouterForHomeController( rg *gin.RouterGroup, course courseapp.CourseService, comp compapp.CompetitionService, project spaceapp.ProjectService, model app.ModelService, dataset app.DatasetService, )
func AddRouterForInferenceController ¶
func AddRouterForInferenceController( rg *gin.RouterGroup, p platform.RepoFile, repo spaceappApprepo.Inference, project spacerepo.Project, sender message.Sender, whitelist userapp.WhiteListService, spacesender spacemesage.SpaceAppMessageProducer, )
func AddRouterForInferenceInternalController ¶ added in v1.5.0
func AddRouterForInferenceInternalController( rg *gin.RouterGroup, p platform.RepoFile, repo spaceappApprepo.Inference, project spacerepo.Project, sender message.Sender, whitelist userapp.WhiteListService, spacesender spacemesage.SpaceAppMessageProducer, )
func AddRouterForLikeController ¶
func AddRouterForLikeController( rg *gin.RouterGroup, repo repository.Like, user userrepo.User, proj spacerepo.Project, model repository.Model, dataset repository.Dataset, activity repository.Activity, sender message.LikeMessageProducer, )
func AddRouterForLoginController ¶
func AddRouterForLoginController( rg *gin.RouterGroup, us userapp.UserService, auth authing.User, login app.LoginService, )
func AddRouterForModelController ¶
func AddRouterForModelController( rg *gin.RouterGroup, user userrepo.User, repo repository.Model, proj spacerepo.Project, dataset repository.Dataset, activity repository.Activity, tags repository.Tags, like repository.Like, sender message.ResourceProducer, newPlatformRepository func(token, namespace string) platform.Repository, )
func AddRouterForProjectController ¶
func AddRouterForProjectController( rg *gin.RouterGroup, user userrepo.User, repo spacerepo.Project, model repository.Model, dataset repository.Dataset, activity repository.Activity, tags repository.Tags, like repository.Like, sender message.ResourceProducer, newPlatformRepository func(token, namespace string) platform.Repository, computility computilityapp.ComputilityInternalAppService, )
func AddRouterForProjectInternalController ¶ added in v1.5.0
func AddRouterForProjectInternalController( rg *gin.RouterGroup, user userrepo.User, repo spacerepo.Project, model repository.Model, dataset repository.Dataset, activity repository.Activity, tags repository.Tags, like repository.Like, sender message.ResourceProducer, newPlatformRepository func(token, namespace string) platform.Repository, computility computilityapp.ComputilityInternalAppService, )
func AddRouterForPromotionController ¶
func AddRouterForPromotionController( rg *gin.RouterGroup, pros app.PromotionService, ps app.PointsService, )
func AddRouterForRepoFileController ¶
func AddRouterForRepoFileController( rg *gin.RouterGroup, p platform.RepoFile, model repository.Model, project spacerepo.Project, dataset repository.Dataset, sender message.RepoMessageProducer, us uapp.UserService, )
func AddRouterForSearchController ¶
func AddRouterForSearchController( rg *gin.RouterGroup, user userrepo.User, proj spacerepo.Project, model repository.Model, dataset repository.Dataset, )
func AddRouterForTagsController ¶
func AddRouterForTagsController( rg *gin.RouterGroup, repo repository.Tags, )
func AddRouterForTrainingController ¶
func AddRouterForTrainingController( rg *gin.RouterGroup, ts training.Training, repo repository.Training, model repository.Model, project spacerepo.Project, dataset repository.Dataset, sender message.MessageProducer, )
func AddRouterForUserController ¶
func AddRouterForUserController( rg *gin.RouterGroup, us userapp.UserService, repo userrepo.User, auth authing.User, login app.LoginService, register userapp.RegService, whitelist userapp.WhiteListService, )
func AddRouterForUserPointsController ¶
func AddRouterForUserPointsController( rg *gin.RouterGroup, s app.UserPointsAppService, ts app.TaskAppService, )
func ClearSensitiveInfoMiddleware ¶ added in v1.3.1
func ClearSensitiveInfoMiddleware() gin.HandlerFunc
func EncryptHelperToken ¶
func EncryptHelperToken() utils.SymmetricEncryption
func GetOperateLog ¶
Types ¶
type AICCFinetuneController ¶
type AICCFinetuneController struct {
// contains filtered or unexported fields
}
func (*AICCFinetuneController) Create ¶
func (ctl *AICCFinetuneController) Create(ctx *gin.Context)
@Summary Create @Description create aicc finetune @Tags AICC Finetune @Param model path string true "model name" @Param body body aiccFinetuneCreateRequest true "body of creating aicc finetune" @Accept json @Success 201 {object} aiccFinetuneCreateResp @Failure 400 bad_request_body can't parse request body @Failure 401 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/aiccfinetune/{model} [post]
func (*AICCFinetuneController) Delete ¶
func (ctl *AICCFinetuneController) Delete(ctx *gin.Context)
@Summary Delete @Description delete AICC Finetune @Tags AICC Finetune @Param model path string true "model name" @Param id path string true "finetune id" @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/aiccfinetune/{model}/{id} [delete]
func (*AICCFinetuneController) Get ¶
func (ctl *AICCFinetuneController) Get(ctx *gin.Context)
@Summary Get @Description get AICC finetune info @Tags AICC Finetune
@Param model path string true "model name"
@Param id path string true "finetune id" @Accept json @Success 200 {object} aiccFinetuneDetail @Failure 500 system_error system error @Router /v1/aiccfinetune/{model}/{id} [get]
func (*AICCFinetuneController) GetResultDownloadURL ¶
func (ctl *AICCFinetuneController) GetResultDownloadURL(ctx *gin.Context)
@Summary GetLog @Description get log url of AICC Finetune for downloading @Tags AICC Finetune @Param pid path string true "project id" @Param id path string true "finetune id" @Param type path string true "aicc finetune result: log, output" @Accept json @Success 200 {object} aiccFinetuneLogResp @Failure 500 system_error system error @Router /v1/aiccfinetune/{model}/{id}/result/{type} [get]
func (*AICCFinetuneController) List ¶
func (ctl *AICCFinetuneController) List(ctx *gin.Context)
@Summary List @Description get AICC finetunes @Tags AICC Finetune @Param pid path string true "project id" @Accept json @Success 200 {object} app.AICCFinetuneSummaryDTO @Failure 500 system_error system error @Router /v1/aiccfinetune/{model} [get]
func (*AICCFinetuneController) ListByWS ¶
func (ctl *AICCFinetuneController) ListByWS(ctx *gin.Context)
@Summary List @Description get AICC Finetunes @Tags AICC Finetune @Param pid path string true "project id" @Accept json @Success 200 {object} app.AICCFinetuneSummaryDTO @Failure 500 system_error system error @Router /v1/aiccfinetune/{model}/ws [get]
func (*AICCFinetuneController) Terminate ¶
func (ctl *AICCFinetuneController) Terminate(ctx *gin.Context)
@Summary Terminate @Description terminate AICC Finetune @Tags AICC Finetune @Param model path string true "model name" @Param id path string true "finetune id" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/aiccfinetune/{model}/{id} [put]
func (*AICCFinetuneController) UploadData ¶
func (ctl *AICCFinetuneController) UploadData(ctx *gin.Context)
@Summary UploadData @Description Upload Data @Tags AICC Finetune @Param model path string true "model name" @Param file formData file true "result file" @Accept json @Success 201 {object} app.UploadDataDTO @Failure 500 system_error system error @Router /v1/aiccfinetune/{model}/{task}/data [post]
type AICCKeyValue ¶
type APIConfig ¶
type APIConfig struct { Tags Tags `json:"tags" required:"true"` TokenKey string `json:"token_key" required:"true"` TokenExpiry int64 `json:"token_expiry" required:"true"` SessionDomain string `json:"session_domain" required:"true"` EncryptionKey string `json:"encryption_key" required:"true"` EncryptionKeyForCSRF string `json:"encryption_key_csrf" required:"true"` EncryptionKeyForGitlabToken string `json:"encryption_key_gitlab_token" required:"true"` DefaultPassword string `json:"default_password" required:"true"` MaxTrainingRecordNum int `json:"max_training_record_num" required:"true"` InferenceDir string `json:"inference_dir"` InferenceBootFile string `json:"inference_boot_file"` InferenceTimeout int `json:"inference_timeout"` PodTimeout int `json:"pod_timeout"` MaxPictureSizeToDescribe int64 `json:"-"` MaxPictureSizeToVQA int64 `json:"-"` MaxCompetitionSubmmitFileSize int64 `json:"max_competition_submmit_file_size"` MinSurvivalTimeOfInference int `json:"min_survival_time_of_inference"` MaxTagsNumToSearchResource int `json:"max_tags_num_to_search_resource"` MaxTagKindsNumToSearchResource int `json:"max_tag_kinds_num_to_search_resource"` MaxFinetuneSubmmitFileSize int64 `json:"max_finetune_submmit_file_size"` LocalDomainCookie bool `json:"local_domain_cookie"` InternalTokenHash string `json:"internal_token_hash" required:"true"` InternalTokeSalt string `json:"internal_token_salt" required:"true"` InternalHeader string `json:"internal_token_header" required:"true"` }
func (*APIConfig) SetDefault ¶
func (cfg *APIConfig) SetDefault()
type ActivityController ¶
type ActivityController struct {
// contains filtered or unexported fields
}
func (*ActivityController) List ¶
func (ctl *ActivityController) List(ctx *gin.Context)
@Title List @Description list activitys @Tags Activity @Param account path string true "the account the activities belong to" @Accept json @Success 200 {object} app.ActivityDTO @Failure 500 system_error system error @Router /v1/user/activity/{account} [get]
type AddCourseRelatedProjectRequest ¶
type AddCourseRelatedProjectRequest struct { Owner string `json:"owner"` Name string `json:"project_name"` }
func (*AddCourseRelatedProjectRequest) ToInfo ¶
func (req *AddCourseRelatedProjectRequest) ToInfo() ( owner types.Account, name types.ResourceName, err error, )
type BigModelController ¶
type BigModelController struct {
// contains filtered or unexported fields
}
func (*BigModelController) AIDetector ¶
func (ctl *BigModelController) AIDetector(ctx *gin.Context)
@Title AI Detector @Description detect if text generate by ai @Tags BigModel @Param body body aiDetectorReq true "body of ai detector" @Accept json @Success 202 {object} aiDetectorResp @Failure 500 system_error system error @Router /v1/bigmodel/ai_detector [post]
func (*BigModelController) AddDigg ¶
func (ctl *BigModelController) AddDigg(ctx *gin.Context)
@Title AddDigg @Description add digg to wukong picture @Tags BigModel @Accept json @Success 202 {object} wukongDiggResp @Failure 500 system_error system error @Router /v1/bigmodel/wukong/digg [post]
func (*BigModelController) AddLike ¶
func (ctl *BigModelController) AddLike(ctx *gin.Context)
@Title AddLike @Description add like to wukong picture @Tags BigModel @Accept json @Success 202 {object} wukongAddLikeResp @Failure 500 system_error system error @Router /v1/bigmodel/wukong/like [post]
func (*BigModelController) AddPublic ¶
func (ctl *BigModelController) AddPublic(ctx *gin.Context)
@Title AddPublic @Description add public to wukong picture @Tags BigModel @Accept json @Success 202 {object} wukongAddPublicResp @Failure 500 system_error system error @Router /v1/bigmodel/wukong/public [post]
func (*BigModelController) ApplyApi ¶
func (ctl *BigModelController) ApplyApi(ctx *gin.Context)
@Title ApplyApi @Description generates pictures by WuKong-hf @Tags BigModel @Param body body applyApiReq true "body of wukong" @Accept json @Success 201 {object} newApiTokenResp @Failure 500 system_error system error @Router /v1/bigmodel/api/apply/{model} [post]
func (*BigModelController) BaiChuan ¶
func (ctl *BigModelController) BaiChuan(ctx *gin.Context)
@Title BaiChuan @Description conversational AI @Tags BigModel @Param body body baichuanReq true "body of baichuan" @Accept json @Success 202 {object} app.BaiChuanDTO @Failure 500 system_error system error @Router /v1/bigmodel/baichuan2_7b_chat [post]
func (*BigModelController) CancelDigg ¶
func (ctl *BigModelController) CancelDigg(ctx *gin.Context)
@Title CancelDigg @Description delete digg to wukong picture @Tags BigModel @Param body body wukongCancelDiggPublicRequest true "body of wukong" @Accept json @Success 202 {object} wukongDiggResp @Failure 500 system_error system error @Router /v1/bigmodel/wukong/digg [delete]
func (*BigModelController) CancelLike ¶
func (ctl *BigModelController) CancelLike(ctx *gin.Context)
@Title CancelLike @Description cancel like on wukong picture @Tags BigModel @Param id path string true "picture id" @Accept json @Success 204 @Failure 500 system_error system error @Router /v1/bigmodel/wukong/like/{id} [delete]
func (*BigModelController) CancelPublic ¶
func (ctl *BigModelController) CancelPublic(ctx *gin.Context)
@Title CancelPublic @Description cancel public on wukong picture @Tags BigModel @Param id path string true "picture id" @Accept json @Success 204 @Failure 500 system_error system error @Router /v1/bigmodel/wukong/public/{id} [delete]
func (*BigModelController) GLM2 ¶
func (ctl *BigModelController) GLM2(ctx *gin.Context)
@Title GLM @Description conversational AI @Tags BigModel @Param body body glm2Request true "body of glm2" @Accept json @Success 202 {object} string @Failure 500 system_error system error @Router /v1/bigmodel/glm2_6b [post]
func (*BigModelController) GenDownloadURL ¶
func (ctl *BigModelController) GenDownloadURL(ctx *gin.Context)
@Title GenDownloadURL @Description generate download url of wukong picture @Tags BigModel @Param body body wukongPictureLink true "body of wukong" @Accept json @Success 202 {object} wukongPictureLink @Failure 500 system_error system error @Router /v1/bigmodel/wukong/link [put]
func (*BigModelController) GenWuKongSamples ¶
func (ctl *BigModelController) GenWuKongSamples(ctx *gin.Context)
@Title GenWuKongSamples @Description gen wukong samples @Tags BigModel @Param batch path int true "batch num" @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/bigmodel/wukong/samples/{batch} [get]
func (*BigModelController) GetApiInfo ¶
func (ctl *BigModelController) GetApiInfo(ctx *gin.Context)
@Title GetApiInfo @Description get api info @Tags BigModel @Accept json @Success 200 {object} app.ApiInfoDTO @Failure 500 system_error system error @Router /v1/bigmodel/apiinfo/get/{model} [get]
func (*BigModelController) GetPublicsGlobal ¶
func (ctl *BigModelController) GetPublicsGlobal(ctx *gin.Context)
@Title GetPublicGlobal @Description list all wukong pictures publiced @Tags BigModel @Accept json @Success 200 {object} app.WuKongPublicDTO @Failure 500 system_error system error @Router /v1/bigmodel/wukong/publics [get]
func (*BigModelController) GetUserApplyRecord ¶
func (ctl *BigModelController) GetUserApplyRecord(ctx *gin.Context)
@Title GetUserApplyRecord @Description get user apply record @Tags BigModel @Accept json @Success 200 {object} app.ApiApplyRecordDTO @Failure 500 system_error system error @Router /v1/bigmodel/api/get/ [get]
func (*BigModelController) IFlytekSpark ¶
func (ctl *BigModelController) IFlytekSpark(ctx *gin.Context)
@Title IFlytekSpark @Description conversational AI @Tags BigModel @Param body body iflyteksparkRequest true "body of iflytekspark" @Accept json @Success 202 {object} string @Failure 500 system_error system error @Router /v1/bigmodel/iflytekspark [post]
func (*BigModelController) IsApplied ¶
func (ctl *BigModelController) IsApplied(ctx *gin.Context)
@Title IsApplied @Description is user applied for api @Tags BigModel @Accept json @Success 200 {object} isApplyResp @Failure 500 system_error system error @Router /v1/bigmodel/api/apply/{model} [get]
func (*BigModelController) LLAMA2 ¶
func (ctl *BigModelController) LLAMA2(ctx *gin.Context)
@Title LLAMA2 @Description conversational AI @Tags BigModel @Param body body llama2Request true "body of llama2" @Accept json @Success 202 {object} string @Failure 500 system_error system error @Router /v1/bigmodel/llama2_7b [post]
func (*BigModelController) ListLike ¶
func (ctl *BigModelController) ListLike(ctx *gin.Context)
@Title ListLike @Description list wukong pictures user liked @Tags BigModel @Accept json @Success 200 {object} app.WuKongLikeDTO @Failure 500 system_error system error @Router /v1/bigmodel/wukong [get]
func (*BigModelController) ListLuoJiaRecord ¶
func (ctl *BigModelController) ListLuoJiaRecord(ctx *gin.Context)
@Title ListLuoJiaRecord @Description list luo-jia big model records @Tags BigModel @Accept json @Success 200 {object} app.LuoJiaRecordDTO @Failure 500 system_error system error @Router /v1/bigmodel/luojia [get]
func (*BigModelController) ListPublic ¶
func (ctl *BigModelController) ListPublic(ctx *gin.Context)
@Title ListPublic @Description list wukong pictures user publiced @Tags BigModel @Accept json @Success 200 {object} app.WuKongPublicDTO @Failure 500 system_error system error @Router /v1/bigmodel/wukong/public [get]
func (*BigModelController) LuoJia ¶
func (ctl *BigModelController) LuoJia(ctx *gin.Context)
@Title LuoJia @Description luo-jia big model @Tags BigModel @Accept json @Success 201 {object} luojiaResp @Failure 500 system_error system error @Router /v1/bigmodel/luojia [post]
func (*BigModelController) LuoJiaUploadPicture ¶
func (ctl *BigModelController) LuoJiaUploadPicture(ctx *gin.Context)
@Title LuoJiaUploadPicture @Description upload a picture for luo-jia @Tags BigModel @Param picture formData file true "picture" @Accept json @Success 201 {object} pictureUploadResp @Failure 500 system_error system error @Router /v1/bigmodel/luojia_upload_picture [post]
func (*BigModelController) RefreshApiToken ¶
func (ctl *BigModelController) RefreshApiToken(ctx *gin.Context)
@Title RefreshApiToken @Description refresh api token @Tags BigModel @Accept json @Success 200 {object} newApiTokenResp @Failure 500 system_error system error @Router /v1/bigmodel/api/refresh/{model} [get]
func (*BigModelController) SkyWork ¶
func (ctl *BigModelController) SkyWork(ctx *gin.Context)
@Title SkyWork @Description conversational AI @Tags BigModel @Param body body skyWorkRequest true "body of skywork" @Accept json @Success 202 {object} string @Failure 500 system_error system error @Router /v1/bigmodel/skywork_13b [post]
func (*BigModelController) WuKong ¶
func (ctl *BigModelController) WuKong(ctx *gin.Context)
@Title WuKong @Description generates pictures by WuKong @Tags BigModel @Param body body wukongRequest true "body of wukong" @Accept json @Success 201 {object} wukongPicturesGenerateResp @Failure 500 system_error system error @Router /v1/bigmodel/wukong [post]
func (*BigModelController) WuKongAsync ¶
func (ctl *BigModelController) WuKongAsync(ctx *gin.Context)
@Title WuKong @Description send async wukong request task @Tags BigModel @Param body body wukongRequest true "body of wukong" @Accept json @Success 201 {object} wukongPicturesGenerateResp @Failure 500 system_error system error @Router /v1/bigmodel/wukong_async [post]
func (*BigModelController) WuKongLastFinishedTask ¶ added in v1.3.1
func (ctl *BigModelController) WuKongLastFinishedTask(ctx *gin.Context)
@Title WuKong @Description get last finished task @Tags BigModel @Accept json @Success 200 {object} app.WuKongRankDTO @Failure 500 system_error system error @Router /v1/bigmodel/wukong/task [get]
func (*BigModelController) WuKongRank ¶
func (ctl *BigModelController) WuKongRank(ctx *gin.Context)
@Title WuKong @Description get wukong rank @Tags BigModel @Accept json @Success 200 {object} app.WuKongRankDTO @Failure 500 system_error system error @Router /v1/bigmodel/wukong/rank [get]
func (*BigModelController) WukongAPI ¶
func (ctl *BigModelController) WukongAPI(ctx *gin.Context)
@Title WuKongAPI @Description generates pictures by WuKong @Tags BigModel @Param body body wukongRequest true "body of wukong" @Accept json @Success 201 {object} wukongPicturesGenerateResp @Failure 500 system_error system error @Router /v1/bigmodel/api/{model} [post]
type ChallengeController ¶
type ChallengeController struct {
// contains filtered or unexported fields
}
func (*ChallengeController) Apply ¶
func (ctl *ChallengeController) Apply(ctx *gin.Context)
@Summary Apply @Description apply the challenge @Tags Challenge @Param body body competitorApplyRequest true "body of applying" @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/challenge/competitor [post]
func (*ChallengeController) Get ¶
func (ctl *ChallengeController) Get(ctx *gin.Context)
@Summary Get @Description get detail of challenge @Tags Challenge @Accept json @Success 200 {object} app.ChallengeCompetitorInfoDTO @Failure 500 system_error system error @Router /v1/challenge [get]
func (*ChallengeController) GetAIQuestions ¶
func (ctl *ChallengeController) GetAIQuestions(ctx *gin.Context)
@Summary GetAIQuestions @Description get ai questions @Tags Challenge @Accept json @Success 200 {object} app.AIQuestionDTO @Failure 500 system_error system error @Router /v1/challenge/aiquestions [get]
func (*ChallengeController) GetRankingList ¶
func (ctl *ChallengeController) GetRankingList(ctx *gin.Context)
@Summary GetRankingList @Description get ranking list of challenge @Tags Challenge @Accept json @Success 200 {object} app.ChallengeRankingDTO @Failure 500 system_error system error @Router /v1/challenge/ranking [get]
func (*ChallengeController) Submit ¶
func (ctl *ChallengeController) Submit(ctx *gin.Context)
@Summary Submit @Description submit answer of ai question @Tags Challenge @Param body body aiQuestionAnswerSubmitRequest true "body of ai question answer" @Accept json @Success 201 {object} aiQuestionAnswerSubmitResp @Failure 500 system_error system error @Router /v1/challenge/aiquestions [post]
type CloudController ¶
type CloudController struct {
// contains filtered or unexported fields
}
func (*CloudController) CanRead ¶
func (ctl *CloudController) CanRead(ctx *gin.Context)
@Summary CanRead @Description get cloud pod @Tags Cloud @Param owner path string true "user name" @Accept json @Success 201 {object} app.InferenceDTO @Failure 400 bad_request not allowed @Failure 500 system_error system error @Router /v1/cloud/read/{owner} [get]
func (*CloudController) Get ¶
func (ctl *CloudController) Get(ctx *gin.Context)
@Summary Get @Description get cloud pod @Tags Cloud @Param cid path string true "cloud config id" @Accept json @Success 201 {object} app.InferenceDTO @Failure 400 bad_request_body can't parse request body @Failure 500 system_error system error @Router /v1/cloud/{cid} [get]
func (*CloudController) GetHttp ¶
func (ctl *CloudController) GetHttp(ctx *gin.Context)
@Summary GetHttp @Description get cloud pod @Tags Cloud @Param cid path string true "cloud config id" @Accept json @Success 201 {object} app.InferenceDTO @Failure 400 bad_request_body can't parse request body @Failure 500 system_error system error @Router /v1/cloud/{cid} [get]
func (*CloudController) List ¶
func (ctl *CloudController) List(ctx *gin.Context)
@Summary List @Description list cloud config @Tags Cloud @Accept json @Success 200 {object} []app.CloudDTO @Failure 500 system_error system error @Router /v1/cloud [get]
func (*CloudController) ReleasePod ¶
func (ctl *CloudController) ReleasePod(ctx *gin.Context)
@Summary Release @Description release cloud resource @Tags Cloud @Param id path string true "pod id" @Accept json @Success 204 @Failure 404 {string} string "not found" @Failure 500 {object} responseData "system error" @Router /v1/cloud/pod/{id} [delete]
func (*CloudController) Subscribe ¶
func (ctl *CloudController) Subscribe(ctx *gin.Context)
@Summary Subscribe @Description subscribe cloud @Tags Cloud @Param body body cloudSubscribeRequest true "body of subscribe cloud" @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/cloud/subscribe [post]
func (*CloudController) WsSendReleasedPod ¶
func (ctl *CloudController) WsSendReleasedPod(ctx *gin.Context)
@Summary WsSendReleasedPod @Description WsSendReleasedPod is a websocket api which sends a released pod data to client. @Tags Cloud @Param id path string true "pod id" @Accept json @Success 200 {object} app.PodInfoDTO @Failure 404 {string} string "not found" @Failure 500 {object} responseData "system error" @Router /v1/cloud/pod/{id} [get]
type CompetitionController ¶
type CompetitionController struct {
// contains filtered or unexported fields
}
func (*CompetitionController) AddRelatedProject ¶
func (ctl *CompetitionController) AddRelatedProject(ctx *gin.Context)
@Summary AddRelatedProject @Description add related project @Tags Competition @Param id path string true "competition id" @Param body body cc.AddRelatedProjectRequest true "project info" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/competition/{id}/related_project [put]
func (*CompetitionController) Apply ¶
func (ctl *CompetitionController) Apply(ctx *gin.Context)
@Summary Apply @Description apply the competition @Tags Competition @Param id path string true "competition id" @Param body body cc.CompetitorApplyRequest true "body of applying" @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/competition/{id}/competitor [post]
func (*CompetitionController) ChangeName ¶
func (ctl *CompetitionController) ChangeName(ctx *gin.Context)
@Summary ChangeName @Description change name of a team @Tags Competition @Param id path string true "competition id" @Param body body cc.ChangeTeamNameRequest true "body of team name" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/competition/{id}/team/action/change_name [put]
func (*CompetitionController) CreateTeam ¶
func (ctl *CompetitionController) CreateTeam(ctx *gin.Context)
@Summary CreateTeam @Description create team of competition @Tags Competition @Param id path string true "competition id" @Param body body cc.CreateTeamRequest true "body of creating team" @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/competition/{id}/team [post]
func (*CompetitionController) DeleteMember ¶
func (ctl *CompetitionController) DeleteMember(ctx *gin.Context)
@Summary DeleteMember @Description delete member of a team @Tags Competition @Param id path string true "competition id" @Param body body cc.DeleteMemberRequest true "body of delete member" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/competition/{id}/team/action/delete_member [put]
func (*CompetitionController) Dissolve ¶
func (ctl *CompetitionController) Dissolve(ctx *gin.Context)
@Summary Dissolve @Description dissolve a team @Tags Competition @Param id path string true "competition id" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/competition/{id}/team/action/dissolve [put]
func (*CompetitionController) Get ¶
func (ctl *CompetitionController) Get(ctx *gin.Context)
@Summary Get @Description get detail of competition @Tags Competition @Param id path string true "competition id" @Accept json @Success 200 {object} app.UserCompetitionDTO @Failure 500 system_error system error @Router /v1/competition/{id} [get]
func (*CompetitionController) GetMyTeam ¶
func (ctl *CompetitionController) GetMyTeam(ctx *gin.Context)
@Summary GetMyTeam @Description get team of competition @Tags Competition @Param id path string true "competition id" @Accept json @Success 200 {object} app.CompetitionTeamDTO @Failure 500 system_error system error @Router /v1/competition/{id}/team [get]
func (*CompetitionController) GetRankingList ¶
func (ctl *CompetitionController) GetRankingList(ctx *gin.Context)
@Summary GetRankingList @Description get ranking list of competition @Tags Competition @Param id path string true "competition id" @Accept json @Success 200 {object} app.CompetitionRankingDTO @Failure 500 system_error system error @Router /v1/competition/{id}/ranking [get]
func (*CompetitionController) GetRegisterInfo ¶
func (ctl *CompetitionController) GetRegisterInfo(ctx *gin.Context)
@Summary GetRegisterInfo @Description get register info @Tags Competition @Accept json @Success 200 {object} app.UserRegisterInfoDTO @Failure 500 system_error system error @Router /v1/competition/reginfo [get]
func (*CompetitionController) GetSubmissions ¶
func (ctl *CompetitionController) GetSubmissions(ctx *gin.Context)
@Summary GetSubmissions @Description get submissions @Tags Competition @Param id path string true "competition id" @Accept json @Success 200 {object} app.CompetitionSubmissionsDTO @Failure 500 system_error system error @Router /v1/competition/{id}/submissions [get]
func (*CompetitionController) JoinTeam ¶
func (ctl *CompetitionController) JoinTeam(ctx *gin.Context)
@Summary JoinTeam @Description join a team of competition @Tags Competition @Param id path string true "competition id" @Param body body cc.JoinTeamRequest true "body of joining team" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/competition/{id}/team [put]
func (*CompetitionController) List ¶
func (ctl *CompetitionController) List(ctx *gin.Context)
@Summary List @Description list competitions @Tags Competition @Param status query string false "competition status, such as over, preparing, in-progress" @Param mine query string false "just list competitions of competitor, if it is set" @Accept json @Success 200 {object} app.CompetitionSummaryDTO @Failure 500 system_error system error @Router /v1/competition [get]
func (*CompetitionController) QuitTeam ¶
func (ctl *CompetitionController) QuitTeam(ctx *gin.Context)
@Summary QuitTeam @Description quit team @Tags Competition @Param id path string true "competition id" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/competition/{id}/team/action/quit [put]
func (*CompetitionController) Submit ¶
func (ctl *CompetitionController) Submit(ctx *gin.Context)
@Summary Submit @Description submit @Tags Competition @Param id path string true "competition id" @Param file formData file true "result file" @Accept json @Success 201 {object} app.CompetitionSubmissionDTO @Failure 500 system_error system error @Router /v1/competition/{id}/submissions [post]
func (*CompetitionController) TransferLeader ¶
func (ctl *CompetitionController) TransferLeader(ctx *gin.Context)
@Summary TransferLeader @Description transfer leader to a member @Tags Competition @Param id path string true "competition id" @Param body body cc.TransferLeaderRequest true "body of member" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/competition/{id}/team/action/transfer_leader [put]
type ComputilityWebController ¶ added in v1.5.0
type ComputilityWebController struct {
// contains filtered or unexported fields
}
ComputilityWebController is a struct that holds the necessary dependencies for handling computility-related operations.
func (*ComputilityWebController) GetComputilityAccountDetail ¶ added in v1.5.0
func (ctl *ComputilityWebController) GetComputilityAccountDetail(ctx *gin.Context)
@Summary GetComputilityAccountDetail @Description get user computility account detail @Tags ComputilityWeb @Param type path string true "computility type" @Accept json @Success 200 {object} commonctl.ResponseData{data=app.AccountQuotaDetailDTO,msg=string,code=string} @Failure 400 {object} commonctl.ResponseData{data=error,msg=string,code=string} @Router /v1/computility/account/{type} [get]
type ContainFileInfo ¶
type ContainFileInfo struct {
HasFile bool `json:"has_file"`
}
type CourseController ¶
type CourseController struct {
// contains filtered or unexported fields
}
func (*CourseController) AddCourseRelatedProject ¶
func (ctl *CourseController) AddCourseRelatedProject(ctx *gin.Context)
@Summary AddCourseRelatedProject @Description add related project @Tags Course @Param id path string true "course id" @Param body body AddCourseRelatedProjectRequest true "project info" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/course/{id}/related_project [put]
func (*CourseController) AddPlayRecord ¶
func (ctl *CourseController) AddPlayRecord(ctx *gin.Context)
@Summary AddPlayRecord @Description add play record @Tags Course @Param id path string true "course id" @Param body body PlayRecordRequest true "record info" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/course/{id}/record [put]
func (*CourseController) Apply ¶
func (ctl *CourseController) Apply(ctx *gin.Context)
@Summary Apply @Description apply the course @Tags Course @Param id path string true "course id" @Param body body StudentApplyRequest true "body of applying" @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/course/{id}/player [post]
func (*CourseController) Get ¶
func (ctl *CourseController) Get(ctx *gin.Context)
@Summary Get @Description get course information @Tags Course @Param id path string true "course id" @Accept json @Success 200 {object} app.CourseDTO @Failure 500 system_error system error @Router /v1/course/{id} [get]
func (*CourseController) GetAssignment ¶
func (ctl *CourseController) GetAssignment(ctx *gin.Context)
@Summary GetAssignment @Description Get assignment @Tags Course @Param id path string true "course id" @Param asgid path string true "asg id" @Accept json @Success 200 {object} app.AsgDTO @Failure 500 system_error system error @Router /v1/course/:id/asg/:asgid [get]
func (*CourseController) GetCertification ¶
func (ctl *CourseController) GetCertification(ctx *gin.Context)
@Summary GetCertification @Description get certification @Tags Course @Param id path string true "course id" @Accept json @Success 200 {object} app.CertInfoDTO @Failure 500 system_error system error @Router /v1/course/{id}/cert [get]
func (*CourseController) GetRegisterInfo ¶
func (ctl *CourseController) GetRegisterInfo(ctx *gin.Context)
@Summary GetRegisterInfo @Description get register info @Tags Course @Accept json @Success 200 {object} app.UserRegisterInfoDTO @Failure 500 system_error system error @Router /v1/course/reginfo [get]
func (*CourseController) GetSubmissions ¶
func (ctl *CourseController) GetSubmissions(ctx *gin.Context)
@Summary GetSubmissions @Description get submissions @Tags Course @Param id path string true "course id" @Accept json @Success 200 {object} app.RelateProjectDTO @Failure 500 system_error system error @Router /v1/course/{id}/asg/result [get]
func (*CourseController) List ¶
func (ctl *CourseController) List(ctx *gin.Context)
@Summary List @Description list the course @Tags Course @Param status query string false "course status, such as over, preparing, in-progress" @Param type query string false "course type, such as ai, mindspore, foundation" @Param mine query string false "just list courses of player, if it is set" @Accept json @Success 200 {object} app.CourseSummaryDTO @Failure 500 system_error system error @Router /v1/course [get]
func (*CourseController) ListAssignments ¶
func (ctl *CourseController) ListAssignments(ctx *gin.Context)
@Summary ListAssignments @Description list assignments @Tags Course @Param id path string true "course id" @Param status query string false "assignments status, such as finish" @Accept json @Success 200 {object} app.AsgWorkDTO @Failure 500 system_error system error @Router /v1/course/{id}/asg/list [get]
type DatasetController ¶
type DatasetController struct {
// contains filtered or unexported fields
}
func (*DatasetController) Check ¶
func (ctl *DatasetController) Check(ctx *gin.Context)
@Summary Check @Description check whether the name can be applied to create a new dataset @Tags Dataset @Param owner path string true "owner of dataset" @Param name path string true "name of dataset" @Accept json @Success 200 {object} canApplyResourceNameResp @Produce json @Router /v1/dataset/{owner}/{name}/check [get]
func (*DatasetController) Create ¶
func (ctl *DatasetController) Create(ctx *gin.Context)
@Summary Create @Description create dataset @Tags Dataset @Param body body datasetCreateRequest true "body of creating dataset" @Accept json @Success 201 {object} app.DatasetDTO @Failure 400 bad_request_body can't parse request body @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Failure 500 duplicate_creating create dataset repeatedly @Router /v1/dataset [post]
func (*DatasetController) Delete ¶
func (ctl *DatasetController) Delete(ctx *gin.Context)
@Summary Delete @Description delete dataset @Tags Dataset @Param owner path string true "owner of dataset" @Param name path string true "name of dataset" @Accept json @Success 204 @Produce json @Router /v1/dataset/{owner}/{name} [delete]
func (*DatasetController) Get ¶
func (ctl *DatasetController) Get(ctx *gin.Context)
@Summary Get @Description get dataset @Tags Dataset @Param owner path string true "owner of dataset" @Param name path string true "name of dataset" @Accept json @Success 200 {object} datasetDetail @Produce json @Router /v1/dataset/{owner}/{name} [get]
func (*DatasetController) List ¶
func (ctl *DatasetController) List(ctx *gin.Context)
@Summary List @Description list dataset @Tags Dataset @Param owner path string true "owner of dataset" @Param name query string false "name of dataset" @Param repo_type query string false "repo type of dataset, value can be public or private" @Param count_per_page query int false "count per page" @Param page_num query int false "page num which starts from 1" @Param sort_by query string false "sort keys, value can be update_time, first_letter, download_count" @Accept json @Success 200 {object} datasetsInfo @Produce json @Router /v1/dataset/{owner} [get]
func (*DatasetController) ListGlobal ¶
func (ctl *DatasetController) ListGlobal(ctx *gin.Context)
@Summary ListGlobal @Description list global public dataset @Tags Dataset @Param name query string false "name of dataset" @Param tags query string false "tags, separate multiple tags with commas" @Param tag_kinds query string false "tag kinds, separate multiple kinds with commas" @Param level query string false "dataset level, such as official, good" @Param count_per_page query int false "count per page" @Param page_num query int false "page num which starts from 1" @Param sort_by query string false "sort keys, value can be update_time, first_letter, download_count" @Accept json @Success 200 {object} app.GlobalDatasetsDTO @Produce json @Router /v1/dataset [get]
func (*DatasetController) SetTags ¶
func (ctl *DatasetController) SetTags(ctx *gin.Context)
@Summary SetTags @Description set tags for dataset @Tags Dataset @Param owner path string true "owner of dataset" @Param id path string true "id of dataset" @Param body body resourceTagsUpdateRequest true "body of tags" @Accept json @Success 202 @Router /v1/dataset/{owner}/{id}/tags [put]
func (*DatasetController) Update ¶
func (ctl *DatasetController) Update(ctx *gin.Context)
@Summary Update @Description update property of dataset @Tags Dataset @Param id path string true "id of dataset" @Param body body datasetUpdateRequest true "body of updating dataset" @Accept json @Produce json @Router /v1/dataset/{owner}/{id} [put]
type FinetuneController ¶
type FinetuneController struct {
// contains filtered or unexported fields
}
func (*FinetuneController) Create ¶
func (ctl *FinetuneController) Create(ctx *gin.Context)
@Summary Create @Description create finetune @Tags Finetune @Param body body FinetuneCreateRequest true "body of creating finetune" @Accept json @Success 201 {object} finetuneCreateResp @Failure 500 system_error system error @Router /v1/finetune [post]
func (*FinetuneController) Delete ¶
func (ctl *FinetuneController) Delete(ctx *gin.Context)
@Summary Delete @Description delete finetune @Tags Finetune @Param id path string true "finetune id" @Accept json @Success 204 @Failure 500 system_error system error @Router /v1/finetune/{id} [delete]
func (*FinetuneController) List ¶
func (ctl *FinetuneController) List(ctx *gin.Context)
@Summary List @Description list finetunes @Tags Finetune @Accept json @Success 200 {object} app.UserFinetunesDTO @Failure 500 system_error system error @Router /v1/finetune [get]
func (*FinetuneController) Log ¶
func (ctl *FinetuneController) Log(ctx *gin.Context)
@Summary Log @Description download finetune log @Tags Finetune @Param id path string true "finetune id" @Accept json @Success 200 {object} finetuneLog @Failure 500 system_error system error @Router /v1/finetune/{id}/log [get]
func (*FinetuneController) Terminate ¶
func (ctl *FinetuneController) Terminate(ctx *gin.Context)
@Summary Terminate @Description terminate finetune @Tags Finetune @Param id path string true "finetune id" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/finetune/{id} [put]
func (*FinetuneController) WatchFinetunes ¶
func (ctl *FinetuneController) WatchFinetunes(ctx *gin.Context)
@Summary WatchFinetunes @Description watch finetunes @Tags Finetune @Accept json @Success 200 {object} app.FinetuneSummaryDTO @Failure 500 system_error system error @Router /v1/finetune/ws [get]
func (*FinetuneController) WatchSingle ¶
func (ctl *FinetuneController) WatchSingle(ctx *gin.Context)
@Summary WatchSingle @Description watch single finetune @Tags Finetune @Param id path string true "finetune id" @Accept json @Success 200 {object} finetuneLog @Failure 500 system_error system error @Router /v1/finetune/{id}/log/ws [get]
type FinetuneCreateRequest ¶
type HomeController ¶
type HomeController struct {
// contains filtered or unexported fields
}
func (*HomeController) ListAll ¶
func (ctl *HomeController) ListAll(ctx *gin.Context)
@Summary ListAll @Description list the courses and competitions @Tags HomePage @Accept json @Success 200 {object} homeInfo @Failure 500 system_error system error @Router /v1/homepage [get]
func (*HomeController) ListAllElectricity ¶
func (ctl *HomeController) ListAllElectricity(ctx *gin.Context)
@Summary ListAllElectricity @Description list the project dataset model courses and competitions @Tags HomePage @Accept json @Success 200 {object} homeElectricityInfo @Failure 500 system_error system error @Router /v1/homepage/electricity [get]
type InferenceController ¶
type InferenceController struct {
// contains filtered or unexported fields
}
func (*InferenceController) Create ¶
func (ctl *InferenceController) Create(ctx *gin.Context)
@Summary Create @Description create inference @Tags Inference @Param owner path string true "project owner" @Param pid path string true "project id" @Accept json @Success 201 {object} app.InferenceDTO @Failure 400 bad_request_body can't parse request body @Failure 401 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/inference/project/{owner}/{pid} [get]
type InferenceInternalController ¶ added in v1.5.0
type InferenceInternalController struct {
// contains filtered or unexported fields
}
func (*InferenceInternalController) Create ¶ added in v1.5.0
func (ctl *InferenceInternalController) Create(ctx *gin.Context)
@Summary Create @Description create inference @Tags Inference @Param owner path string true "project owner" @Param pid path string true "project id" @Accept json @Success 201 {object} app.InferenceDTO @Failure 400 bad_request_body can't parse request body @Failure 401 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/inference/project/{owner}/{pid} [get]
type LikeController ¶
type LikeController struct {
// contains filtered or unexported fields
}
func (*LikeController) Create ¶
func (ctl *LikeController) Create(ctx *gin.Context)
@Title Create @Description create a like @Tags Like @Param body body likeCreateRequest true "body of creating like" @Accept json @Success 201 @Failure 400 bad_request_body can't parse request body @Failure 401 bad_request_param some parameter of body is invalid @Failure 402 not_allowed can't add yourself as your like @Failure 403 resource_not_exists the target of like does not exist @Failure 404 duplicate_creating add like again @Failure 500 system_error system error @Router /v1/user/like [post]
func (*LikeController) Delete ¶
func (ctl *LikeController) Delete(ctx *gin.Context)
@Title Delete @Description delete a like @Tags Like @Param body body likeDeleteRequest true "body of deleting like" @Accept json @Success 204 @Failure 400 bad_request_body can't parse request body @Failure 401 bad_request_param some parameter of body is invalid @Failure 402 not_allowed can't add yourself as your like @Failure 403 resource_not_exists the target of like does not exist @Failure 500 system_error system error @Router /v1/user/like [delete]
func (*LikeController) List ¶
func (ctl *LikeController) List(ctx *gin.Context)
@Title List @Description list likes @Tags Like @Param account path string true "the account the likes belong to" @Accept json @Success 200 {object} app.LikeDTO @Failure 500 system_error system error @Router /v1/user/like/{account} [get]
type LoginController ¶
type LoginController struct {
// contains filtered or unexported fields
}
func (*LoginController) Login ¶
func (ctl *LoginController) Login(ctx *gin.Context)
@Title Login @Description callback of authentication by authing @Tags Login @Param code query string true "authing code" @Param redirect_uri query string true "redirect uri" @Accept json @Success 200 {object} app.UserDTO @Failure 500 system_error system error @Failure 501 duplicate_creating create user repeatedly which should not happen @Router /v1/login [get]
func (*LoginController) Logout ¶
func (ctl *LoginController) Logout(ctx *gin.Context)
@Title Logout @Description get info of login @Tags Login @Param account path string true "account" @Accept json @Success 200 {object} app.LoginDTO @Failure 400 bad_request_param account is invalid @Failure 401 not_allowed can't get login info of other user @Failure 500 system_error system error @Router /v1/login/{account} [get]
func (*LoginController) SignIn ¶
func (ctl *LoginController) SignIn(ctx *gin.Context)
@Title SignIn @Description user sign in @Tags Login @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/signin [put]
type ModelController ¶
type ModelController struct {
// contains filtered or unexported fields
}
func (*ModelController) AddRelatedDataset ¶
func (ctl *ModelController) AddRelatedDataset(ctx *gin.Context)
@Summary AddRelatedDataset @Description add related dataset to model @Tags Model @Param owner path string true "owner of model" @Param id path string true "id of model" @Param body body relatedResourceAddRequest true "body of related dataset" @Accept json @Success 202 {object} app.ResourceDTO @Router /v1/model/relation/{owner}/{id}/dataset [put]
func (*ModelController) Check ¶
func (ctl *ModelController) Check(ctx *gin.Context)
@Summary Check @Description check whether the name can be applied to create a new model @Tags Model @Param owner path string true "owner of model" @Param name path string true "name of model" @Accept json @Success 200 {object} canApplyResourceNameResp @Produce json @Router /v1/model/{owner}/{name}/check [get]
func (*ModelController) Create ¶
func (ctl *ModelController) Create(ctx *gin.Context)
@Summary Create @Description create model @Tags Model @Param body body modelCreateRequest true "body of creating model" @Accept json @Success 201 {object} app.ModelDTO @Failure 400 bad_request_body can't parse request body @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Failure 500 duplicate_creating create model repeatedly @Router /v1/model [post]
func (*ModelController) Delete ¶
func (ctl *ModelController) Delete(ctx *gin.Context)
@Summary Delete @Description delete model @Tags Model @Param owner path string true "owner of model" @Param name path string true "name of model" @Accept json @Success 204 @Produce json @Router /v1/model/{owner}/{name} [delete]
func (*ModelController) Get ¶
func (ctl *ModelController) Get(ctx *gin.Context)
@Summary Get @Description get model @Tags Model @Param owner path string true "owner of model" @Param name path string true "name of model" @Accept json @Success 200 {object} modelDetail @Produce json @Router /v1/model/{owner}/{name} [get]
func (*ModelController) List ¶
func (ctl *ModelController) List(ctx *gin.Context)
@Summary List @Description list model @Tags Model @Param owner path string true "owner of model" @Param name query string false "name of model" @Param repo_type query string false "repo type of model, value can be public or private" @Param count_per_page query int false "count per page" @Param page_num query int false "page num which starts from 1" @Param sort_by query string false "sort keys, value can be update_time, first_letter, download_count" @Accept json @Success 200 {object} modelsInfo @Produce json @Router /v1/model/{owner} [get]
func (*ModelController) ListGlobal ¶
func (ctl *ModelController) ListGlobal(ctx *gin.Context)
@Summary ListGlobal @Description list global public model @Tags Model @Param name query string false "name of model" @Param tags query string false "tags, separate multiple tags with commas" @Param tag_kinds query string false "tag kinds, separate multiple kinds with commas" @Param level query string false "model level, such as official, good" @Param count_per_page query int false "count per page" @Param page_num query int false "page num which starts from 1" @Param sort_by query string false "sort keys, value can be update_time, first_letter, download_count" @Accept json @Success 200 {object} app.GlobalModelsDTO @Produce json @Router /v1/model [get]
func (*ModelController) RemoveRelatedDataset ¶
func (ctl *ModelController) RemoveRelatedDataset(ctx *gin.Context)
@Summary RemoveRelatedDataset @Description remove related dataset to model @Tags Model @Param owner path string true "owner of model" @Param id path string true "id of model" @Param body body relatedResourceRemoveRequest true "body of related dataset" @Accept json @Success 204 @Router /v1/model/relation/{owner}/{id}/dataset [delete]
func (*ModelController) SetTags ¶
func (ctl *ModelController) SetTags(ctx *gin.Context)
@Summary SetTags @Description set tags for model @Tags Model @Param owner path string true "owner of model" @Param id path string true "id of model" @Param body body resourceTagsUpdateRequest true "body of tags" @Accept json @Success 202 @Router /v1/model/{owner}/{id}/tags [put]
func (*ModelController) Update ¶
func (ctl *ModelController) Update(ctx *gin.Context)
@Summary Update @Description update property of model @Tags Model @Param id path string true "id of model" @Param body body modelUpdateRequest true "body of updating model" @Accept json @Produce json @Router /v1/model/{owner}/{id} [put]
type PlayRecordRequest ¶
type ProjectController ¶
type ProjectController struct {
// contains filtered or unexported fields
}
func (*ProjectController) AddRelatedDataset ¶
func (ctl *ProjectController) AddRelatedDataset(ctx *gin.Context)
@Summary AddRelatedDataset @Description add related dataset to project @Tags Project @Param owner path string true "owner of project" @Param id path string true "id of project" @Param body body relatedResourceAddRequest true "body of related dataset" @Accept json @Success 202 {object} app.ResourceDTO @Router /v1/project/relation/{owner}/{id}/dataset [put]
func (*ProjectController) AddRelatedModel ¶
func (ctl *ProjectController) AddRelatedModel(ctx *gin.Context)
@Summary AddRelatedModel @Description add related model to project @Tags Project @Param owner path string true "owner of project" @Param id path string true "id of project" @Param body body relatedResourceAddRequest true "body of related model" @Accept json @Success 202 {object} app.ResourceDTO @Router /v1/project/relation/{owner}/{id}/model [put]
func (*ProjectController) Check ¶
func (ctl *ProjectController) Check(ctx *gin.Context)
@Summary Check @Description check whether the name can be applied to create a new project @Tags Project @Param owner path string true "owner of project" @Param name path string true "name of project" @Accept json @Success 200 {object} canApplyResourceNameResp @Produce json @Router /v1/project/{owner}/{name}/check [get]
func (*ProjectController) Create ¶
func (ctl *ProjectController) Create(ctx *gin.Context)
@Summary Create @Description create project @Tags Project @Param body body projectCreateRequest true "body of creating project" @Accept json @Produce json @Router /v1/project [post]
func (*ProjectController) Delete ¶
func (ctl *ProjectController) Delete(ctx *gin.Context)
@Summary Delete @Description delete project @Tags Project @Param owner path string true "owner of project" @Param name path string true "name of project" @Accept json @Success 204 @Produce json @Router /v1/project/{owner}/{name} [delete]
func (*ProjectController) Fork ¶
func (ctl *ProjectController) Fork(ctx *gin.Context)
@Summary Fork @Description fork project @Tags Project @Param owner path string true "owner of forked project" @Param id path string true "id of forked project" @Param body body projectForkRequest true "body of forking project" @Accept json @Produce json @Router /v1/project/{owner}/{id} [post]
func (*ProjectController) Get ¶
func (ctl *ProjectController) Get(ctx *gin.Context)
@Summary Get @Description get project @Tags Project @Param owner path string true "owner of project" @Param name path string true "name of project" @Accept json @Success 200 {object} projectDetail @Produce json @Router /v1/project/{owner}/{name} [get]
func (*ProjectController) List ¶
func (ctl *ProjectController) List(ctx *gin.Context)
@Summary List @Description list project @Tags Project @Param owner path string true "owner of project" @Param name query string false "name of project" @Param repo_type query string false "repo type of project, value can be public or private" @Param count_per_page query int false "count per page" @Param page_num query int false "page num which starts from 1" @Param sort_by query string false "sort keys, value can be update_time, first_letter, download_count" @Accept json @Success 200 {object} projectsInfo @Produce json @Router /v1/project/{owner} [get]
func (*ProjectController) ListGlobal ¶
func (ctl *ProjectController) ListGlobal(ctx *gin.Context)
@Summary ListGlobal @Description list global public project @Tags Project @Param name query string false "name of project" @Param tags query string false "tags, separate multiple tags with commas" @Param tag_kinds query string false "tag kinds, separate multiple kinds with commas" @Param level query string false "project level, such as official, good" @Param count_per_page query int false "count per page" @Param page_num query int false "page num which starts from 1" @Param sort_by query string false "sort keys, value can be update_time, first_letter, download_count" @Accept json @Success 200 {object} app.GlobalProjectsDTO @Produce json @Router /v1/project [get]
func (*ProjectController) RemoveRelatedDataset ¶
func (ctl *ProjectController) RemoveRelatedDataset(ctx *gin.Context)
@Summary RemoveRelatedDataset @Description remove related dataset to project @Tags Project @Param owner path string true "owner of project" @Param id path string true "id of project" @Param body body relatedResourceRemoveRequest true "body of related dataset" @Accept json @Success 204 @Router /v1/project/relation/{owner}/{id}/dataset [delete]
func (*ProjectController) RemoveRelatedModel ¶
func (ctl *ProjectController) RemoveRelatedModel(ctx *gin.Context)
@Summary RemoveRelatedModel @Description remove related model to project @Tags Project @Param owner path string true "owner of project" @Param id path string true "id of project" @Param body body relatedResourceRemoveRequest true "body of related model" @Accept json @Success 204 @Router /v1/project/relation/{owner}/{id}/model [delete]
func (*ProjectController) SetTags ¶
func (ctl *ProjectController) SetTags(ctx *gin.Context)
@Summary SetTags @Description set tags for project @Tags Project @Param owner path string true "owner of project" @Param id path string true "id of project" @Param body body resourceTagsUpdateRequest true "body of tags" @Accept json @Success 202 @Router /v1/project/{owner}/{id}/tags [put]
func (*ProjectController) Update ¶
func (ctl *ProjectController) Update(ctx *gin.Context)
@Summary Update @Description update project @Tags Project @Param owner path string true "owner of project" @Param id path string true "id of project" @Param body body projectUpdateRequest true "body of updating project" @Accept json @Produce json @Router /v1/project/{owner}/{id} [put]
type ProjectInternalController ¶ added in v1.5.0
type ProjectInternalController struct {
// contains filtered or unexported fields
}
func (*ProjectInternalController) GetSpaceById ¶ added in v1.5.0
func (ctl *ProjectInternalController) GetSpaceById(ctx *gin.Context)
@Summary Check @Description check whether the name can be applied to create a new project @Tags Project @Param owner path string true "owner of project" @Param name path string true "name of project" @Accept json @Success 200 {object} canApplyResourceNameResp @Produce json @Router /v1/project/{owner}/{name}/check [get]
type PromotionController ¶
type PromotionController struct {
// contains filtered or unexported fields
}
func (*PromotionController) Apply ¶
func (ctl *PromotionController) Apply(ctx *gin.Context)
@Summary Apply @Description apply the Promotion @Tags Promotion @Param id path string true "promotion id" @Param body body pc.PromotionApplyReq true "body of applying" @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/promotion/{id}/apply [post]
func (*PromotionController) Get ¶ added in v1.1.0
func (ctl *PromotionController) Get(ctx *gin.Context)
@Summary Get @Description get promotion @Tags Promotion @Accept json @Success 200 {object} app.PromotionDTO @Failure 400 {object} controller.responseData @Failure 404 {object} controller.responseData @Failure 500 {object} controller.responseData @Router /v1/promotion/{id} [get]
func (*PromotionController) GetUserPoints ¶
func (ctl *PromotionController) GetUserPoints(ctx *gin.Context)
@Summary GetUserPoints @Description get user points in promotion @Tags Promotion @Param account path string true "username" @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/promotion/{promotion}/points/{account} [get]
func (*PromotionController) GetUserRanking ¶
func (ctl *PromotionController) GetUserRanking(ctx *gin.Context)
@Summary GetUserRanking @Description get user points ranking in promotion @Tags Promotion @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/promotion/{promotion}/ranking [get]
func (*PromotionController) GetUserRegistration ¶ added in v1.3.2
func (ctl *PromotionController) GetUserRegistration(ctx *gin.Context)
@Summary GetUserRegistration @Description get user registrater promotion @Tags Promotion @Param account path string true "username" @Accept json @Success 201 @Failure 500 system_error system error @Router /v1/promotion/user/{account} [get]
func (*PromotionController) List ¶ added in v1.1.0
func (ctl *PromotionController) List(ctx *gin.Context)
@Summary List @Description list promotions @Tags Promotion @Accept json @Success 200 {object} app.PromotionsDTO @Failure 400 {object} controller.responseData @Failure 500 {object} controller.responseData @Router /v1/promotions [get]
type RepoFileController ¶
type RepoFileController struct {
// contains filtered or unexported fields
}
func (*RepoFileController) ContainApp ¶
func (ctl *RepoFileController) ContainApp(ctx *gin.Context)
@Summary ContainApp @Description repo file contain app @Tags RepoFile @Param user path string true "user" @Param name path string true "repo name" @Param path path string true "repo file path" @Accept json @Success 200 @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/repo/{type}/{user}/{name}/app [get]
func (*RepoFileController) ContainReadme ¶
func (ctl *RepoFileController) ContainReadme(ctx *gin.Context)
@Summary ContainReadme @Description repo file contain readme @Tags RepoFile @Param user path string true "user" @Param name path string true "repo name" @Param path path string true "repo file path" @Accept json @Success 200 @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/repo/{type}/{user}/{name}/readme [get]
func (*RepoFileController) Create ¶
func (ctl *RepoFileController) Create(ctx *gin.Context)
@Summary Create @Description create repo file @Tags RepoFile @Param name path string true "repo name" @Param path path string true "repo file path" @Param body body RepoFileCreateRequest true "body of creating repo file" @Accept json @Success 201 @Failure 400 bad_request_body can't parse request body @Failure 401 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/repo/{type}/{name}/file/{path} [post]
func (*RepoFileController) Delete ¶
func (ctl *RepoFileController) Delete(ctx *gin.Context)
@Summary Delete @Description Delete repo file @Tags RepoFile @Param name path string true "repo name" @Param path path string true "repo file path" @Accept json @Success 204 @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/repo/{type}/{name}/file/{path} [delete]
func (*RepoFileController) DeleteDir ¶
func (ctl *RepoFileController) DeleteDir(ctx *gin.Context)
@Summary DeleteDir @Description Delete repo directory @Tags RepoFile @Param name path string true "repo name" @Param path path string true "repo dir" @Accept json @Success 204 @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/repo/{type}/{name}/dir/{path} [delete]
func (*RepoFileController) Download ¶
func (ctl *RepoFileController) Download(ctx *gin.Context)
@Summary Download @Description Download repo file @Tags RepoFile @Param user path string true "user" @Param name path string true "repo name" @Param path path string true "repo file path" @Accept json @Success 200 {object} app.RepoFileDownloadDTO @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/repo/{type}/{user}/{name}/file/{path} [get]
func (*RepoFileController) DownloadRepo ¶
func (ctl *RepoFileController) DownloadRepo(ctx *gin.Context)
@Summary DownloadRepo @Description Download repo @Tags RepoFile @Param user path string true "user" @Param name path string true "repo name" @Accept json @Success 200 @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/repo/{type}/{user}/{name} [get]
func (*RepoFileController) List ¶
func (ctl *RepoFileController) List(ctx *gin.Context)
@Summary List @Description list repo file in a path @Tags RepoFile @Param user path string true "user" @Param name path string true "repo name" @Param path query string true "repo file path" @Accept json @Success 200 {object} app.RepoPathItem @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/repo/{type}/{user}/{name}/files [get]
func (*RepoFileController) Preview ¶
func (ctl *RepoFileController) Preview(ctx *gin.Context)
@Summary Preview @Description preview repo file @Tags RepoFile @Param user path string true "user" @Param name path string true "repo name" @Param path path string true "repo file path" @Accept json @Success 200 @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/repo/{type}/{user}/{name}/file/{path}/preview [get]
func (*RepoFileController) Update ¶
func (ctl *RepoFileController) Update(ctx *gin.Context)
@Summary Update @Description update repo file @Tags RepoFile @Param name path string true "repo name" @Param path path string true "repo file path" @Param body body RepoFileUpdateRequest true "body of updating repo file" @Accept json @Success 202 @Failure 400 bad_request_body can't parse request body @Failure 401 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/repo/{type}/{name}/file/{path} [put]
type RepoFileCreateRequest ¶
type RepoFileUpdateRequest ¶
type RepoFileUpdateRequest = RepoFileCreateRequest
type SearchController ¶
type SearchController struct {
// contains filtered or unexported fields
}
func (*SearchController) List ¶
func (ctl *SearchController) List(ctx *gin.Context)
@Title Search @Description search resource and user @Tags Search @Param name query string true "name of resource or user" @Accept json @Success 200 {object} app.SearchDTO @Failure 500 system_error system error @Router /v1/search [get]
type StudentApplyRequest ¶
type Tags ¶
type Tags struct { ModelTagDomains []string `json:"model" required:"true"` ProjectTagDomains []string `json:"project" required:"true"` DatasetTagDomains []string `json:"dataset" required:"true"` GlobalModelTagDomains []string `json:"global_model" required:"true"` GlobalProjectTagDomains []string `json:"global_project" required:"true"` GlobalDatasetTagDomains []string `json:"global_dataset" required:"true"` }
type TagsController ¶
type TagsController struct {
// contains filtered or unexported fields
}
func (*TagsController) List ¶
func (ctl *TagsController) List(ctx *gin.Context)
@Title List @Description list tags @Tags Tags @Accept json @Success 200 {object} app.DomainTagsDTO @Failure 500 system_error system error @Router /v1/tags/{type} [get]
type TrainingController ¶
type TrainingController struct {
// contains filtered or unexported fields
}
func (*TrainingController) Create ¶
func (ctl *TrainingController) Create(ctx *gin.Context)
@Summary Create @Description create training @Tags Training @Param pid path string true "project id" @Param body body TrainingCreateRequest true "body of creating training" @Accept json @Success 201 {object} trainingCreateResp @Failure 400 bad_request_body can't parse request body @Failure 401 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/train/project/{pid}/training [post]
func (*TrainingController) Delete ¶
func (ctl *TrainingController) Delete(ctx *gin.Context)
@Summary Delete @Description delete training @Tags Training @Param pid path string true "project id" @Param id path string true "training id" @Accept json @Success 204 @Failure 500 system_error system error @Router /v1/train/project/{pid}/training/{id} [delete]
func (*TrainingController) Get ¶
func (ctl *TrainingController) Get(ctx *gin.Context)
@Summary Get @Description get training info @Tags Training @Param pid path string true "project id" @Param id path string true "training id" @Accept json @Success 200 {object} trainingDetail @Failure 500 system_error system error @Router /v1/train/project/{pid}/training/{id} [get]
func (*TrainingController) GetLastTrainingConfig ¶
func (ctl *TrainingController) GetLastTrainingConfig(ctx *gin.Context)
@Summary GetLastTrainingConfig @Description get user last preset training config @Tags Training @Param pid path string true "project id" @Accept json @Success 200 {object} app.TrainingConfigDTO @Failure 500 system_error system error @Router /v1/train/project/{pid}/config [get]
func (*TrainingController) GetResultDownloadURL ¶
func (ctl *TrainingController) GetResultDownloadURL(ctx *gin.Context)
@Summary GetLog @Description get log url of training for downloading @Tags Training @Param pid path string true "project id" @Param id path string true "training id" @Param type path string true "training result: log, output" @Accept json @Success 200 {object} trainingLogResp @Failure 500 system_error system error @Router /v1/train/project/{pid}/training/{id}/result/{type} [get]
func (*TrainingController) List ¶
func (ctl *TrainingController) List(ctx *gin.Context)
@Summary List @Description get trainings @Tags Training @Param pid path string true "project id" @Accept json @Success 200 {object} app.TrainingSummaryDTO @Failure 500 system_error system error @Router /v1/train/project/{pid}/training [get]
func (*TrainingController) ListByWS ¶
func (ctl *TrainingController) ListByWS(ctx *gin.Context)
@Summary List @Description get trainings @Tags Training @Param pid path string true "project id" @Accept json @Success 200 {object} app.TrainingSummaryDTO @Failure 500 system_error system error @Router /v1/train/project/{pid}/training/ws [get]
func (*TrainingController) Recreate ¶
func (ctl *TrainingController) Recreate(ctx *gin.Context)
@Summary Recreate @Description recreate training @Tags Training @Param pid path string true "project id" @Param id path string true "training id" @Accept json @Success 201 {object} trainingCreateResp @Failure 400 bad_request_body can't parse request body @Failure 401 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/train/project/{pid}/training/{id} [post]
func (*TrainingController) Terminate ¶
func (ctl *TrainingController) Terminate(ctx *gin.Context)
@Summary Terminate @Description terminate training @Tags Training @Param pid path string true "project id" @Param id path string true "training id" @Accept json @Success 202 @Failure 500 system_error system error @Router /v1/train/project/{pid}/training/{id} [put]
type TrainingCreateRequest ¶
type TrainingCreateRequest struct { Name string `json:"name"` Desc string `json:"desc"` CodeDir string `json:"code_dir"` BootFile string `json:"boot_file"` Hyperparameters []KeyValue `json:"hyperparameter"` Env []KeyValue `json:"env"` Models []TrainingRef `json:"models"` Datasets []TrainingRef `json:"datasets"` EnableAim bool `json:"enable_aim"` EnableOutput bool `json:"enable_output"` Compute Compute `json:"compute"` }
type TrainingRef ¶
type UserAgreement ¶
type UserAgreement struct {
Type agreement.AgreementType `json:"type"`
}
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
func (*UserController) AddFollowing ¶
func (ctl *UserController) AddFollowing(ctx *gin.Context)
@Title Create @Description add a following @Tags Following @Param body body followingCreateRequest true "body of creating following" @Accept json @Success 201 @Failure 400 bad_request_body can't parse request body @Failure 401 bad_request_param some parameter of body is invalid @Failure 402 not_allowed can't add yourself as your following @Failure 403 resource_not_exists the target of following does not exist @Failure 404 duplicate_creating add following again @Failure 500 system_error system error @Router /v1/user/following [post]
func (*UserController) BindEmail ¶
func (ctl *UserController) BindEmail(ctx *gin.Context)
@Summary BindEmail @Description bind email according the code @Tags User @Param body body EmailCode true "email and code" @Accept json @Success 201 {object} app.UserDTO @Failure 400 bad_request_body can't parse request body @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Failure 500 duplicate_creating create user repeatedly @Router /v1/user/email/bind [post]
func (*UserController) CheckEmail ¶
func (ctl *UserController) CheckEmail(ctx *gin.Context)
@Title CheckEmail @Description check user email @Tags User @Accept json @Success 200 @Failure 400 no email this api need email of user" @Router /v1/user/check_email [get]
func (*UserController) CheckWhiteList ¶
func (ctl *UserController) CheckWhiteList(ctx *gin.Context)
@Summary CheckWhiteList @Description check user whitelist info @Tags User @Param type path string true "type" @Accept json @Success 200 {object} userapp.WhitelistDTO @Failure 400 bad_request_body can't parse request body @Router /v1/user/whitelist/{type} [Get]
func (*UserController) Get ¶
func (ctl *UserController) Get(ctx *gin.Context)
@Summary Get @Description get user @Tags User @Param account query string false "account" @Accept json @Success 200 {object} userDetail @Failure 400 bad_request_param account is invalid @Failure 401 resource_not_exists user does not exist @Failure 500 system_error system error @Router /v1/user [get]
func (*UserController) GetInfo ¶
func (ctl *UserController) GetInfo(ctx *gin.Context)
@Summary GetInfo @Description get user apply info @Tags User @Accept json @Success 200 {object} app.UserDTO @Failure 400 bad_request_body can't parse request body @Router /v1/user/info/{account} [get]
func (*UserController) GitlabToken ¶
func (ctl *UserController) GitlabToken(ctx *gin.Context)
@Title GitLabToken @Description get code platform info of user @Tags User @Param account path string true "account" @Accept json @Success 200 {object} platformInfo @Failure 400 bad_request_param account is invalid @Failure 401 not_allowed can't get info of other user @Router /{account}/gitlab [get]
func (*UserController) ListFollower ¶
func (ctl *UserController) ListFollower(ctx *gin.Context)
@Title List @Description list followers @Tags Follower @Param account path string true "the account the followers belong to" @Accept json @Success 200 {object} app.FollowsDTO @Failure 500 system_error system error @Router /v1/user/follower/{account} [get]
func (*UserController) ListFollowing ¶
func (ctl *UserController) ListFollowing(ctx *gin.Context)
@Title List @Description list followings @Tags Following @Param account path string true "the account the followings belong to" @Accept json @Success 200 {object} app.FollowsDTO @Failure 500 system_error system error @Router /v1/user/following/{account} [get]
func (*UserController) ListWhitelist ¶ added in v1.3.1
func (ctl *UserController) ListWhitelist(ctx *gin.Context)
@Summary ListWhiteList @Description list user whitelist @Tags user @Success 200 {object} []string @Failure 500 {object} responseData @Router /v1/user/whitelist [Get]
func (*UserController) RefreshGitlabToken ¶
func (ctl *UserController) RefreshGitlabToken(ctx *gin.Context)
@Title RefreshGitlabToken @Description refresh platform token of user @Tags User @Param account path string true "account" @Accept json @Success 201 created PlatformToken @Failure 400 bad_request_param account is invalid @Failure 401 not_allowed can't get info of other user @Router /{account}/gitlab/refresh [post]
func (*UserController) RemoveFollowing ¶
func (ctl *UserController) RemoveFollowing(ctx *gin.Context)
@Title Delete @Description remove a following @Tags Following @Param account path string true "the account of following" @Accept json @Success 204 @Failure 400 bad_request_param invalid account @Failure 401 not_allowed can't remove yourself from your following @Failure 500 system_error system error @Router /v1/user/following/{account} [delete]
func (*UserController) SendBindEmail ¶
func (ctl *UserController) SendBindEmail(ctx *gin.Context)
@Summary SendBindEmail @Description send code to user @Tags User @Accept json @Success 201 {object} app.UserDTO @Failure 500 system_error system error @Failure 500 duplicate_creating create user repeatedly @Router /v1/user/email/sendbind [post]
func (*UserController) UpdateAgreement ¶
func (ctl *UserController) UpdateAgreement(ctx *gin.Context)
@Summary Update Agreement @Description update user agreement info @Tags User @Param body body UserAgreement true "body of update user agreement" @Accept json @Produce json @Router /v1/user/agreement [put]
func (*UserController) UpdateUserRegistrationInfo ¶
func (ctl *UserController) UpdateUserRegistrationInfo(ctx *gin.Context)
@Summary UpdateUserRegistrationInfo @Description update user info @Tags User @Param body body userctl.UserInfoUpdateRequest true "body of update user information" @Accept json @Success 201 {object} UserBasicInfoUpdateRequest @Failure 400 bad_request_body can't parse request body @Failure 400 bad_request_param some parameter of body is invalid @Failure 500 system_error system error @Router /v1/user/info [put]
type UserPointsController ¶
type UserPointsController struct {
// contains filtered or unexported fields
}
func (*UserPointsController) PointsDetails ¶
func (ctl *UserPointsController) PointsDetails(ctx *gin.Context)
@Summary get user points details @Description get user points details @Tags UserPoints @Accept json @Success 200 {object} app.UserPointsDetailsDTO @Failure 500 system_error system error @Router /v1/user_points [get]
func (*UserPointsController) TasksDoc ¶
func (ctl *UserPointsController) TasksDoc(ctx *gin.Context)
@Summary task doc @Description task doc @Tags UserPoints @Accept json @Success 200 {object} app.TaskDocDTO @Failure 500 system_error system error @Router /v1/user_points/taskdoc [get]
func (*UserPointsController) TasksOfDay ¶
func (ctl *UserPointsController) TasksOfDay(ctx *gin.Context)
@Summary tasks of day @Description tasks of day @Tags UserPoints @Accept json @Success 200 {object} app.TasksCompletionInfoDTO @Failure 500 system_error system error @Router /v1/user_points/tasks [get]
Source Files ¶
- access.go
- activity.go
- aiccfinetune.go
- aiccfinetune_request.go
- base.go
- bigmodel.go
- bigmodel_request.go
- challenge.go
- challenge_request.go
- cloud.go
- cloud_request.go
- competition.go
- computility_web.go
- config.go
- course.go
- course_request.go
- dataset.go
- dataset_request.go
- finetune.go
- finetune_request.go
- follower.go
- following.go
- homepage.go
- homepage_request.go
- inference.go
- inference_internal.go
- inference_request.go
- like.go
- like_request.go
- login.go
- middleware.go
- model.go
- model_request.go
- operate_log.go
- project.go
- project_internal.go
- project_request.go
- promotion.go
- repofile.go
- repofile_request.go
- resource.go
- response.go
- search.go
- tags.go
- training.go
- training_request.go
- user.go
- user_points.go
- user_request.go