dicehub

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package apis dice api集合

Package apis dice api集合

Index

Constants

This section is empty.

Variables

View Source
var DICEHUB_PIPELINE_TEMPLATE_APPLY = apis.ApiSpec{
	Path:        "/api/pipeline-templates/actions/apply",
	BackendPath: "/api/pipeline-templates/actions/apply",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "POST",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 新增或修改模板`,
}
View Source
var DICEHUB_PIPELINE_TEMPLATE_QUERY = apis.ApiSpec{
	Path:        "/api/pipeline-templates",
	BackendPath: "/api/pipeline-templates",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 查询模板列表`,
}
View Source
var DICEHUB_PIPELINE_TEMPLATE_VERSION_GET = apis.ApiSpec{
	Path:        "/api/pipeline-templates/<name>/actions/query-version",
	BackendPath: "/api/pipeline-templates/<name>/actions/query-version",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 获取模板版本详情`,
}
View Source
var DICEHUB_PIPELINE_TEMPLATE_VERSION_QUERY = apis.ApiSpec{
	Path:        "/api/pipeline-templates/<name>/actions/query-versions",
	BackendPath: "/api/pipeline-templates/<name>/actions/query-versions",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 查询模板的版本列表`,
}
View Source
var DICEHUB_PIPELINE_TEMPLATE_VERSION_RENDER = apis.ApiSpec{
	Path:        "/api/pipeline-templates/<name>/actions/render",
	BackendPath: "/api/pipeline-templates/<name>/actions/render",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "POST",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 渲染模板对应版本的pipeline.yml`,
}
View Source
var DICEHUB_PIPELINE_TEMPLATE_VERSION_RENDER_SPEC = apis.ApiSpec{
	Path:        "/api/pipeline-templates/local/actions/render-spec",
	BackendPath: "/api/pipeline-templates/local/actions/render-spec",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "POST",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 根据spec直接渲染模板`,
}
View Source
var DICEHUB_PUBLISH_ITEM_BLACKLIST_CREATE = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>/blacklist",
	BackendPath:  "/api/publish-items/<publishItemId>/blacklist",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "POST",
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	RequestType:  apistructs.PublishItemUserlistRequest{},
	ResponseType: apistructs.PublishItemAddBlacklistResponse{},
	Doc:          `summary: 添加发布内容黑名单`,

	Audit: func(ctx *spec.AuditContext) error {

		var req apistructs.PublishItemUserlistRequest
		err := ctx.BindRequestData(&req)
		if err != nil {
			return err
		}

		var resp apistructs.PublishItemAddBlacklistResponse
		err = ctx.BindResponseData(&resp)
		if err != nil {
			return err
		}

		if resp.Success {
			if req.UserName == "" {
				return ctx.CreateAudit(&apistructs.Audit{
					ScopeType:    apistructs.OrgScope,
					ScopeID:      uint64(ctx.OrgID),
					TemplateName: apistructs.AddPublishItemsBlacklistTemplate,
					Context:      map[string]interface{}{"addUser": req.UserID, "publishItemContent": resp.Data.Name},
				})
			} else {
				return ctx.CreateAudit(&apistructs.Audit{
					ScopeType:    apistructs.OrgScope,
					ScopeID:      uint64(ctx.OrgID),
					TemplateName: apistructs.AddPublishItemsBlacklistTemplate,
					Context:      map[string]interface{}{"addUser": req.UserName, "publishItemContent": resp.Data.Name},
				})
			}
		} else {
			return nil
		}
	},
}
View Source
var DICEHUB_PUBLISH_ITEM_BLACKLIST_DELETE = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>/blacklist/<blacklistId>",
	BackendPath:  "/api/publish-items/<publishItemId>/blacklist/<blacklistId>",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "DELETE",
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 删除发布内容黑名单`,
	ResponseType: apistructs.PublishItemDeleteBlacklistResponse{},
	Audit: func(ctx *spec.AuditContext) error {

		var resp apistructs.PublishItemDeleteBlacklistResponse
		err := ctx.BindResponseData(&resp)
		if err != nil {
			return err
		}
		if resp.Success {
			if resp.Data.UserName == "" {
				if resp.Data.UserID == "" {
					return nil
				} else {
					return ctx.CreateAudit(&apistructs.Audit{
						ScopeType:    apistructs.OrgScope,
						ScopeID:      uint64(ctx.OrgID),
						TemplateName: apistructs.DeletePublishItemsBlacklistTemplate,
						Context:      map[string]interface{}{"removeUser": resp.Data.UserID, "publishItemContent": resp.Data.PublishItemName},
					})
				}
			} else {
				return ctx.CreateAudit(&apistructs.Audit{
					ScopeType:    apistructs.OrgScope,
					ScopeID:      uint64(ctx.OrgID),
					TemplateName: apistructs.DeletePublishItemsBlacklistTemplate,
					Context:      map[string]interface{}{"removeUser": resp.Data.UserName, "publishItemContent": resp.Data.PublishItemName},
				})
			}
		} else {
			return nil
		}
	},
}
View Source
var DICEHUB_PUBLISH_ITEM_BLACKLIST_GET = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/blacklist",
	BackendPath: "/api/publish-items/<publishItemId>/blacklist",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 发布内容黑名单列表`,
}
View Source
var DICEHUB_PUBLISH_ITEM_CERTIFICATION_GET = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/certification",
	BackendPath: "/api/publish-items/<publishItemId>/certification",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 发布内容认证列表`,
}
View Source
var DICEHUB_PUBLISH_ITEM_CHANNELS = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>/statistics/channels",
	BackendPath:  "/api/publish-items/<publishItemId>/statistics/channels",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	RequestType:  apistructs.PublishItemStatisticsDetailRequest{},
	ResponseType: apistructs.PublishItemStatisticsDetailData{},
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 渠道详情,明细数据`,
}
View Source
var DICEHUB_PUBLISH_ITEM_ERASE_CREATE = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>/erase",
	BackendPath:  "/api/publish-items/<publishItemId>/erase",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "POST",
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 添加发布内容数据擦除`,
	ResponseType: apistructs.PublicItemAddEraseResponse{},
	Audit: func(ctx *spec.AuditContext) error {

		var resp apistructs.PublicItemAddEraseResponse
		err := ctx.BindResponseData(&resp)
		if err != nil {
			return err
		}

		if resp.Success {
			return ctx.CreateAudit(&apistructs.Audit{
				ScopeType:    apistructs.OrgScope,
				ScopeID:      uint64(ctx.OrgID),
				TemplateName: apistructs.ErasePublishItemsBlacklistTemplate,
				Context:      map[string]interface{}{"publishItemContent": resp.Data.Data.Name, "eraseUser": resp.Data.DeviceNo},
			})
		} else {
			return nil
		}
		return nil
	},
}
View Source
var DICEHUB_PUBLISH_ITEM_ERASE_GET = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/erase",
	BackendPath: "/api/publish-items/<publishItemId>/erase",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 发布内容数据擦除列表`,
}
View Source
var DICEHUB_PUBLISH_ITEM_ERR_EFFACTS = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/err/effacts",
	BackendPath: "/api/publish-items/<publishItemId>/err/effacts",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 错误统计,影响用户占比`,
}
View Source
var DICEHUB_PUBLISH_ITEM_ERR_LIST = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>/err/list",
	BackendPath:  "/api/publish-items/<publishItemId>/err/list",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	ResponseType: apistructs.PublishItemStatisticsErrListData{},
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 错误报告,错误列表`,
}
View Source
var DICEHUB_PUBLISH_ITEM_ERR_RATE = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/err/rate",
	BackendPath: "/api/publish-items/<publishItemId>/err/rate",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 错误统计,崩溃率`,
}
View Source
var DICEHUB_PUBLISH_ITEM_ERR_TREND = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>/err/trend",
	BackendPath:  "/api/publish-items/<publishItemId>/err/trend",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	ResponseType: apistructs.PublishItemStatisticsErrTrendData{},
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 错误报告,错误趋势`,
}
View Source
var DICEHUB_PUBLISH_ITEM_METIRCS_COMMON = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/metrics/<metricName>",
	BackendPath: "/api/publish-items/<publishItemId>/metrics/<metricName>",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	Doc:         `summary: 通用metrcis接口,转发使用`,
}
View Source
var DICEHUB_PUBLISH_ITEM_METIRCS_HISTOGRAM_COMMON = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/metrics/<metricName>/histogram",
	BackendPath: "/api/publish-items/<publishItemId>/metrics/<metricName>/histogram",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	Doc:         `summary: 通用metrcis histogram接口,转发使用`,
}
View Source
var DICEHUB_PUBLISH_ITEM_MONITOR_KEYS_LIST = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/list-monitor-keys",
	BackendPath: "/api/publish-items/<publishItemId>/list-monitor-keys",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 获取发布内容的监控key列表`,
}
View Source
var DICEHUB_PUBLISH_ITEM_STATISTICS_TREND = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>/statistics/trend",
	BackendPath:  "/api/publish-items/<publishItemId>/statistics/trend",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	ResponseType: apistructs.PublishItemStatisticsTrendData{},
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 统一大盘,整体趋势接口`,
}
View Source
var DICEHUB_PUBLISH_ITEM_USERS = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/statistics/users",
	BackendPath: "/api/publish-items/<publishItemId>/statistics/users",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 统计大盘,累计用户`,
}
View Source
var DICEHUB_PUBLISH_ITEM_VERSION_INFO_LIST = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>/statistics/versions",
	BackendPath:  "/api/publish-items/<publishItemId>/statistics/versions",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	RequestType:  apistructs.PublishItemStatisticsDetailRequest{},
	ResponseType: apistructs.PublishItemStatisticsDetailData{},
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 版本详情,明细数据`,
}
View Source
var DICEHUB_RELEASES_CREATE = apis.ApiSpec{
	Path:         "/api/releases",
	BackendPath:  "/api/releases",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "POST",
	RequestType:  apistructs.ReleaseCreateRequest{},
	ResponseType: apistructs.ReleaseCreateResponse{},
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 创建版本`,
}
View Source
var DICEHUB_RELEASES_DELETE = apis.ApiSpec{
	Path:         "/api/releases/<releaseId>",
	BackendPath:  "/api/releases/<releaseId>",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "DELETE",
	RequestType:  apistructs.ReleaseDeleteRequest{},
	ResponseType: apistructs.ReleaseDeleteResponse{},
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 删除版本`,
}
View Source
var DICEHUB_RELEASES_GET = apis.ApiSpec{
	Path:         "/api/releases/<releaseId>",
	BackendPath:  "/api/releases/<releaseId>",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	RequestType:  apistructs.ReleaseGetRequest{},
	ResponseType: apistructs.ReleaseGetResponse{},
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 获取版本详情`,
}
View Source
var DICEHUB_RELEASES_LIST = apis.ApiSpec{
	Path:         "/api/releases",
	BackendPath:  "/api/releases",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	RequestType:  apistructs.ReleaseListRequest{},
	ResponseType: apistructs.ReleaseListResponse{},
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 版本列表`,
}

DICEHUB_RELEASES_LIST release列表API

View Source
var DICEHUB_RELEASES_PLIST_GET = apis.ApiSpec{
	Path:        "/api/releases/<releaseId>/actions/get-plist",
	BackendPath: "/api/releases/<releaseId>/actions/get-plist",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	CheckLogin:  true,
	CheckToken:  true,
	IsOpenAPI:   true,
	Doc:         `获取ios发布类型中的下载 plist 配置`,
}
View Source
var DICEHUB_RELEASES_UPDATE = apis.ApiSpec{
	Path:         "/api/releases/<releaseId>",
	BackendPath:  "/api/releases/<releaseId>",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "PUT",
	RequestType:  apistructs.ReleaseUpdateRequest{},
	ResponseType: apistructs.ReleaseUpdateResponse{},
	IsOpenAPI:    true,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 版本更新`,
}
View Source
var DICEHUB_RELEASES_YAML_GET = apis.ApiSpec{
	Path:        "/api/releases/<releaseId>/actions/get-dice",
	BackendPath: "/api/releases/<releaseId>/actions/get-dice",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	CheckLogin:  true,
	CheckToken:  true,
	RequestType: apistructs.ReleaseGetDiceYmlRequest{},
	IsOpenAPI:   true,
	Doc: `
summary: 获取指定版本dice.yml内容
parameters:
  - in: path
    name: releaseId
    type: string
    required: true
produces:
  - application/x-yaml
responses:
  '200':
    description: Dice.yaml content
`,
}
View Source
var DICEHUB_RELEASE_NAMES_LIST = apis.ApiSpec{
	Path:         "/api/releases/actions/get-name",
	BackendPath:  "/api/releases/actions/get-name",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	RequestType:  apistructs.ReleaseNameListRequest{},
	ResponseType: apistructs.ReleaseNameListResponse{},
	IsOpenAPI:    false,
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          `summary: 版本名称列表`,
}

DICEHUB_RELEASE_NAMES_LIST releaseName列表API

View Source
var EXTENSION_CREATE = apis.ApiSpec{
	Path:         "/api/extensions",
	BackendPath:  "/api/extensions",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "POST",
	CheckLogin:   true,
	CheckToken:   true,
	RequestType:  apistructs.ExtensionCreateRequest{},
	ResponseType: apistructs.ExtensionVersionCreateResponse{},
	Doc:          "summary: 创建扩展",
}
View Source
var EXTENSION_MENU = apis.ApiSpec{
	Path:        "/api/extensions/actions/query-menu",
	BackendPath: "/api/extensions/actions/query-menu",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	IsOpenAPI:   true,
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         `summary: 扩展分类`,
}
View Source
var EXTENSION_QUERY = apis.ApiSpec{
	Path:         "/api/extensions",
	BackendPath:  "/api/extensions",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	CheckLogin:   false,
	CheckToken:   false,
	RequestType:  apistructs.ExtensionQueryRequest{},
	ResponseType: apistructs.ExtensionQueryResponse{},
	Doc:          "summary: 查询扩展",
}
View Source
var EXTENSION_VERSION_CREATE = apis.ApiSpec{
	Path:         "/api/extensions/<name>",
	BackendPath:  "/api/extensions/<name>",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "POST",
	CheckLogin:   true,
	CheckToken:   true,
	RequestType:  apistructs.ExtensionVersionCreateRequest{},
	ResponseType: apistructs.ExtensionVersionCreateResponse{},
	Doc:          "summary: 新增扩展版本",
}
View Source
var EXTENSION_VERSION_GET = apis.ApiSpec{
	Path:         "/api/extensions/<name>/<version>",
	BackendPath:  "/api/extensions/<name>/<version>",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	CheckLogin:   false,
	CheckToken:   false,
	RequestType:  apistructs.ExtensionVersionGetRequest{},
	ResponseType: apistructs.ExtensionVersionGetResponse{},
	Doc:          "summary: 获取指定版本扩展",
}
View Source
var EXTENSION_VERSION_QUERY = apis.ApiSpec{
	Path:         "/api/extensions/<name>",
	BackendPath:  "/api/extensions/<name>",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	CheckLogin:   false,
	CheckToken:   false,
	RequestType:  apistructs.ExtensionVersionQueryRequest{},
	ResponseType: apistructs.ExtensionVersionQueryResponse{},
	Doc:          "summary: 查询扩展版本",
}
View Source
var IMAGEHUB_IMAGE_LIST = apis.ApiSpec{
	Path:         "/api/images",
	BackendPath:  "/api/images",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	CheckLogin:   true,
	CheckToken:   true,
	RequestType:  apistructs.ReleaseListRequest{},
	ResponseType: apistructs.ReleaseListResponse{},
	IsOpenAPI:    true,
	Doc:          `summary: 版本镜像列表`,
}
View Source
var PUBLISH_ITEM_CREATE = apis.ApiSpec{
	Path:         "/api/publish-items",
	BackendPath:  "/api/publish-items",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "POST",
	CheckLogin:   true,
	CheckToken:   true,
	RequestType:  apistructs.CreatePublishItemRequest{},
	ResponseType: apistructs.CreatePublishItemResponse{},
	Doc:          "summary: 创建发布",
	Audit: func(ctx *spec.AuditContext) error {

		var resp apistructs.CreatePublishItemResponse
		err := ctx.BindResponseData(&resp)
		if err != nil {
			return err
		}

		if resp.Success {
			return ctx.CreateAudit(&apistructs.Audit{
				ScopeType:    apistructs.OrgScope,
				ScopeID:      uint64(ctx.OrgID),
				TemplateName: apistructs.CreatePublishItemsTemplate,
				Context:      map[string]interface{}{"type": resp.Data.Type, "publishItemContent": resp.Data.Name},
			})
		} else {
			return nil
		}
	},
}
View Source
var PUBLISH_ITEM_CREATE_OFFLINE_VERSION = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/versions/create-offline-version",
	BackendPath: "/api/publish-items/<publishItemId>/versions/create-offline-version",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      http.MethodPost,
	CheckLogin:  true,
	CheckToken:  true,
	IsOpenAPI:   true,
	ChunkAPI:    true,
	Doc:         "summary: 移动应用上传离线包",
}
View Source
var PUBLISH_ITEM_DELETE = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>",
	BackendPath:  "/api/publish-items/<publishItemId>",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "DELETE",
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          "summary: 删除发布",
	ResponseType: apistructs.DeletePublishItemResponse{},
	Audit: func(ctx *spec.AuditContext) error {

		var resp apistructs.DeletePublishItemResponse
		err := ctx.BindResponseData(&resp)
		if err != nil {
			return err
		}

		if resp.Success {
			return ctx.CreateAudit(&apistructs.Audit{
				ScopeType:    apistructs.OrgScope,
				ScopeID:      uint64(ctx.OrgID),
				TemplateName: apistructs.DeletePublishItemsTemplate,
				Context:      map[string]interface{}{"type": resp.Data.Type, "publishItemContent": resp.Data.Name},
			})
		} else {
			return nil
		}
	},
}
View Source
var PUBLISH_ITEM_DISTRIBUTION = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>/distribution",
	BackendPath:  "/api/publish-items/<publishItemId>/distribution",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "GET",
	CheckLogin:   false,
	CheckToken:   false,
	ResponseType: apistructs.PublishItemDistributionResponse{},
	Doc:          "summary: 发布下载信息",
}
View Source
var PUBLISH_ITEM_GET = apis.ApiSpec{
	Path:          "/api/publish-items/<id>",
	BackendPath:   "/api/publish-items/<id>",
	Host:          "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:        "http",
	Method:        "GET",
	TryCheckLogin: true,
	Doc:           "summary: 查询发布内容",
}
View Source
var PUBLISH_ITEM_GET_H5_PACKAGENAME = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/versions/actions/get-h5-packagename",
	BackendPath: "/api/publish-items/<publishItemId>/versions/actions/get-h5-packagename",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "GET",
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         "summary: 获取移动应用H5包名",
}
View Source
var PUBLISH_ITEM_QUERY = apis.ApiSpec{
	Path:          "/api/publish-items",
	BackendPath:   "/api/publish-items",
	Host:          "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:        "http",
	Method:        "GET",
	TryCheckLogin: true,
	RequestType:   apistructs.QueryPublishItemRequest{},
	ResponseType:  apistructs.QueryPublishItemResponse{},
	Doc:           "summary: 查询发布",
}
View Source
var PUBLISH_ITEM_QUERY_MY = apis.ApiSpec{
	Path:          "/api/my-publish-items",
	BackendPath:   "/api/my-publish-items",
	Host:          "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:        "http",
	Method:        "GET",
	TryCheckLogin: true,
	RequestType:   apistructs.QueryPublishItemRequest{},
	ResponseType:  apistructs.QueryPublishItemResponse{},
	Doc:           "summary: 查询发布",
}
View Source
var PUBLISH_ITEM_UPDATE = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>",
	BackendPath:  "/api/publish-items/<publishItemId>",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "PUT",
	CheckLogin:   true,
	CheckToken:   true,
	Doc:          "summary: 更新发布",
	RequestType:  apistructs.UpdatePublishItemRequest{},
	ResponseType: apistructs.UpdatePublishItemResponse{},
	Audit: func(ctx *spec.AuditContext) error {

		var resp apistructs.UpdatePublishItemResponse
		err := ctx.BindResponseData(&resp)
		if err != nil {
			return err
		}

		if resp.Success {
			return ctx.CreateAudit(&apistructs.Audit{
				ScopeType:    apistructs.OrgScope,
				ScopeID:      uint64(ctx.OrgID),
				TemplateName: apistructs.UpdatePublishItemsTemplate,
				Context:      map[string]interface{}{"type": resp.Data.Type, "publishItemContent": resp.Data.Name},
			})
		} else {
			return nil
		}
	},
}
View Source
var PUBLISH_ITEM_VERSION_CREATE = apis.ApiSpec{
	Path:         "/api/publish-items/<publishItemId>/versions",
	BackendPath:  "/api/publish-items/<publishItemId>/versions",
	Host:         "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:       "http",
	Method:       "POST",
	CheckLogin:   true,
	CheckToken:   true,
	RequestType:  apistructs.CreatePublishItemVersionRequest{},
	ResponseType: apistructs.CreatePublishItemVersionResponse{},
	Doc:          "summary: 创建发布版本",
}
View Source
var PUBLISH_ITEM_VERSION_GET_LATEST = apis.ApiSpec{
	Path:          "/api/publish-items/actions/latest-versions",
	BackendPath:   "/api/publish-items/actions/latest-versions",
	Host:          "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:        "http",
	Method:        "POST",
	CheckLogin:    false,
	TryCheckLogin: true,
	CheckToken:    true,
	IsOpenAPI:     true,
	ChunkAPI:      true,
	RequestType:   apistructs.GetPublishItemLatestVersionRequest{},
	ResponseType:  apistructs.GetPublishItemLatestVersionResponse{},
	Doc:           "summary: 获取移动应用最新的版本",
}
View Source
var PUBLISH_ITEM_VERSION_GET_PUBLIC = apis.ApiSpec{
	Path:          "/api/publish-items/<publishItemId>/versions/actions/public-version",
	BackendPath:   "/api/publish-items/<publishItemId>/versions/actions/public-version",
	Host:          "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:        "http",
	Method:        "GET",
	TryCheckLogin: true,
	ResponseType:  apistructs.QueryPublishItemVersionResponse{},
	Doc:           "summary: 获取线上已发布版本",
}
View Source
var PUBLISH_ITEM_VERSION_QUERY = apis.ApiSpec{
	Path:          "/api/publish-items/<publishItemId>/versions",
	BackendPath:   "/api/publish-items/<publishItemId>/versions",
	Host:          "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:        "http",
	Method:        "GET",
	TryCheckLogin: true,
	RequestType:   apistructs.QueryPublishItemVersionRequest{},
	ResponseType:  apistructs.QueryPublishItemVersionResponse{},
	Doc:           "summary: 查询发布版本",
}
View Source
var PUBLISH_ITEM_VERSION_SET_STATUS = apis.ApiSpec{
	Path:        "/api/publish-items/<publishItemId>/versions/<versionID>/actions/<action>",
	BackendPath: "/api/publish-items/<publishItemId>/versions/<versionID>/actions/<action>",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "POST",
	CheckLogin:  true,
	CheckToken:  true,
	Doc:         "summary: 设置版本状态",
}
View Source
var PUBLISH_ITEM_VERSION_UPDATE = apis.ApiSpec{
	Path:        "/api/publish-items/versions/actions/<action>",
	BackendPath: "/api/publish-items/versions/actions/<action>",
	Host:        "dicehub.marathon.l4lb.thisdcos.directory:10000",
	Scheme:      "http",
	Method:      "POST",
	CheckLogin:  true,
	CheckToken:  true,
	RequestType: apistructs.UpdatePublishItemVersionStatesRequset{},
	Doc:         "summary: 上架/下架版本",
}

Functions

This section is empty.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL