uhub

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package uhub include resources of ucloud uhub product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRepoRequest

type CreateRepoRequest struct {
	request.CommonBase

	// 仓库备注
	Description *string `required:"false"`

	// 镜像仓库是否公开,公开为true、不公开为false;默认为false
	IsShared *bool `required:"false"`

	// 仓库名称,不可修改
	RepoName *string `required:"true"`
}

CreateRepoRequest is request schema for CreateRepo action

type CreateRepoResponse

type CreateRepoResponse struct {
	response.CommonBase

	// 有错误时返回内容
	Message string
}

CreateRepoResponse is response schema for CreateRepo action

type DeleteRepoImageRequest

type DeleteRepoImageRequest struct {
	request.CommonBase

	// 镜像名称
	ImageName *string `required:"true"`

	// 镜像仓库名称
	RepoName *string `required:"true"`

	// 不指定tag则删除全部tag
	TagName *string `required:"false"`
}

DeleteRepoImageRequest is request schema for DeleteRepoImage action

type DeleteRepoImageResponse

type DeleteRepoImageResponse struct {
	response.CommonBase
}

DeleteRepoImageResponse is response schema for DeleteRepoImage action

type DeleteRepoRequest

type DeleteRepoRequest struct {
	request.CommonBase

	// 镜像仓库名称
	RepoName *string `required:"true"`
}

DeleteRepoRequest is request schema for DeleteRepo action

type DeleteRepoResponse

type DeleteRepoResponse struct {
	response.CommonBase
}

DeleteRepoResponse is response schema for DeleteRepo action

type GetImageTagRequest

type GetImageTagRequest struct {
	request.CommonBase

	// 镜像名称
	ImageName *string `required:"true"`

	// 每次获取数量,默认为20
	Limit *int `required:"false"`

	// 偏移量,默认0
	Offset *int `required:"false"`

	// 镜像仓库名称
	RepoName *string `required:"true"`

	// 默认不写,如果填写,代表查询该tag,否则查全部tag
	TagName *string `required:"false"`
}

GetImageTagRequest is request schema for GetImageTag action

type GetImageTagResponse

type GetImageTagResponse struct {
	response.CommonBase

	// tag列表
	TagSet []TagSet

	// tag总数
	TotalCount int
}

GetImageTagResponse is response schema for GetImageTag action

type GetRepoImageRequest

type GetRepoImageRequest struct {
	request.CommonBase

	// 显示数量,默认为20
	Limit *int `required:"false"`

	// 偏移量,默认0
	Offset *int `required:"false"`

	// 镜像仓库名称
	RepoName *string `required:"true"`
}

GetRepoImageRequest is request schema for GetRepoImage action

type GetRepoImageResponse

type GetRepoImageResponse struct {
	response.CommonBase

	// 镜像列表
	ImageSet []ImageSet

	//
	TotalCount int
}

GetRepoImageResponse is response schema for GetRepoImage action

type GetRepoRequest

type GetRepoRequest struct {
	request.CommonBase

	// 数量,默认20
	Limit *int `required:"false"`

	// 偏移量,默认0
	Offset *int `required:"false"`

	// private私有仓库,public公共仓库,默认public
	Type *string `required:"false"`
}

GetRepoRequest is request schema for GetRepo action

type GetRepoResponse

type GetRepoResponse struct {
	response.CommonBase

	// 镜像仓库列表
	RepoSet []RepoSet

	// 总的仓库数量
	TotalCount int
}

GetRepoResponse is response schema for GetRepo action

type ImageSet

type ImageSet struct {

	// 创建时间
	CreateTime string

	// 镜像名称
	ImageName string

	// 最新push的Tag
	LatestTag string

	// 镜像被下载次数
	PullCount int

	// 镜像仓库名称
	RepoName string

	// 修改时间
	UpdateTime string
}

ImageSet - 镜像信息

type RepoSet

type RepoSet struct {

	// 仓库创建时间
	CreateTime string

	// 镜像仓库描述
	Description string

	// 镜像仓库是否外网可以访问,可以为ture,不可以为false
	IsOutSide string

	// 镜像仓库类型,false为私有;true为公有
	IsShared string

	// 镜像仓库名称
	RepoName string

	// 仓库更新时间
	UpdateTime string
}

RepoSet - 镜像仓库

type TagSet

type TagSet struct {

	// 镜像digest值
	Digest string

	// Tag名称
	TagName string

	// 镜像更新时间
	UpdateTime string
}

TagSet - Tag详细信息

type UHubClient

type UHubClient struct {
	*ucloud.Client
}

UHubClient is the client of UHub

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *UHubClient

NewClient will return a instance of UHubClient

func (*UHubClient) CreateRepo

func (c *UHubClient) CreateRepo(req *CreateRepoRequest) (*CreateRepoResponse, error)

API: CreateRepo

创建镜像仓库

func (*UHubClient) DeleteRepo

func (c *UHubClient) DeleteRepo(req *DeleteRepoRequest) (*DeleteRepoResponse, error)

API: DeleteRepo

删除镜像仓库

func (*UHubClient) DeleteRepoImage

func (c *UHubClient) DeleteRepoImage(req *DeleteRepoImageRequest) (*DeleteRepoImageResponse, error)

API: DeleteRepoImage

删除镜像

func (*UHubClient) GetImageTag

func (c *UHubClient) GetImageTag(req *GetImageTagRequest) (*GetImageTagResponse, error)

API: GetImageTag

获取镜像tag

func (*UHubClient) GetRepo

func (c *UHubClient) GetRepo(req *GetRepoRequest) (*GetRepoResponse, error)

API: GetRepo

获取镜像仓库

func (*UHubClient) GetRepoImage

func (c *UHubClient) GetRepoImage(req *GetRepoImageRequest) (*GetRepoImageResponse, error)

API: GetRepoImage

获取镜像仓库下的镜像

func (*UHubClient) NewCreateRepoRequest

func (c *UHubClient) NewCreateRepoRequest() *CreateRepoRequest

NewCreateRepoRequest will create request of CreateRepo action.

func (*UHubClient) NewDeleteRepoImageRequest

func (c *UHubClient) NewDeleteRepoImageRequest() *DeleteRepoImageRequest

NewDeleteRepoImageRequest will create request of DeleteRepoImage action.

func (*UHubClient) NewDeleteRepoRequest

func (c *UHubClient) NewDeleteRepoRequest() *DeleteRepoRequest

NewDeleteRepoRequest will create request of DeleteRepo action.

func (*UHubClient) NewGetImageTagRequest

func (c *UHubClient) NewGetImageTagRequest() *GetImageTagRequest

NewGetImageTagRequest will create request of GetImageTag action.

func (*UHubClient) NewGetRepoImageRequest

func (c *UHubClient) NewGetRepoImageRequest() *GetRepoImageRequest

NewGetRepoImageRequest will create request of GetRepoImage action.

func (*UHubClient) NewGetRepoRequest

func (c *UHubClient) NewGetRepoRequest() *GetRepoRequest

NewGetRepoRequest will create request of GetRepo action.

func (*UHubClient) NewUpdateRepoRequest

func (c *UHubClient) NewUpdateRepoRequest() *UpdateRepoRequest

NewUpdateRepoRequest will create request of UpdateRepo action.

func (*UHubClient) UpdateRepo

func (c *UHubClient) UpdateRepo(req *UpdateRepoRequest) (*UpdateRepoResponse, error)

API: UpdateRepo

更新镜像仓库

type UpdateRepoRequest

type UpdateRepoRequest struct {
	request.CommonBase

	// 备注
	Description *string `required:"false"`

	// false设置为私有;true设置为公有。默认false
	IsShared *string `required:"false"`

	// 镜像仓库名称,不可修改
	RepoName *string `required:"true"`
}

UpdateRepoRequest is request schema for UpdateRepo action

type UpdateRepoResponse

type UpdateRepoResponse struct {
	response.CommonBase

	// 错误的时候返回
	Message string
}

UpdateRepoResponse is response schema for UpdateRepo action

Jump to

Keyboard shortcuts

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