acr

package
v0.0.0-...-f36af3d Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package acr 阿里云容器镜像服务 API 文档地址:https://help.aliyun.com/document_detail/72377.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorization

type Authorization struct {
	UserName string
	PassWord string
	Expire   string
}

Authorization Authorization

func (Authorization) String

func (a Authorization) String() string

type Build

type Build struct {
	StartTime   int        `json:"startTime"`
	EndTime     int        `json:"endTime"`
	BuildID     string     `json:"buildId"`
	BuildStatus string     `json:"buildStatus"`
	Image       BuildImage `json:"image"`
}

Build Build

type BuildImage

type BuildImage struct {
	Tag           string `json:"tag"`
	RepoNamespace string `json:"repoNamespace"`
	RepoName      string `json:"repoName"`
}

BuildImage BuildImage

type BuildRule

type BuildRule struct {
	ImageTag           string `json:"imageTag"`
	DockerfileLocation string `json:"dockerfileLocation"`
	DockerfileName     string `json:"dockerfileName"`
	PushType           string `json:"pushType"`
	PushName           string `json:"pushName"`
	BuildRuleID        int    `json:"buildRuleId"`
}

BuildRule BuildRule

type BuildRules

type BuildRules struct {
	BuildRules []BuildRule `json:"buildRules"`
}

BuildRules BuildRules

type Builds

type Builds struct {
	Total    int     `json:"total"`
	Page     int     `json:"page"`
	Builds   []Build `json:"builds"`
	PageSize int     `json:"pageSize"`
}

Builds Builds

type Client

type Client struct {
	sdk.Client
	// contains filtered or unexported fields
}

Client 客户端

func NewClient

func NewClient(regionID, accessKeyID, accessKeySecret string) (client *Client, err error)

NewClient 使用 accesskey 创建一个客户端

func (*Client) CancelRepoBuild

func (c *Client) CancelRepoBuild() (response *responses.CommonResponse, err error)

CancelRepoBuild 取消仓库构建任务。

func (*Client) CreateNamespace

func (c *Client) CreateNamespace(namespace string) (response *responses.CommonResponse, err error)

CreateNamespace 创建一个新的命名空间。

func (*Client) CreateRepoBuildRule

func (c *Client) CreateRepoBuildRule(repoNamespace, repoName, dockerfileLocation, tag string) (data BuildRule, err error)

CreateRepoBuildRule 创建一个仓库的构建规则。

func (*Client) DeleteNamespace

func (c *Client) DeleteNamespace(namespace string) (response *responses.CommonResponse, err error)

DeleteNamespace 删除一个已有命名空间,注意这个操作会将存在于该命名空间下的所有仓库以及所有仓库下的镜像一并删除。

func (*Client) DeleteRepoBuildRule

func (c *Client) DeleteRepoBuildRule() (response *responses.CommonResponse, err error)

DeleteRepoBuildRule 删除一个仓库的构建规则。

func (*Client) GetAuthorizationToken

func (c *Client) GetAuthorizationToken() (auth Authorization, err error)

GetAuthorizationToken 例子 返回用于登录 Registry 的临时账号和临时密码, 临时密码的有效时间为1小时, 若使用 STS 方式请求时,临时密码的有效时间等同于本次请求 STS Token 的有效时间。

func (*Client) GetNamespace

func (c *Client) GetNamespace(namespace string) (response *responses.CommonResponse, err error)

GetNamespace 查询指定命名空间的详细信息。

func (*Client) GetNamespaceList

func (c *Client) GetNamespaceList() (response *responses.CommonResponse, err error)

GetNamespaceList 查询命名空间列表。

func (*Client) GetRegionList

func (c *Client) GetRegionList() (response *responses.CommonResponse, err error)

GetRegionList 例子 查询区域列表。

func (*Client) GetRepoBuildList

func (c *Client) GetRepoBuildList(repoNamespace, repoName string) (data Builds, err error)

GetRepoBuildList 查询仓库构建记录。

func (*Client) GetRepoBuildRuleList

func (c *Client) GetRepoBuildRuleList(repoNamespace, repoName string) (data BuildRules, err error)

GetRepoBuildRuleList 查询仓库构建规则列表。

func (*Client) GetRepoBuildStatus

func (c *Client) GetRepoBuildStatus(repoNamespace, repoName, buildID string) (data Build, err error)

GetRepoBuildStatus 查询仓库中构建任务的状态。

func (*Client) NewRequest

func (c *Client) NewRequest() (request *requests.CommonRequest)

NewRequest 创建一个请求体

func (*Client) StartRepoBuildByRule

func (c *Client) StartRepoBuildByRule(repoNamespace, repoName string, buildRuleID int) (response *responses.CommonResponse, err error)

StartRepoBuildByRule 根据仓库构建规则创建构建任务。

func (*Client) UpdateNamespace

func (c *Client) UpdateNamespace(namespace string, AutoCreate bool, DefaultVisibility string) (response *responses.CommonResponse, err error)

UpdateNamespace 更新命名空间的基本信息。 AutoCreate true or false DefaultVisibility "PUBLIC" or "PRIVATE"

func (*Client) UpdateRepoBuildRule

func (c *Client) UpdateRepoBuildRule(repoNamespace, repoName, dockerfileLocation, tag string, buildRule BuildRule) (data BuildRule, err error)

UpdateRepoBuildRule 更新仓库构建规则。

Jump to

Keyboard shortcuts

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