Documentation ¶
Index ¶
- func Create(client *golangsdk.ServiceClient, opts CreateOpts) (err error)
- func CreatePermissions(client *golangsdk.ServiceClient, organization, repository string, ...) (err error)
- func Delete(client *golangsdk.ServiceClient, organization, repository string) (err error)
- func DeleteByTag(client *golangsdk.ServiceClient, opts DeleteByTagOpts) (err error)
- func DeletePermissions(client *golangsdk.ServiceClient, organization, repository string, ...) (err error)
- func GetPermissions(client *golangsdk.ServiceClient, organization, repository string) (*organizations.Permissions, error)
- func List(client *golangsdk.ServiceClient, opts ListOpts) (p pagination.Pager)
- func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (err error)
- func UpdatePermissions(client *golangsdk.ServiceClient, organization, repository string, ...) (err error)
- type CreateOpts
- type DeleteByTagOpts
- type ImageRepository
- type ListOpts
- type ListTagsOpts
- type RepositoryPage
- type TagsResponse
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (err error)
Create new repository in the organization (namespace)
func CreatePermissions ¶ added in v0.5.27
func CreatePermissions(client *golangsdk.ServiceClient, organization, repository string, opts []organizations.Auth) (err error)
func DeleteByTag ¶ added in v0.5.27
func DeleteByTag(client *golangsdk.ServiceClient, opts DeleteByTagOpts) (err error)
func DeletePermissions ¶ added in v0.5.27
func GetPermissions ¶ added in v0.5.27
func GetPermissions(client *golangsdk.ServiceClient, organization, repository string) (*organizations.Permissions, error)
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOpts) (p pagination.Pager)
func Update ¶
func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (err error)
func UpdatePermissions ¶ added in v0.5.27
func UpdatePermissions(client *golangsdk.ServiceClient, organization, repository string, opts []organizations.Auth) (err error)
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Organization name. Namespace string `json:"-"` // Image repository name. // Enter 1 to 128 characters, starting and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), slashes (/), underscores (_), and hyphens (-) are allowed. Periods, slashes, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. Repository string `json:"repository"` // Repository type. // The value can be app_server, linux, framework_app, database, lang, other, windows or arm. Category string `json:"category,omitempty"` // Brief description of the image repository. Description string `json:"description,omitempty"` // Whether the repository is a public repository. When the value is true, it indicates the repository is public. When the value is false, it indicates the repository is private. IsPublic bool `json:"is_public"` }
type DeleteByTagOpts ¶ added in v0.5.27
type ImageRepository ¶
type ImageRepository struct { // Image repository ID. ID int `json:"id"` // Organization ID. OrganizationID int `json:"ns_id"` // Image repository name. Name string `json:"name"` // Image repository type. The value can be app_server, linux, framework_app, database, lang, other, windows, or arm. Category string `json:"category"` // Brief description of the image repository. Description string `json:"description"` // Image repository creator ID. CreatorID string `json:"creator_id"` // Image repository creator. CreatorName string `json:"creator_name"` // Image repository size. Size int `json:"size"` // Whether the image repository is a public repository. The value can be true or false. IsPublic bool `json:"is_public"` // Number of images in an image repository. NumImages int `json:"num_images"` // Download times of an image repository. NumDownloads int `json:"num_downloads"` // URL of the image repository logo image. This field has been discarded and is left empty by default. URL string `json:"url"` // External image pull address. The format is {Repository address}/{Namespace name}/{Repository name}. Path string `json:"path"` // Internal image pull address. The format is {Repository address}/{Namespace name}/{Repository name}. InternalPath string `json:"internal_path"` // Time when an image repository is created. It is the UTC standard time. Created string `json:"created"` // Time when an image repository is updated. It is the UTC standard time. Updated string `json:"updated"` // Account ID. DomainID string `json:"domain_id"` // Image sorting priority. Priority int `json:"priority"` }
func ExtractRepositories ¶
func ExtractRepositories(p pagination.Page) ([]ImageRepository, error)
func Get ¶
func Get(client *golangsdk.ServiceClient, organization, repository string) (*ImageRepository, error)
type ListOpts ¶
type ListOpts struct { // The value can only be self, indicating that the image is a self-owned image. Center string `q:"center"` // Organization (namespace) name Organization string `q:"namespace"` // Image repository name Name string `q:"name"` // Image repository type. The value can be app_server, linux, framework_app, database, lang, other, windows, or arm. Category string `q:"category"` // Sorting criteria. The value can be name, updated_time, or tag_count. // Ensure that the order_column and order_type parameters are used together OrderColumn string `q:"order_column"` // Sorting type. You can set this parameter to desc (descending sort) and asc (ascending sort). // Ensure that the order_column and order_type parameters are used together. OrderType string `q:"order_type"` // Start index. // Ensure that the offset and limit parameters are used together. Offset *int `q:"offset,omitempty"` // Number of returned records. // Ensure that the offset and limit parameters are used together. Limit int `q:"limit,omitempty"` }
func (ListOpts) ToRepositoryListQuery ¶
type ListTagsOpts ¶ added in v0.5.27
type ListTagsOpts struct { // Organization name Namespace string `json:"-" required:"true"` // Image repository name. Repository string `json:"-" required:"true"` // Start index. Offset int `q:"offset"` // Number of responses. Limit int `q:"limit"` // Sorting by column. You can set this parameter to updated_at (sorting by update time). OrderColumn string `q:"order_column"` // Sorting type. You can set this parameter to desc (descending sort) and asc (ascending sort). OrderType string `q:"order_type"` // Image tag name. Tag string `q:"tag"` }
type RepositoryPage ¶
type RepositoryPage struct {
pagination.OffsetPageBase
}
type TagsResponse ¶ added in v0.5.27
type TagsResponse struct { // ID Id int64 `json:"id"` // Repository ID. RepoId int64 `json:"repo_id"` // Image tag name. Tag string `json:"Tag"` // Image ID. ImageId string `json:"image_id"` // Image manifest. Manifest string `json:"manifest"` // SHA value of an image. Digest string `json:"digest"` // Docker protocol version. The version can be 1 or 2. Schema int64 `json:"schema"` // External image pull address. The format is {Repository address}/{Namespace name}/{Repository name}:{Tag name}. Path string `json:"path"` // Internal image pull address. The format is {Repository address}/{Namespace name}/{Repository name}:{Tag name}. InternalPath string `json:"internal_path"` // Image size. // Value range: 0 to 9223372036854775807 // Unit: byte Size int64 `json:"size"` // By default, the value is false. IsTrusted bool `json:"is_trusted"` // Time when an image is created. It is the UTC standard time. Users need to calculate the offset based on the local time. For example, GMT+8 is 8 hours ahead the GMT time. Created string `json:"created"` // Time when an image is updated. It is the UTC standard time. Users need to calculate the offset based on the local time. For example, GMT+8 is 8 hours ahead the GMT time. Updated string `json:"updated"` // Time when an image was deleted. Deleted string `json:"deleted"` // Account ID. DomainId string `json:"domain_id"` // 0: manifest. 1: manifest list. TagType int64 `json:"tag_type"` }
func ListTags ¶ added in v0.5.27
func ListTags(client *golangsdk.ServiceClient, opts ListTagsOpts) ([]TagsResponse, error)
type UpdateOpts ¶
type UpdateOpts struct { // Organization name. Namespace string `json:"-"` // Image repository name. Repository string `json:"-"` // Repository type. // The value can be app_server, linux, framework_app, database, lang, other, windows or arm. Category string `json:"category,omitempty"` // Repository description. Description string `json:"description,omitempty"` // Whether the repository is a public repository. The value can be either true or false. IsPublic bool `json:"is_public"` }
Click to show internal directories.
Click to hide internal directories.