Documentation ¶
Index ¶
- type CrClient
- func (c *CrClient) CheckRegistryName(request *cr.CheckRegistryNameRequest) (*cr.CheckRegistryNameResponse, error)
- func (c *CrClient) CheckRepositoryName(request *cr.CheckRepositoryNameRequest) (*cr.CheckRepositoryNameResponse, error)
- func (c *CrClient) CreateRegistry(request *cr.CreateRegistryRequest) (*cr.CreateRegistryResponse, error)
- func (c *CrClient) CreateRepository(request *cr.CreateRepositoryRequest) (*cr.CreateRepositoryResponse, error)
- func (c *CrClient) DeleteImage(request *cr.DeleteImageRequest) (*cr.DeleteImageResponse, error)
- func (c *CrClient) DeleteRegistry(request *cr.DeleteRegistryRequest) (*cr.DeleteRegistryResponse, error)
- func (c *CrClient) DeleteRepository(request *cr.DeleteRepositoryRequest) (*cr.DeleteRepositoryResponse, error)
- func (c *CrClient) DescribeAuthorizationTokens(request *cr.DescribeAuthorizationTokensRequest) (*cr.DescribeAuthorizationTokensResponse, error)
- func (c *CrClient) DescribeImages(request *cr.DescribeImagesRequest) (*cr.DescribeImagesResponse, error)
- func (c *CrClient) DescribeQuotas(request *cr.DescribeQuotasRequest) (*cr.DescribeQuotasResponse, error)
- func (c *CrClient) DescribeRegistries(request *cr.DescribeRegistriesRequest) (*cr.DescribeRegistriesResponse, error)
- func (c *CrClient) DescribeRegistry(request *cr.DescribeRegistryRequest) (*cr.DescribeRegistryResponse, error)
- func (c *CrClient) DescribeRepositories(request *cr.DescribeRepositoriesRequest) (*cr.DescribeRepositoriesResponse, error)
- func (c *CrClient) GetAuthorizationToken(request *cr.GetAuthorizationTokenRequest) (*cr.GetAuthorizationTokenResponse, error)
- func (c *CrClient) ReleaseAuthorizationToken(request *cr.ReleaseAuthorizationTokenRequest) (*cr.ReleaseAuthorizationTokenResponse, error)
- func (c *CrClient) SetConfig(config *core.Config)
- func (c *CrClient) SetLogger(logger core.Logger)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CrClient ¶
type CrClient struct {
core.JDCloudClient
}
func NewCrClient ¶
func NewCrClient(credential *core.Credential) *CrClient
func (*CrClient) CheckRegistryName ¶ added in v1.1.0
func (c *CrClient) CheckRegistryName(request *cr.CheckRegistryNameRequest) (*cr.CheckRegistryNameResponse, error)
查询指定注册表名称是否已经存在以及是否符合命名规范。
func (*CrClient) CheckRepositoryName ¶ added in v1.1.2
func (c *CrClient) CheckRepositoryName(request *cr.CheckRepositoryNameRequest) (*cr.CheckRepositoryNameResponse, error)
查询指定镜像仓库名称是否已经存在以及是否符合命名规范。
func (*CrClient) CreateRegistry ¶
func (c *CrClient) CreateRegistry(request *cr.CreateRegistryRequest) (*cr.CreateRegistryResponse, error)
通过参数创建注册表。
func (*CrClient) CreateRepository ¶
func (c *CrClient) CreateRepository(request *cr.CreateRepositoryRequest) (*cr.CreateRepositoryResponse, error)
通过参数创建镜像仓库。
仓库名称可以分解为多个路径名,每个名称必须至少包含一个小写字母数字,考虑URL规范。 支持包含段划线或者下划线进行分割,但不允许点'.',多个路径名之间通过("/")连接,总长度不超过256个字符,当前只支持二级目录。
func (*CrClient) DeleteImage ¶ added in v1.1.2
func (c *CrClient) DeleteImage(request *cr.DeleteImageRequest) (*cr.DeleteImageResponse, error)
删除镜像
imageDigest imageTag imageTagStatus 三者只能且必须传一个。 可根据Tag状态删除Image,例如删除所有tagged的镜像。 digest和tag唯一表征单个镜像,其中imageDigest为sha256哈希,image manifest的digest。 例如 sha256:examplee6d1e504117a17000003d3753086354a38375961f2e665416ef4b1b2f;image使用的tag, 如 "precise"
func (*CrClient) DeleteRegistry ¶ added in v1.1.2
func (c *CrClient) DeleteRegistry(request *cr.DeleteRegistryRequest) (*cr.DeleteRegistryResponse, error)
删除指定用户下某个 registry.
func (*CrClient) DeleteRepository ¶ added in v1.1.2
func (c *CrClient) DeleteRepository(request *cr.DeleteRepositoryRequest) (*cr.DeleteRepositoryResponse, error)
删除指定用户下某个镜像仓库.
func (*CrClient) DescribeAuthorizationTokens ¶ added in v1.1.2
func (c *CrClient) DescribeAuthorizationTokens(request *cr.DescribeAuthorizationTokensRequest) (*cr.DescribeAuthorizationTokensResponse, error)
<p>批量查询令牌。</p>
<p>暂时不支持分页和过滤条件。</p>
func (*CrClient) DescribeImages ¶
func (c *CrClient) DescribeImages(request *cr.DescribeImagesRequest) (*cr.DescribeImagesResponse, error)
返回指定repository中images的元数据,包括image size, image tags和creation date。
func (*CrClient) DescribeQuotas ¶
func (c *CrClient) DescribeQuotas(request *cr.DescribeQuotasRequest) (*cr.DescribeQuotasResponse, error)
查询配额
func (*CrClient) DescribeRegistries ¶ added in v1.1.2
func (c *CrClient) DescribeRegistries(request *cr.DescribeRegistriesRequest) (*cr.DescribeRegistriesResponse, error)
批量查询指定用户下所有 registry 详情。
暂不支持 filter.
func (*CrClient) DescribeRegistry ¶ added in v1.1.2
func (c *CrClient) DescribeRegistry(request *cr.DescribeRegistryRequest) (*cr.DescribeRegistryResponse, error)
查询指定用户下某个 registry 详情。
func (*CrClient) DescribeRepositories ¶ added in v1.1.2
func (c *CrClient) DescribeRepositories(request *cr.DescribeRepositoriesRequest) (*cr.DescribeRepositoriesResponse, error)
描述用户指定 registry 下的 repository.
func (*CrClient) GetAuthorizationToken ¶
func (c *CrClient) GetAuthorizationToken(request *cr.GetAuthorizationTokenRequest) (*cr.GetAuthorizationTokenResponse, error)
<p>申请12小时有效期的令牌。 使用<code>docker</code> CLI push和pull镜像。</p>
<p><code>authorizationToken</code>为每个registry返回一个base64编码的字符串,解码后<code>docker login</code>命令 可完成指定registry的鉴权。JCR CLI提供<code>jcr get-login</code>进行认证处理。</p>
func (*CrClient) ReleaseAuthorizationToken ¶ added in v1.1.2
func (c *CrClient) ReleaseAuthorizationToken(request *cr.ReleaseAuthorizationTokenRequest) (*cr.ReleaseAuthorizationTokenResponse, error)
释放用户 registry 的 token。