Documentation ¶
Index ¶
- func DevStarClientBuilder() *http_client.HcHttpClientBuilder
- func GenReqDefForCheckRepositoryDuplicateName() *def.HttpRequestDef
- func GenReqDefForCreateDeploymentJobs() *def.HttpRequestDef
- func GenReqDefForCreateTemplateViewHistories() *def.HttpRequestDef
- func GenReqDefForDeleteApplicationV4() *def.HttpRequestDef
- func GenReqDefForDownloadApplicationCode() *def.HttpRequestDef
- func GenReqDefForListApplicationsV6() *def.HttpRequestDef
- func GenReqDefForListPipelineTemplates() *def.HttpRequestDef
- func GenReqDefForListProjectsV4() *def.HttpRequestDef
- func GenReqDefForListPublishedTemplates() *def.HttpRequestDef
- func GenReqDefForListTemplateViewHistories() *def.HttpRequestDef
- func GenReqDefForListTemplates() *def.HttpRequestDef
- func GenReqDefForListTemplatesV2() *def.HttpRequestDef
- func GenReqDefForRunCodehubTemplateJob() *def.HttpRequestDef
- func GenReqDefForRunDevstarTemplateJob() *def.HttpRequestDef
- func GenReqDefForShowApplicationDependentResources() *def.HttpRequestDef
- func GenReqDefForShowApplicationReleaseRepositories() *def.HttpRequestDef
- func GenReqDefForShowApplicationResDeleteStatus() *def.HttpRequestDef
- func GenReqDefForShowApplicationV3() *def.HttpRequestDef
- func GenReqDefForShowDeploymentJobs() *def.HttpRequestDef
- func GenReqDefForShowJobDetail() *def.HttpRequestDef
- func GenReqDefForShowPipelineLastStatusV2() *def.HttpRequestDef
- func GenReqDefForShowRepositoryByCloudIde() *def.HttpRequestDef
- func GenReqDefForShowRepositoryStatisticalDataV2() *def.HttpRequestDef
- func GenReqDefForShowTemplateDetail() *def.HttpRequestDef
- func GenReqDefForShowTemplateFile() *def.HttpRequestDef
- func GenReqDefForShowTemplateV3() *def.HttpRequestDef
- func GenReqDefForStartPipeline() *def.HttpRequestDef
- func GenReqDefForUpdateApplication() *def.HttpRequestDef
- type DevStarClient
- func (c *DevStarClient) CheckRepositoryDuplicateName(request *model.CheckRepositoryDuplicateNameRequest) (*model.CheckRepositoryDuplicateNameResponse, error)
- func (c *DevStarClient) CreateDeploymentJobs(request *model.CreateDeploymentJobsRequest) (*model.CreateDeploymentJobsResponse, error)
- func (c *DevStarClient) CreateTemplateViewHistories(request *model.CreateTemplateViewHistoriesRequest) (*model.CreateTemplateViewHistoriesResponse, error)
- func (c *DevStarClient) DeleteApplicationV4(request *model.DeleteApplicationV4Request) (*model.DeleteApplicationV4Response, error)
- func (c *DevStarClient) DownloadApplicationCode(request *model.DownloadApplicationCodeRequest) (*model.DownloadApplicationCodeResponse, error)
- func (c *DevStarClient) ListApplicationsV6(request *model.ListApplicationsV6Request) (*model.ListApplicationsV6Response, error)
- func (c *DevStarClient) ListPipelineTemplates(request *model.ListPipelineTemplatesRequest) (*model.ListPipelineTemplatesResponse, error)
- func (c *DevStarClient) ListProjectsV4(request *model.ListProjectsV4Request) (*model.ListProjectsV4Response, error)
- func (c *DevStarClient) ListPublishedTemplates(request *model.ListPublishedTemplatesRequest) (*model.ListPublishedTemplatesResponse, error)
- func (c *DevStarClient) ListTemplateViewHistories(request *model.ListTemplateViewHistoriesRequest) (*model.ListTemplateViewHistoriesResponse, error)
- func (c *DevStarClient) ListTemplates(request *model.ListTemplatesRequest) (*model.ListTemplatesResponse, error)
- func (c *DevStarClient) ListTemplatesV2(request *model.ListTemplatesV2Request) (*model.ListTemplatesV2Response, error)
- func (c *DevStarClient) RunCodehubTemplateJob(request *model.RunCodehubTemplateJobRequest) (*model.RunCodehubTemplateJobResponse, error)
- func (c *DevStarClient) RunDevstarTemplateJob(request *model.RunDevstarTemplateJobRequest) (*model.RunDevstarTemplateJobResponse, error)
- func (c *DevStarClient) ShowApplicationDependentResources(request *model.ShowApplicationDependentResourcesRequest) (*model.ShowApplicationDependentResourcesResponse, error)
- func (c *DevStarClient) ShowApplicationReleaseRepositories(request *model.ShowApplicationReleaseRepositoriesRequest) (*model.ShowApplicationReleaseRepositoriesResponse, error)
- func (c *DevStarClient) ShowApplicationResDeleteStatus(request *model.ShowApplicationResDeleteStatusRequest) (*model.ShowApplicationResDeleteStatusResponse, error)
- func (c *DevStarClient) ShowApplicationV3(request *model.ShowApplicationV3Request) (*model.ShowApplicationV3Response, error)
- func (c *DevStarClient) ShowDeploymentJobs(request *model.ShowDeploymentJobsRequest) (*model.ShowDeploymentJobsResponse, error)
- func (c *DevStarClient) ShowJobDetail(request *model.ShowJobDetailRequest) (*model.ShowJobDetailResponse, error)
- func (c *DevStarClient) ShowPipelineLastStatusV2(request *model.ShowPipelineLastStatusV2Request) (*model.ShowPipelineLastStatusV2Response, error)
- func (c *DevStarClient) ShowRepositoryByCloudIde(request *model.ShowRepositoryByCloudIdeRequest) (*model.ShowRepositoryByCloudIdeResponse, error)
- func (c *DevStarClient) ShowRepositoryStatisticalDataV2(request *model.ShowRepositoryStatisticalDataV2Request) (*model.ShowRepositoryStatisticalDataV2Response, error)
- func (c *DevStarClient) ShowTemplateDetail(request *model.ShowTemplateDetailRequest) (*model.ShowTemplateDetailResponse, error)
- func (c *DevStarClient) ShowTemplateFile(request *model.ShowTemplateFileRequest) (*model.ShowTemplateFileResponse, error)
- func (c *DevStarClient) ShowTemplateV3(request *model.ShowTemplateV3Request) (*model.ShowTemplateV3Response, error)
- func (c *DevStarClient) StartPipeline(request *model.StartPipelineRequest) (*model.StartPipelineResponse, error)
- func (c *DevStarClient) UpdateApplication(request *model.UpdateApplicationRequest) (*model.UpdateApplicationResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DevStarClientBuilder ¶
func DevStarClientBuilder() *http_client.HcHttpClientBuilder
func GenReqDefForCheckRepositoryDuplicateName ¶ added in v0.0.73
func GenReqDefForCheckRepositoryDuplicateName() *def.HttpRequestDef
func GenReqDefForCreateDeploymentJobs ¶ added in v0.0.73
func GenReqDefForCreateDeploymentJobs() *def.HttpRequestDef
func GenReqDefForCreateTemplateViewHistories ¶
func GenReqDefForCreateTemplateViewHistories() *def.HttpRequestDef
func GenReqDefForDeleteApplicationV4 ¶ added in v0.0.73
func GenReqDefForDeleteApplicationV4() *def.HttpRequestDef
func GenReqDefForDownloadApplicationCode ¶
func GenReqDefForDownloadApplicationCode() *def.HttpRequestDef
func GenReqDefForListApplicationsV6 ¶ added in v0.0.73
func GenReqDefForListApplicationsV6() *def.HttpRequestDef
func GenReqDefForListPipelineTemplates ¶ added in v0.0.73
func GenReqDefForListPipelineTemplates() *def.HttpRequestDef
func GenReqDefForListProjectsV4 ¶ added in v0.0.73
func GenReqDefForListProjectsV4() *def.HttpRequestDef
func GenReqDefForListPublishedTemplates ¶
func GenReqDefForListPublishedTemplates() *def.HttpRequestDef
func GenReqDefForListTemplateViewHistories ¶
func GenReqDefForListTemplateViewHistories() *def.HttpRequestDef
func GenReqDefForListTemplates ¶ added in v0.0.76
func GenReqDefForListTemplates() *def.HttpRequestDef
func GenReqDefForListTemplatesV2 ¶
func GenReqDefForListTemplatesV2() *def.HttpRequestDef
func GenReqDefForRunCodehubTemplateJob ¶
func GenReqDefForRunCodehubTemplateJob() *def.HttpRequestDef
func GenReqDefForRunDevstarTemplateJob ¶
func GenReqDefForRunDevstarTemplateJob() *def.HttpRequestDef
func GenReqDefForShowApplicationDependentResources ¶ added in v0.0.73
func GenReqDefForShowApplicationDependentResources() *def.HttpRequestDef
func GenReqDefForShowApplicationReleaseRepositories ¶ added in v0.0.73
func GenReqDefForShowApplicationReleaseRepositories() *def.HttpRequestDef
func GenReqDefForShowApplicationResDeleteStatus ¶ added in v0.0.73
func GenReqDefForShowApplicationResDeleteStatus() *def.HttpRequestDef
func GenReqDefForShowApplicationV3 ¶ added in v0.0.73
func GenReqDefForShowApplicationV3() *def.HttpRequestDef
func GenReqDefForShowDeploymentJobs ¶ added in v0.0.73
func GenReqDefForShowDeploymentJobs() *def.HttpRequestDef
func GenReqDefForShowJobDetail ¶
func GenReqDefForShowJobDetail() *def.HttpRequestDef
func GenReqDefForShowPipelineLastStatusV2 ¶ added in v0.0.73
func GenReqDefForShowPipelineLastStatusV2() *def.HttpRequestDef
func GenReqDefForShowRepositoryByCloudIde ¶ added in v0.0.76
func GenReqDefForShowRepositoryByCloudIde() *def.HttpRequestDef
func GenReqDefForShowRepositoryStatisticalDataV2 ¶ added in v0.0.73
func GenReqDefForShowRepositoryStatisticalDataV2() *def.HttpRequestDef
func GenReqDefForShowTemplateDetail ¶
func GenReqDefForShowTemplateDetail() *def.HttpRequestDef
func GenReqDefForShowTemplateFile ¶
func GenReqDefForShowTemplateFile() *def.HttpRequestDef
func GenReqDefForShowTemplateV3 ¶
func GenReqDefForShowTemplateV3() *def.HttpRequestDef
func GenReqDefForStartPipeline ¶ added in v0.0.73
func GenReqDefForStartPipeline() *def.HttpRequestDef
func GenReqDefForUpdateApplication ¶ added in v0.0.73
func GenReqDefForUpdateApplication() *def.HttpRequestDef
Types ¶
type DevStarClient ¶
type DevStarClient struct {
HcClient *http_client.HcHttpClient
}
func NewDevStarClient ¶
func NewDevStarClient(hcClient *http_client.HcHttpClient) *DevStarClient
func (*DevStarClient) CheckRepositoryDuplicateName ¶ added in v0.0.73
func (c *DevStarClient) CheckRepositoryDuplicateName(request *model.CheckRepositoryDuplicateNameRequest) (*model.CheckRepositoryDuplicateNameResponse, error)
检查仓库名称是否重名 - 校验规则 同一个项目下的仓库名称不能存在重复,当结果为true时,校验通过,仓库名称可用,否则,校验不通过,当前项目下的仓库名称已存在,不可用 - 必传参数 project_id,name,region_id
func (*DevStarClient) CreateDeploymentJobs ¶ added in v0.0.73
func (c *DevStarClient) CreateDeploymentJobs(request *model.CreateDeploymentJobsRequest) (*model.CreateDeploymentJobsResponse, error)
创建部署任务,并触发任务执行,当前只支持函数部署。 其中,报文中file_id为查询软件版本包接口返回版本包id; handler为在函数部署方式下,入口函数名称,从应用代码中获取,格式为“包名.类名.函数名称”,例如:com.example.demo.APIGTrigger.handler。 也可以从应用详情接口返回结构template_deployment中直接获取。
func (*DevStarClient) CreateTemplateViewHistories ¶
func (c *DevStarClient) CreateTemplateViewHistories(request *model.CreateTemplateViewHistoriesRequest) (*model.CreateTemplateViewHistoriesResponse, error)
未登录状态下,将用户浏览过的模板缓存在浏览器中,登录时,调用该接口同步模板浏览记录。
func (*DevStarClient) DeleteApplicationV4 ¶ added in v0.0.73
func (c *DevStarClient) DeleteApplicationV4(request *model.DeleteApplicationV4Request) (*model.DeleteApplicationV4Response, error)
根据应用Id删除应用,并可以选择删除其关联的代码仓、流水线资源
func (*DevStarClient) DownloadApplicationCode ¶
func (c *DevStarClient) DownloadApplicationCode(request *model.DownloadApplicationCodeRequest) (*model.DownloadApplicationCodeResponse, error)
下载模板产物。
func (*DevStarClient) ListApplicationsV6 ¶ added in v0.0.73
func (c *DevStarClient) ListApplicationsV6(request *model.ListApplicationsV6Request) (*model.ListApplicationsV6Response, error)
获取我创建的应用列表 当前只支持查询我创建的应用,其中请求参数is_created_by_self需为true
func (*DevStarClient) ListPipelineTemplates ¶ added in v0.0.73
func (c *DevStarClient) ListPipelineTemplates(request *model.ListPipelineTemplatesRequest) (*model.ListPipelineTemplatesResponse, error)
流水线模板列表查询
func (*DevStarClient) ListProjectsV4 ¶ added in v0.0.73
func (c *DevStarClient) ListProjectsV4(request *model.ListProjectsV4Request) (*model.ListProjectsV4Response, error)
获取用户有权限的DevStar存量DevCloud项目列表。 来源包括:1.DevStar创建的DevCloud项目;2.DevStar应用有关联DevCloud项目。
func (*DevStarClient) ListPublishedTemplates ¶
func (c *DevStarClient) ListPublishedTemplates(request *model.ListPublishedTemplatesRequest) (*model.ListPublishedTemplatesResponse, error)
查询模板列表,推荐使用V2版本接口。
func (*DevStarClient) ListTemplateViewHistories ¶
func (c *DevStarClient) ListTemplateViewHistories(request *model.ListTemplateViewHistoriesRequest) (*model.ListTemplateViewHistoriesResponse, error)
查询DevStar或者CodeLabs登录用户浏览过的模板(只返回最近浏览的5个模板)。
func (*DevStarClient) ListTemplates ¶ added in v0.0.76
func (c *DevStarClient) ListTemplates(request *model.ListTemplatesRequest) (*model.ListTemplatesResponse, error)
查询模板列表。
func (*DevStarClient) ListTemplatesV2 ¶
func (c *DevStarClient) ListTemplatesV2(request *model.ListTemplatesV2Request) (*model.ListTemplatesV2Response, error)
查询模板列表。
func (*DevStarClient) RunCodehubTemplateJob ¶
func (c *DevStarClient) RunCodehubTemplateJob(request *model.RunCodehubTemplateJobRequest) (*model.RunCodehubTemplateJobResponse, error)
使用CodeHub模板创建应用代码。 通过 Codehub 模板创建生成应用代码的任务,并将应用代码存储于指定的 CodeHub 仓库中或者生成代码压缩包,可以通过返回的任务 ID 查询相关任务状态。 - 接口鉴权方式 通过华为云服务获取的用户token。 - 代码生成位置 应用代码生成后的地址,目前支持codehub地址和压缩包下载地址。
func (*DevStarClient) RunDevstarTemplateJob ¶
func (c *DevStarClient) RunDevstarTemplateJob(request *model.RunDevstarTemplateJobRequest) (*model.RunDevstarTemplateJobResponse, error)
使用DevStar的模板创建应用代码。 通过 DevStar 模板创建生成应用代码的任务,并将应用代码存储于指定的 CodeHub 仓库中,可以通过返回的任务 ID 查询相关任务状态。 - 接口鉴权方式 通过华为云服务获取的用户token。 - 代码生成位置 应用代码生成后的地址,目前支持codehub地址和压缩包下载地址。
func (*DevStarClient) ShowApplicationDependentResources ¶ added in v0.0.73
func (c *DevStarClient) ShowApplicationDependentResources(request *model.ShowApplicationDependentResourcesRequest) (*model.ShowApplicationDependentResourcesResponse, error)
根据应用Id获取依赖元数据资源
func (*DevStarClient) ShowApplicationReleaseRepositories ¶ added in v0.0.73
func (c *DevStarClient) ShowApplicationReleaseRepositories(request *model.ShowApplicationReleaseRepositoriesRequest) (*model.ShowApplicationReleaseRepositoriesResponse, error)
通过应用Id获取软件发布仓库列表
func (*DevStarClient) ShowApplicationResDeleteStatus ¶ added in v0.0.73
func (c *DevStarClient) ShowApplicationResDeleteStatus(request *model.ShowApplicationResDeleteStatusRequest) (*model.ShowApplicationResDeleteStatusResponse, error)
根据应用Id查询应用关联的代码仓、流水线删除状态 使用场景:用户删除应用关联的资源(如代码仓、流水线...)后,通过该接口实时查询代码仓、流水线删除状态
func (*DevStarClient) ShowApplicationV3 ¶ added in v0.0.73
func (c *DevStarClient) ShowApplicationV3(request *model.ShowApplicationV3Request) (*model.ShowApplicationV3Response, error)
根据应用Id获取应用详情
func (*DevStarClient) ShowDeploymentJobs ¶ added in v0.0.73
func (c *DevStarClient) ShowDeploymentJobs(request *model.ShowDeploymentJobsRequest) (*model.ShowDeploymentJobsResponse, error)
查询应用环境部署任务详情
func (*DevStarClient) ShowJobDetail ¶
func (c *DevStarClient) ShowJobDetail(request *model.ShowJobDetailRequest) (*model.ShowJobDetailResponse, error)
查询任务的详情。 通过任务ID可以查看任务的状态 当任务结束时返回应用代码存放的位置。 - 接口鉴权方式 通过华为云服务获取的用户token。 - 代码生成位置 应用代码生成后的地址,目前支持codehub地址和压缩包下载地址。
func (*DevStarClient) ShowPipelineLastStatusV2 ¶ added in v0.0.73
func (c *DevStarClient) ShowPipelineLastStatusV2(request *model.ShowPipelineLastStatusV2Request) (*model.ShowPipelineLastStatusV2Response, error)
查询应用流水线最近一次运行状态查询接口
func (*DevStarClient) ShowRepositoryByCloudIde ¶ added in v0.0.76
func (c *DevStarClient) ShowRepositoryByCloudIde(request *model.ShowRepositoryByCloudIdeRequest) (*model.ShowRepositoryByCloudIdeResponse, error)
使用 CloudIDE 实例打开应用代码。CloudIDE会保存用户项目数据,相同用户使用同一个CloudIDE 使用要求:1.用户需为登录状态; 2.拥有仓库权限
func (*DevStarClient) ShowRepositoryStatisticalDataV2 ¶ added in v0.0.73
func (c *DevStarClient) ShowRepositoryStatisticalDataV2(request *model.ShowRepositoryStatisticalDataV2Request) (*model.ShowRepositoryStatisticalDataV2Response, error)
查询代码仓库的统计信息,包括代码仓的名称,代码行数等信息
func (*DevStarClient) ShowTemplateDetail ¶
func (c *DevStarClient) ShowTemplateDetail(request *model.ShowTemplateDetailRequest) (*model.ShowTemplateDetailResponse, error)
查询模板详情,推荐使用V3版本接口。
func (*DevStarClient) ShowTemplateFile ¶
func (c *DevStarClient) ShowTemplateFile(request *model.ShowTemplateFileRequest) (*model.ShowTemplateFileResponse, error)
该接口可以用于模板作者或模板维护人读取模板文件内容。
func (*DevStarClient) ShowTemplateV3 ¶
func (c *DevStarClient) ShowTemplateV3(request *model.ShowTemplateV3Request) (*model.ShowTemplateV3Response, error)
获取指定模板详情,包括模板id、名称、描述、作者、标签、上架时间等信息。
func (*DevStarClient) StartPipeline ¶ added in v0.0.73
func (c *DevStarClient) StartPipeline(request *model.StartPipelineRequest) (*model.StartPipelineResponse, error)
根据流水线Id操作流水线启动
func (*DevStarClient) UpdateApplication ¶ added in v0.0.73
func (c *DevStarClient) UpdateApplication(request *model.UpdateApplicationRequest) (*model.UpdateApplicationResponse, error)
根据应用Id更新对应有权限的应用信息 - 允许更新信息的信息包含 name,description,icon