Documentation
¶
Index ¶
- type AuthRequest
- type AuthResponse
- type CreateKeyResultResponse
- type CreateObjectiveResponse
- type CreateOrUpdateKeyResult
- type CreateOrUpdateObjective
- type DeleteObjectiveReq
- type DeleteRecordReq
- type DepartmentDetails
- type FieldMappingsResponse
- type KeyResult
- type KeyResultField
- type ListOkrRequest
- type ListOkrResponse
- type Objective
- type ObjectiveField
- type TreeNode
- type UpdateRecordReq
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRequest ¶
type AuthRequest struct {
AuthCode string `json:"authCode" valid:"required"`
}
AuthRequest 指定了 `POST /api/v1/auth/dingtalk` 接口的请求参数.
type AuthResponse ¶
type AuthResponse struct {
Token string `json:"token"`
}
AuthResponse 指定了 `POST /api/v1/auth/dingtalk` 接口的返回参数.
type CreateKeyResultResponse ¶
type CreateKeyResultResponse struct {
ID string `json:"id"`
}
type CreateObjectiveResponse ¶
type CreateObjectiveResponse struct {
ID string `json:"id"`
}
type CreateOrUpdateKeyResult ¶
type CreateOrUpdateKeyResult struct { Title string `json:"title" binding:"required"` Weight int `json:"weight" binding:"required,min=1,max=100"` Date string `json:"date" binding:"required,monthYearFormat"` Completed string `json:"completed" binding:"required,oneof=未开始 已完成 未完成"` SelfRating *int `json:"selfRating" binding:"omitempty,min=0,max=120"` Reason string `json:"reason" binding:"omitempty"` LeaderRating *int `json:"leaderRating,omitempty" binding:"omitempty"` UserId string `json:"userId" binding:"omitempty"` ObjectiveID string `json:"objectiveID" binding:"omitempty"` Criteria string `json:"criteria" binding:"omitempty"` }
type CreateOrUpdateObjective ¶
type DeleteObjectiveReq ¶
type DeleteObjectiveReq struct { DeleteRecordReq KeyResultIDs []string `json:"keyResultIds"` // 从 JSON 请求体绑定关键结果的 IDs UserId string `json:"userId,omitempty"` }
type DeleteRecordReq ¶
type DeleteRecordReq struct {
ID string `uri:"id" binding:"required"`
}
type DepartmentDetails ¶
DepartmentDetails 结构体用于在API响应中包含部门信息
type FieldMappingsResponse ¶
type FieldMappingsResponse struct { Objective ObjectiveField `json:"objective"` KeyResult KeyResultField `json:"keyResult"` }
FieldMappingsResponse 指定了 `POST /api/v1/fields` 接口的返回参数.
type KeyResult ¶
type KeyResult struct { ID string `json:"id"` Title string `json:"title"` Weight int `json:"weight"` Owner string `json:"owner"` Date string `json:"date"` Completed string `json:"completed"` SelfRating *int `json:"selfRating"` Reason string `json:"reason"` ObjectiveID string `json:"objectiveID"` Criteria string `json:"criteria"` Leader string `json:"leader"` LeaderRating *int `json:"leaderRating"` Department string `json:"department"` CreatedTime int64 `json:"createdTime"` LastModifiedTime int64 `json:"lastModifiedTime"` }
type KeyResultField ¶
type KeyResultField struct { Title string `json:"title" field:"fldrxgL9LV"` Owner string `json:"owner" field:"fldjEZmY3S"` Date string `json:"date" field:"fldnMxJlKj"` Weight string `json:"weight" field:"fld5HXzwmN"` Completed string `json:"completed" field:"fldG2nSDTZ"` SelfRating string `json:"selfRating" field:"fldvjvtxRr"` Criteria string `json:"criteria" field:"fldPGxpg2b"` ObjectiveID string `json:"objectiveId" field:"fldW8TFesB"` Reason string `json:"reason" field:"fld6OsYad8"` Leader string `json:"leader" field:"fldfPqFgwt"` LeaderRating string `json:"leaderRating" field:"fld6x4tz0t"` Department string `json:"department" field:"fldeDq4odj"` }
type ListOkrRequest ¶
type ListOkrRequest struct { Months []string `json:"months" form:"months" binding:"omitempty,dive,monthYearFormat"` SortBy string `json:"sortBy" form:"sortBy" binding:"omitempty"` UserID string `json:"userId" form:"userId" binding:"omitempty"` OrderBy string `json:"orderBy" form:"orderBy" binding:"omitempty"` }
ListOkrResquest 指定了 `GET|POST /api/v1/okrs` 接口的请求参数.
type ListOkrResponse ¶
ListOkrResponse 指定了 `GET|POST /api/v1/okrs` 接口的返回参数.
type ObjectiveField ¶
type UpdateRecordReq ¶
type UpdateRecordReq struct {
ID string `uri:"id" binding:"required"`
}
type UserResponse ¶
type UserResponse struct { UserID string `json:"uid"` Name string `json:"name"` Title string `json:"title"` Status string `json:"status"` Avatar string `json:"avatar"` JobNumber string `json:"jobNumber"` HiredDate *time.Time `json:"hiredDate,omitempty"` // 入职日期 Roles []string `json:"roles"` Departments []DepartmentDetails `json:"departments"` }
UserResponse 结构体用于API响应
Click to show internal directories.
Click to hide internal directories.