Documentation ¶
Index ¶
- func CodeCraftClientBuilder() *http_client.HcHttpClientBuilder
- func GenReqDefForCreateCompetitionScore() *def.HttpRequestDef
- func GenReqDefForListCompetitionWorks() *def.HttpRequestDef
- func GenReqDefForRegisterCompetitionInfo() *def.HttpRequestDef
- func GenReqDefForUpdateCompetitionScore() *def.HttpRequestDef
- type CodeCraftClient
- func (c *CodeCraftClient) CreateCompetitionScore(request *model.CreateCompetitionScoreRequest) (*model.CreateCompetitionScoreResponse, error)
- func (c *CodeCraftClient) ListCompetitionWorks(request *model.ListCompetitionWorksRequest) (*model.ListCompetitionWorksResponse, error)
- func (c *CodeCraftClient) RegisterCompetitionInfo(request *model.RegisterCompetitionInfoRequest) (*model.RegisterCompetitionInfoResponse, error)
- func (c *CodeCraftClient) UpdateCompetitionScore(request *model.UpdateCompetitionScoreRequest) (*model.UpdateCompetitionScoreResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeCraftClientBuilder ¶
func CodeCraftClientBuilder() *http_client.HcHttpClientBuilder
func GenReqDefForCreateCompetitionScore ¶
func GenReqDefForCreateCompetitionScore() *def.HttpRequestDef
func GenReqDefForListCompetitionWorks ¶
func GenReqDefForListCompetitionWorks() *def.HttpRequestDef
func GenReqDefForRegisterCompetitionInfo ¶
func GenReqDefForRegisterCompetitionInfo() *def.HttpRequestDef
func GenReqDefForUpdateCompetitionScore ¶
func GenReqDefForUpdateCompetitionScore() *def.HttpRequestDef
Types ¶
type CodeCraftClient ¶
type CodeCraftClient struct {
HcClient *http_client.HcHttpClient
}
func NewCodeCraftClient ¶
func NewCodeCraftClient(hcClient *http_client.HcHttpClient) *CodeCraftClient
func (*CodeCraftClient) CreateCompetitionScore ¶
func (c *CodeCraftClient) CreateCompetitionScore(request *model.CreateCompetitionScoreRequest) (*model.CreateCompetitionScoreResponse, error)
针对在第三方提交作品的场景:第三方服务对作品完成判分后,调用该接口将作品信息及作品得分返回给大赛平台
func (*CodeCraftClient) ListCompetitionWorks ¶
func (c *CodeCraftClient) ListCompetitionWorks(request *model.ListCompetitionWorksRequest) (*model.ListCompetitionWorksResponse, error)
第三方服务获取某个大赛某个阶段中一段时间内提交的作品信息。其中以请求参数read_time作为结束时间,定义向前一天或一小时内的时间作为查询范围
func (*CodeCraftClient) RegisterCompetitionInfo ¶
func (c *CodeCraftClient) RegisterCompetitionInfo(request *model.RegisterCompetitionInfoRequest) (*model.RegisterCompetitionInfoResponse, error)
第三方服务验证用户是否在大赛平台报名、是否组建团队、是否可以提交作品。如果已经报名但是未组建团队,则创建一个虚拟团队,设置为允许提交作品。如果已经组建团队则根据大赛报名截止时间判断是否可以提交作品。返回团队ID、是否可以提交作品
func (*CodeCraftClient) UpdateCompetitionScore ¶
func (c *CodeCraftClient) UpdateCompetitionScore(request *model.UpdateCompetitionScoreRequest) (*model.UpdateCompetitionScoreResponse, error)
针对在大赛平台提交作品的场景:第三方服务对作品完成判分后,根据作品ID调用该接口将作品分数、作品状态等信息返回给大赛平台
Click to show internal directories.
Click to hide internal directories.