Documentation
¶
Index ¶
- type AcceptInviteRequest
- type AcceptInviteResponse
- type Access
- type AccessListRequest
- type AccessListResponse
- type AddGroupAccessRequest
- type AddGroupAccessResponse
- type AddMemberRequest
- type AddMemberResponse
- type AddUserAccessRequest
- type AddUserAccessResponse
- type ArchiveRequest
- type ArchiveResponse
- type AuditInviteCodeRequest
- type AuditInviteCodeResponse
- type CategoryList
- type Code
- type CodeRequest
- type CodeResponse
- type CreateGroupInviteCodeRequest
- type CreateGroupInviteCodeResponse
- type CreateGroupRequest
- type CreateGroupResponse
- type CreateInviteCodeRequest
- type CreateInviteCodeResponse
- type CreateInviteLinkRequest
- type CreateRequest
- type CreateResponse
- type DelScoreRequest
- type DelScoreResponse
- type DeleteAccessRequest
- type DeleteAccessResponse
- type DeleteCodeRequest
- type DeleteCodeResponse
- type DeleteGroupRequest
- type DeleteGroupResponse
- type DeleteInviteCodeRequest
- type DeleteInviteCodeResponse
- type DeleteRequest
- type DeleteResponse
- type GetSettingRequest
- type GetSettingResponse
- type Group
- type GroupInviteCodeListRequest
- type GroupInviteCodeListResponse
- type GroupListRequest
- type GroupListResponse
- type GroupMember
- type GroupMemberListRequest
- type GroupMemberListResponse
- type InfoRequest
- type InfoResponse
- type InviteCode
- type InviteCodeInfoAccess
- type InviteCodeInfoGroup
- type InviteCodeInfoRequest
- type InviteCodeInfoResponse
- type InviteCodeListRequest
- type InviteCodeListResponse
- type LastScoreRequest
- type LastScoreResponse
- type ListRequest
- type ListResponse
- type MigrateEsRequest
- type MigrateEsResponse
- type PutScoreRequest
- type PutScoreResponse
- type RemoveMemberRequest
- type RemoveMemberResponse
- type Score
- type ScoreListRequest
- type ScoreListResponse
- type Script
- type SelfScoreRequest
- type SelfScoreResponse
- type StateRequest
- type StateResponse
- type UpdateAccessRequest
- type UpdateAccessResponse
- type UpdateCodeRequest
- type UpdateCodeResponse
- type UpdateCodeSettingRequest
- type UpdateCodeSettingResponse
- type UpdateGroupRequest
- type UpdateGroupResponse
- type UpdateLibInfoRequest
- type UpdateLibInfoResponse
- type UpdateMemberRequest
- type UpdateMemberResponse
- type UpdateScriptGrayRequest
- type UpdateScriptGrayResponse
- type UpdateScriptPublicRequest
- type UpdateScriptPublicResponse
- type UpdateScriptUnwellRequest
- type UpdateScriptUnwellResponse
- type UpdateSettingRequest
- type UpdateSettingResponse
- type UpdateSyncSettingRequest
- type UpdateSyncSettingResponse
- type VersionCodeRequest
- type VersionCodeResponse
- type VersionListRequest
- type VersionListResponse
- type WatchRequest
- type WatchResponse
- type WebhookRequest
- type WebhookResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptInviteRequest ¶
type AcceptInviteRequest struct { mux.Meta `path:"/scripts/invite/:code/accept" method:"PUT"` Code string `uri:"code" binding:"required" label:"code"` // 邀请码类型不能拒绝 Accept bool `form:"accept" json:"accept" binding:"required" label:"是否接受"` }
AcceptInviteRequest 接受邀请
type AcceptInviteResponse ¶
type AcceptInviteResponse struct { }
type Access ¶
type Access struct { ID int64 `json:"id"` LinkID int64 `json:"link_id"` // 关联id Name string `json:"name"` Avatar string `json:"avatar"` Type script_entity.AccessType `json:"type"` // id类型 1=用户id 2=组id InviteStatus script_entity.AccessInviteStatus `json:"invite_status"` // 邀请状态 1=已接受 2=已拒绝 3=待接受 Role script_entity.AccessRole `json:"role"` IsExpire bool `json:"is_expire"` Expiretime int64 `json:"expiretime"` Createtime int64 `json:"createtime"` }
type AccessListRequest ¶
type AccessListRequest struct { mux.Meta `path:"/scripts/:id/access" method:"GET"` ScriptID int64 `uri:"id" binding:"required" label:"id"` httputils.PageRequest `form:",inline"` }
AccessListRequest 访问控制列表
type AccessListResponse ¶
type AccessListResponse struct { httputils.PageResponse[*Access] `json:",inline"` }
type AddGroupAccessRequest ¶
type AddGroupAccessRequest struct { mux.Meta `path:"/scripts/:id/access/group" method:"POST"` ScriptID int64 `uri:"id" binding:"required" label:"id"` GroupID int64 `form:"group_id" json:"group_id" binding:"required" label:"群组id"` Role script_entity.AccessRole `form:"role" binding:"required,oneof=guest manager" label:"访问权限"` // 访问权限 guest=访客 manager=管理员 Expiretime int64 `form:"expiretime,default=0" label:"过期时间"` // 0 为永久 }
AddGroupAccessRequest 添加组权限
type AddGroupAccessResponse ¶
type AddGroupAccessResponse struct { }
type AddMemberRequest ¶
type AddMemberRequest struct { mux.Meta `path:"/scripts/:id/group/:gid/member" method:"POST"` ScriptID int64 `uri:"id" binding:"required" label:"id"` GroupID int64 `uri:"gid" binding:"required" label:"gid"` UserID int64 `json:"user_id" binding:"required"` Expiretime int64 `form:"expiretime,default=0" json:"expiretime"` }
AddMemberRequest 添加成员
type AddMemberResponse ¶
type AddMemberResponse struct { }
type AddUserAccessRequest ¶
type AddUserAccessRequest struct { mux.Meta `path:"/scripts/:id/access/user" method:"POST"` ScriptID int64 `uri:"id" binding:"required" label:"id"` UserID int64 `form:"user_id" json:"user_id" binding:"required" label:"用户id"` Role script_entity.AccessRole `form:"role" binding:"required,oneof=guest manager" label:"访问权限"` // 访问权限 guest=访客 manager=管理员 Expiretime int64 `form:"expiretime,default=0" label:"过期时间"` // 0 为永久 }
AddUserAccessRequest 添加用户权限, 通过用户名进行邀请
type AddUserAccessResponse ¶
type AddUserAccessResponse struct { }
type ArchiveRequest ¶
type ArchiveRequest struct { mux.Meta `path:"/scripts/:id/archive" method:"PUT"` ID int64 `uri:"id" binding:"required"` Archive bool `json:"archive" binding:"omitempty,required"` }
ArchiveRequest 归档脚本
type ArchiveResponse ¶
type ArchiveResponse struct { }
type AuditInviteCodeRequest ¶
type AuditInviteCodeRequest struct { mux.Meta `path:"/scripts/:id/invite/code/:code_id/audit" method:"PUT"` ScriptID int64 `uri:"id" binding:"required" label:"id"` CodeID int64 `uri:"code_id" binding:"required" label:"code_id"` Status int32 `form:"status" binding:"required,oneof=1 2" label:"状态"` // 1=通过 2=拒绝 }
AuditInviteCodeRequest 审核邀请码
type AuditInviteCodeResponse ¶
type AuditInviteCodeResponse struct { }
type CategoryList ¶
type CategoryList struct { ID int64 `json:"id"` Name string `json:"name"` // 本分类下脚本数量 Num int64 `json:"num"` Sort int32 `json:"sort"` Createtime int64 `json:"createtime"` Updatetime int64 `json:"updatetime"` }
CategoryList 拥有的分类列表
type Code ¶
type Code struct { ID int64 `json:"id" form:"id"` user_entity.UserInfo `json:",inline"` Meta string `json:"meta,omitempty"` MetaJson interface{} `json:"meta_json"` ScriptID int64 `json:"script_id"` Version string `json:"version"` Changelog string `json:"changelog"` IsPreRelease script_entity.EnablePreRelease `json:"is_pre_release"` Status int64 `json:"status"` Createtime int64 `json:"createtime"` Code string `json:"code,omitempty"` Definition string `json:"definition,omitempty"` }
type CodeRequest ¶
type CodeRequest struct { mux.Meta `path:"/scripts/:id/code" method:"GET"` ID int64 `uri:"id" binding:"required"` }
CodeRequest 获取脚本代码信息
type CodeResponse ¶
type CreateGroupInviteCodeRequest ¶
type CreateGroupInviteCodeRequest struct { mux.Meta `path:"/scripts/:id/invite/group/:gid/code" method:"POST"` ScriptID int64 `uri:"id" binding:"required" label:"id"` GroupID int64 `uri:"gid" binding:"required" label:"gid"` Count int32 `form:"count,default=1" json:"count" label:"数量"` Audit bool `form:"audit" json:"audit" label:"是否需要审核"` Days int32 `form:"days,default=0" json:"days" label:"有效天数"` // 0 为永久 }
CreateGroupInviteCodeRequest 创建群组邀请码
type CreateGroupInviteCodeResponse ¶
type CreateGroupInviteCodeResponse struct {
Code []string `json:"code"`
}
type CreateGroupRequest ¶
type CreateGroupRequest struct { mux.Meta `path:"/scripts/:id/group" method:"POST"` ScriptID int64 `uri:"id" binding:"required" label:"id"` Name string `json:"name" binding:"required,max=20" label:"群组名"` Description string `json:"description" binding:"required,max=200" label:"群组描述"` }
CreateGroupRequest 创建群组
type CreateGroupResponse ¶
type CreateGroupResponse struct { }
type CreateInviteCodeRequest ¶
type CreateInviteCodeRequest struct { mux.Meta `path:"/scripts/:id/invite/code" method:"POST"` ScriptID int64 `uri:"id" binding:"required" label:"id"` Count int32 `form:"count,default=1" json:"count" label:"数量"` Audit bool `form:"audit" json:"audit" label:"是否需要审核"` Days int32 `form:"days,default=0" json:"days" label:"有效天数"` // 0 为永久 }
CreateInviteCodeRequest 创建邀请码
type CreateInviteCodeResponse ¶
type CreateInviteCodeResponse struct {
Code []string `json:"code"`
}
type CreateInviteLinkRequest ¶
type CreateInviteLinkRequest struct { ScriptID int64 LinkID int64 Type script_entity.InviteType // 1=权限邀请码 2=群组邀请码 }
CreateInviteLinkRequest 创建邀请链接
type CreateRequest ¶
type CreateRequest struct { mux.Meta `path:"/scripts" method:"POST"` Content string `form:"content" binding:"required,max=102400" label:"脚本详细描述"` Code string `form:"code" binding:"required,max=10485760" label:"脚本代码"` Name string `form:"name" binding:"max=128" label:"库的名字"` Description string `form:"description" binding:"max=10240" label:"库的描述"` Definition string `form:"definition" binding:"max=10240" label:"库的定义文件"` Version string `form:"version" binding:"max=32" label:"库的版本"` Type script_entity.Type `form:"type" binding:"required,oneof=1 2 3" label:"脚本类型"` // 脚本类型:1 用户脚本 2 脚本引用库 3 订阅脚本(不支持) Public script_entity.Public `form:"public" binding:"required,oneof=1 2 3" label:"公开类型"` // 公开类型:1 公开 2 半公开 3 私有 Unwell script_entity.UnwellContent `form:"unwell" binding:"required,oneof=1 2" label:"不适内容"` // 不适内容: 1 不适 2 适用 Changelog string `form:"changelog" binding:"max=102400" label:"更新日志"` }
CreateRequest 创建脚本
type CreateResponse ¶
type CreateResponse struct {
ID int64 `json:"id"`
}
type DelScoreRequest ¶
type DelScoreRequest struct { mux.Meta `path:"/scripts/:id/score/:scoreId" method:"DELETE"` ScriptId int64 `uri:"id" binding:"required"` ScoreId int64 `uri:"scoreId" binding:"required"` }
DelScoreRequest 用于删除脚本的评价,注意,只有管理员才有权限删除评价
type DelScoreResponse ¶
type DelScoreResponse struct { }
type DeleteAccessRequest ¶
type DeleteAccessRequest struct { mux.Meta `path:"/scripts/:id/access/:aid" method:"DELETE"` ScriptID int64 `uri:"id" binding:"required" label:"id"` AccessID int64 `uri:"aid" binding:"required" label:"id"` }
DeleteAccessRequest 删除访问控制
type DeleteAccessResponse ¶
type DeleteAccessResponse struct { }
type DeleteCodeRequest ¶
type DeleteCodeRequest struct { mux.Meta `path:"/scripts/:id/code/:codeId" method:"DELETE"` ID int64 `uri:"id" binding:"required"` CodeID int64 `uri:"codeId" binding:"required"` }
DeleteCodeRequest 删除脚本/库代码
type DeleteCodeResponse ¶
type DeleteCodeResponse struct { }
type DeleteGroupRequest ¶
type DeleteGroupRequest struct { mux.Meta `path:"/scripts/:id/group/:gid" method:"DELETE"` ScriptID int64 `uri:"id" binding:"required" label:"id"` GroupID int64 `uri:"gid" binding:"required" label:"gid"` }
DeleteGroupRequest 删除群组
type DeleteGroupResponse ¶
type DeleteGroupResponse struct { }
type DeleteInviteCodeRequest ¶
type DeleteInviteCodeRequest struct { mux.Meta `path:"/scripts/:id/invite/code/:code_id" method:"DELETE"` ScriptID int64 `uri:"id" binding:"required" label:"id"` CodeID int64 `uri:"code_id" binding:"required" label:"code_id"` }
DeleteInviteCodeRequest 删除邀请码
type DeleteInviteCodeResponse ¶
type DeleteInviteCodeResponse struct { }
type DeleteRequest ¶
type DeleteRequest struct { mux.Meta `path:"/scripts/:id" method:"DELETE"` ID int64 `uri:"id" binding:"required"` }
DeleteRequest 删除脚本
type DeleteResponse ¶
type DeleteResponse struct { }
type GetSettingRequest ¶
type GetSettingRequest struct { mux.Meta `path:"/scripts/:id/setting" method:"GET"` ID int64 `uri:"id" binding:"required"` }
GetSettingRequest 获取脚本设置
type GetSettingResponse ¶
type GetSettingResponse struct { SyncUrl string `json:"sync_url"` ContentUrl string `json:"content_url"` DefinitionUrl string `json:"definition_url"` SyncMode script_entity.SyncMode `json:"sync_mode"` EnablePreRelease script_entity.EnablePreRelease `json:"enable_pre_release"` GrayControls []*script_entity.GrayControl `json:"gray_controls"` }
type GroupInviteCodeListRequest ¶
type GroupInviteCodeListRequest struct { mux.Meta `path:"/scripts/:id/invite/group/:gid/code" method:"GET"` ScriptID int64 `uri:"id" binding:"required" label:"id"` GroupID int64 `uri:"gid" binding:"required" label:"gid"` httputils.PageRequest `form:",inline"` }
GroupInviteCodeListRequest 群组邀请码列表
type GroupInviteCodeListResponse ¶
type GroupInviteCodeListResponse struct { httputils.PageResponse[*InviteCode] `json:",inline"` }
type GroupListRequest ¶
type GroupListRequest struct { mux.Meta `path:"/scripts/:id/group" method:"GET"` ScriptID int64 `uri:"id" binding:"required" label:"id"` Query string `form:"query"` httputils.PageRequest `form:",inline"` }
GroupListRequest 群组列表
type GroupListResponse ¶
type GroupListResponse struct { httputils.PageResponse[*Group] `json:",inline"` }
type GroupMember ¶
type GroupMember struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` Username string `json:"username"` Avatar string `json:"avatar"` InviteStatus script_entity.AccessInviteStatus `json:"invite_status"` IsExpire bool `json:"is_expire"` Expiretime int64 `json:"expiretime"` Createtime int64 `json:"createtime"` }
type GroupMemberListRequest ¶
type GroupMemberListRequest struct { mux.Meta `path:"/scripts/:id/group/:gid/member" method:"GET"` httputils.PageRequest `form:",inline"` ScriptID int64 `uri:"id" binding:"required" label:"id"` GroupID int64 `uri:"gid" binding:"required" label:"gid"` }
GroupMemberListRequest 群组成员列表
type GroupMemberListResponse ¶
type GroupMemberListResponse struct { httputils.PageResponse[*GroupMember] `json:",inline"` }
type InfoRequest ¶
type InfoRequest struct { mux.Meta `path:"/scripts/:id" method:"GET"` ID int64 `uri:"id" binding:"required"` }
InfoRequest 获取脚本信息
type InfoResponse ¶
type InfoResponse struct { *Script `json:",inline"` Content string `json:"content"` Role script_entity.AccessRole `json:"role"` }
type InviteCode ¶
type InviteCode struct { ID int64 `json:"id"` Code string `json:"code"` // 邀请码 UserID int64 `json:"used"` // 使用用户 Username string `json:"username"` // 使用用户名 IsAudit bool `json:"is_audit"` // 是否需要审核 InviteStatus script_entity.InviteStatus `json:"invite_status"` Expiretime int64 `json:"expiretime"` // 到期时间 Createtime int64 `json:"createtime"` }
type InviteCodeInfoAccess ¶
type InviteCodeInfoAccess struct {
Role script_entity.AccessRole `json:"role"` // 访问权限 guest=访客 manager=管理员
}
type InviteCodeInfoGroup ¶
type InviteCodeInfoRequest ¶
type InviteCodeInfoRequest struct { mux.Meta `path:"/scripts/invite/:code" method:"GET"` Code string `uri:"code" binding:"required" label:"code"` }
InviteCodeInfoRequest 邀请码信息
type InviteCodeInfoResponse ¶
type InviteCodeInfoResponse struct { CodeType script_entity.InviteCodeType `json:"code_type"` // 邀请码类型 1=邀请码 2=邀请链接 InviteStatus script_entity.InviteStatus `json:"invite_status"` // 使用状态 Type script_entity.InviteType `json:"type"` // 邀请类型 1=权限邀请码 2=群组邀请码 IsAudit bool `json:"is_audit"` // 是否需要审核 邀请码类型为邀请链接时,该字段固定为false Script *Script `json:"script"` Access *InviteCodeInfoAccess `json:"access,omitempty"` // 如果type=1, 则返回权限信息 Group *InviteCodeInfoGroup `json:"group,omitempty"` // 如果type=2, 则返回群组信息 }
type InviteCodeListRequest ¶
type InviteCodeListRequest struct { mux.Meta `path:"/scripts/:id/invite/code" method:"GET"` ScriptID int64 `uri:"id" binding:"required" label:"id"` httputils.PageRequest `form:",inline"` }
InviteCodeListRequest 邀请码列表
type InviteCodeListResponse ¶
type InviteCodeListResponse struct { httputils.PageResponse[*InviteCode] `json:",inline"` }
type LastScoreRequest ¶
type LastScoreRequest struct { mux.Meta `path:"/scripts/last-score" method:"GET"` httputils.PageRequest `form:",inline"` }
LastScoreRequest 最新评分脚本
type LastScoreResponse ¶
type LastScoreResponse struct { httputils.PageResponse[*Script] `json:",inline"` }
type ListRequest ¶
type ListRequest struct { mux.Meta `path:"/scripts" method:"GET"` httputils.PageRequest `form:",inline"` Keyword string `form:"keyword"` Domain string `form:"domain"` ScriptType int `form:"script_type,default=0" binding:"oneof=0 1 2 3 4"` // 0:全部 1: 脚本 2: 库 3: 后台脚本 4: 定时脚本 Sort string `form:"sort,default=today_download" binding:"oneof=today_download total_download score createtime updatetime"` }
ListRequest 获取脚本列表
type ListResponse ¶
type ListResponse struct { httputils.PageResponse[*Script] `json:",inline"` }
type MigrateEsRequest ¶
MigrateEsRequest 全量迁移数据到es
type MigrateEsResponse ¶
type MigrateEsResponse struct { }
type PutScoreRequest ¶
type PutScoreRequest struct { mux.Meta `path:"/scripts/:id/score" method:"PUT"` ID int64 `uri:"id" binding:"required"` Message string `json:"message" binding:"required"` Score int64 `json:"score" binding:"required,number,min=0,max=50"` }
PutScoreRequest 脚本评分
type PutScoreResponse ¶
type PutScoreResponse struct { }
type RemoveMemberRequest ¶
type RemoveMemberRequest struct { mux.Meta `path:"/scripts/:id/group/:gid/member/:mid" method:"DELETE"` ScriptID int64 `uri:"id" binding:"required" label:"id"` GroupID int64 `uri:"gid" binding:"required" label:"gid"` ID int64 `uri:"mid" binding:"required"` }
RemoveMemberRequest 移除成员
type RemoveMemberResponse ¶
type RemoveMemberResponse struct { }
type ScoreListRequest ¶
type ScoreListRequest struct { mux.Meta `path:"/scripts/:id/score" method:"GET"` httputils.PageRequest `json:",inline"` ScriptID int64 `uri:"id" binding:"required"` }
ScoreListRequest 获取脚本评分列表
type ScoreListResponse ¶
type ScoreListResponse struct { httputils.PageResponse[*Score] `json:",inline"` }
type Script ¶
type Script struct { Script *Code `json:"script"` ID int64 `json:"id"` user_entity.UserInfo `json:",inline"` PostID int64 `json:"post_id"` Name string `json:"name"` Description string `json:"description"` Category []*CategoryList `json:"category"` Status int64 `json:"status"` Score int64 `json:"score"` ScoreNum int64 `json:"score_num"` Type script_entity.Type `json:"type"` Public int `json:"public"` Unwell int `json:"unwell"` Archive int `json:"archive"` Danger int `json:"danger"` EnablePreRelease script_entity.EnablePreRelease `json:"enable_pre_release"` TodayInstall int64 `json:"today_install"` TotalInstall int64 `json:"total_install"` Createtime int64 `json:"createtime"` Updatetime int64 `json:"updatetime"` }
type SelfScoreRequest ¶
type SelfScoreRequest struct { mux.Meta `path:"/scripts/:id/score/self" method:"GET"` ScriptId int64 `uri:"id" binding:"required"` }
SelfScoreRequest 用于获取自己对脚本的评价
type SelfScoreResponse ¶
type SelfScoreResponse struct {
*Score `json:",inline"`
}
type StateRequest ¶
type StateRequest struct { mux.Meta `path:"/scripts/:id/state" method:"GET"` ID int64 `uri:"id" binding:"required"` }
StateRequest 获取脚本状态,脚本关注等
type StateResponse ¶
type StateResponse struct {
Watch script_entity.ScriptWatchLevel `json:"watch"`
}
type UpdateAccessRequest ¶
type UpdateAccessRequest struct { mux.Meta `path:"/scripts/:id/access/:aid" method:"PUT"` ScriptID int64 `uri:"id" binding:"required" label:"id"` AccessID int64 `uri:"aid" binding:"required" label:"id"` Role script_entity.AccessRole `form:"role" binding:"required,oneof=guest manager" label:"访问权限"` // 访问权限 guest=访客 manager=管理员 Expiretime int64 `form:"expiretime,default=0" label:"过期时间"` // 0 为永久 }
UpdateAccessRequest 更新访问控制
type UpdateAccessResponse ¶
type UpdateAccessResponse struct { }
type UpdateCodeRequest ¶
type UpdateCodeRequest struct { mux.Meta `path:"/scripts/:id/code" method:"PUT"` ID int64 `uri:"id" binding:"required"` //Name string `form:"name" binding:"max=128" label:"库的名字"` //Description string `form:"description" binding:"max=102400" label:"库的描述"` Version string `binding:"required,max=128" form:"version" label:"库的版本号"` Content string `binding:"required,max=102400" form:"content" label:"脚本详细描述"` Code string `binding:"required,max=10485760" form:"code" label:"脚本代码"` Definition string `binding:"max=102400" form:"definition" label:"库的定义文件"` Changelog string `binding:"max=102400" form:"changelog" label:"更新日志"` IsPreRelease script_entity.EnablePreRelease `form:"is_pre_release" json:"is_pre_release" binding:"omitempty,oneof=0 1 2" label:"是否预发布"` }
UpdateCodeRequest 更新脚本/库代码
type UpdateCodeResponse ¶
type UpdateCodeResponse struct { }
type UpdateCodeSettingRequest ¶
type UpdateCodeSettingRequest struct { mux.Meta `path:"/scripts/:id/code/:codeId" method:"PUT"` ID int64 `uri:"id" binding:"required"` CodeID int64 `uri:"codeId" binding:"required"` Changelog string `json:"changelog" binding:"max=102400" label:"更新日志"` IsPreRelease script_entity.EnablePreRelease `json:"is_pre_release" binding:"oneof=1 2" label:"是否预发布"` }
UpdateCodeSettingRequest 更新脚本设置
type UpdateCodeSettingResponse ¶
type UpdateCodeSettingResponse struct { }
type UpdateGroupRequest ¶
type UpdateGroupRequest struct { mux.Meta `path:"/scripts/:id/group/:gid" method:"PUT"` ScriptID int64 `uri:"id" binding:"required" label:"id"` GroupID int64 `uri:"gid" binding:"required" label:"gid"` Name string `json:"name" binding:"required,max=20" label:"群组名"` Description string `json:"description" binding:"required,max=200" label:"群组描述"` }
UpdateGroupRequest 更新群组
type UpdateGroupResponse ¶
type UpdateGroupResponse struct { }
type UpdateLibInfoRequest ¶
type UpdateLibInfoRequest struct { mux.Meta `path:"/scripts/:id/lib-info" method:"PUT"` Name string `json:"name" binding:"max=128" label:"库的名字"` Description string `json:"description" binding:"max=102400" label:"库的描述"` }
UpdateLibInfoRequest 更新库信息
type UpdateLibInfoResponse ¶
type UpdateLibInfoResponse struct { }
type UpdateMemberRequest ¶
type UpdateMemberRequest struct { mux.Meta `path:"/scripts/:id/group/:gid/member/:mid" method:"PUT"` ID int64 `uri:"mid" binding:"required"` ScriptID int64 `uri:"id" binding:"required" label:"id"` GroupID int64 `uri:"gid" binding:"required" label:"gid"` Expiretime int64 `form:"expiretime,default=0" json:"expiretime"` }
UpdateMemberRequest 更新成员
type UpdateMemberResponse ¶
type UpdateMemberResponse struct { }
type UpdateScriptGrayRequest ¶
type UpdateScriptGrayRequest struct { mux.Meta `path:"/scripts/:id/gray" method:"PUT"` EnablePreRelease script_entity.EnablePreRelease `json:"enable_pre_release" binding:"oneof=1 2" label:"是否开启预发布"` GrayControls []*script_entity.GrayControl `json:"gray_controls" binding:"required" label:"灰度策略"` }
UpdateScriptGrayRequest 更新脚本灰度策略
type UpdateScriptGrayResponse ¶
type UpdateScriptGrayResponse struct { }
type UpdateScriptPublicRequest ¶
type UpdateScriptPublicRequest struct { mux.Meta `path:"/scripts/:id/public" method:"PUT"` ID int64 `uri:"id" binding:"required"` Public script_entity.Public `json:"public" binding:"required,oneof=1 2 3" label:"公开类型"` }
UpdateScriptPublicRequest 更新脚本公开类型
type UpdateScriptPublicResponse ¶
type UpdateScriptPublicResponse struct { }
type UpdateScriptUnwellRequest ¶
type UpdateScriptUnwellRequest struct { mux.Meta `path:"/scripts/:id/unwell" method:"PUT"` ID int64 `uri:"id" binding:"required"` Unwell script_entity.UnwellContent `json:"unwell" binding:"required,oneof=1 2" label:"不适内容"` }
UpdateScriptUnwellRequest 更新脚本不适内容
type UpdateScriptUnwellResponse ¶
type UpdateScriptUnwellResponse struct { }
type UpdateSettingRequest ¶
type UpdateSettingRequest struct { mux.Meta `path:"/scripts/:id/setting" method:"PUT"` ID int64 `uri:"id" binding:"required"` Name string `json:"name" binding:"max=128" label:"库的名字"` Description string `json:"description" binding:"max=102400" label:"库的描述"` SyncUrl string `json:"sync_url" binding:"omitempty,url,max=1024" label:"代码同步url"` ContentUrl string `json:"content_url" binding:"omitempty,url,max=1024" label:"详细描述同步url"` DefinitionUrl string `json:"definition_url" binding:"omitempty,url,max=1024" label:"定义文件同步url"` SyncMode script_entity.SyncMode `json:"sync_mode" binding:"number" label:"同步模式"` }
UpdateSettingRequest 更新脚本设置
type UpdateSettingResponse ¶
type UpdateSyncSettingRequest ¶
type UpdateSyncSettingRequest struct { mux.Meta `path:"/scripts/:id/sync" method:"PUT"` ID int64 `uri:"id" binding:"required"` SyncUrl string `json:"sync_url" binding:"omitempty,url,max=1024" label:"代码同步url"` ContentUrl string `json:"content_url" binding:"omitempty,url,max=1024" label:"详细描述同步url"` DefinitionUrl string `json:"definition_url" binding:"omitempty,url,max=1024" label:"定义文件同步url"` SyncMode script_entity.SyncMode `json:"sync_mode" binding:"number" label:"同步模式"` }
UpdateSyncSettingRequest 更新同步配置
type VersionCodeRequest ¶
type VersionCodeRequest struct { mux.Meta `path:"/scripts/:id/versions/:version/code" method:"GET"` ID int64 `uri:"id" binding:"required"` Version string `uri:"version" binding:"required"` }
VersionCodeRequest 获取指定版本代码
type VersionCodeResponse ¶
type VersionCodeResponse struct {
*Script `json:",inline"`
}
type VersionListRequest ¶
type VersionListRequest struct { mux.Meta `path:"/scripts/:id/versions" method:"GET"` httputils.PageRequest `form:",inline"` ID int64 `uri:"id" binding:"required"` }
VersionListRequest 获取版本列表
type VersionListResponse ¶
type VersionListResponse struct { httputils.PageResponse[*Code] `json:",inline"` }
type WatchRequest ¶
type WatchRequest struct { mux.Meta `path:"/scripts/:id/watch" method:"POST"` ID int64 `uri:"id" binding:"required"` Watch script_entity.ScriptWatchLevel `json:"watch" binding:"oneof=0 1 2 3"` }
WatchRequest 关注脚本
type WatchResponse ¶
type WatchResponse struct { }
type WebhookRequest ¶
type WebhookRequest struct { mux.Meta `path:"/webhook/:uid" method:"POST"` UID int64 `uri:"uid" binding:"required"` UA string `header:"User-Agent" binding:"required"` XHubSignature256 string `header:"X-Hub-Signature-256" binding:"required"` }
WebhookRequest 处理webhook请求
type WebhookResponse ¶
type WebhookResponse struct { }