Documentation ¶
Index ¶
- func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) (p pagination.Pager)
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type ImageRepository
- type ListOpts
- type ListOptsBuilder
- type RepositoryPage
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) (p pagination.Pager)
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Repository - name of the image repository Repository string `json:"repository"` // Category - the value can be `app_server`, `linux`, `framework_app`, `database`, `lang`, `other`, `windows`, `arm`. Category string `json:"category,omitempty"` Description string `json:"description,omitempty"` IsPublic bool `json:"is_public"` }
func (CreateOpts) ToRepositoryCreateMap ¶
func (opts CreateOpts) ToRepositoryCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
func Create ¶
func Create(client *golangsdk.ServiceClient, organization string, opts CreateOptsBuilder) (r CreateResult)
Create new repository in the organization (namespace)
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, organization, repository string) (r DeleteResult)
type ImageRepository ¶
type ImageRepository struct { ID int `json:"id"` OrganizationID int `json:"ns_id"` Name string `json:"name"` Category string `json:"category"` Description string `json:"description"` CreatorID string `json:"creator_id"` CreatorName string `json:"creator_name"` Size int `json:"size"` IsPublic bool `json:"is_public"` NumImages int `json:"num_images"` NumDownloads int `json:"num_downloads"` URL string `json:"url"` Path string `json:"path"` InternalPath string `json:"internal_path"` Created string `json:"created"` Updated string `json:"updated"` DomainID string `json:"domain_id"` }
func ExtractRepositories ¶
func ExtractRepositories(p pagination.Page) ([]ImageRepository, error)
type ListOpts ¶
type ListOpts struct { // Organization (namespace) name Organization string `q:"namespace"` // Image repository name Name string `q:"name"` // Image repository category. Category string `q:"category"` // Sorting by column. // You can set this parameter to `name`, `updated_time`, and `tag_count`. // The parameters OrderColumn and OrderType should always be used together. 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"` Offset *int `q:"offset,omitempty"` // offset 0 is a valid value Limit int `q:"limit,omitempty"` }
func (ListOpts) ToRepositoryListQuery ¶
type ListOptsBuilder ¶
type RepositoryPage ¶
type RepositoryPage struct {
pagination.OffsetPageBase
}
type UpdateOpts ¶
type UpdateOpts struct { Category string `json:"category,omitempty"` Description string `json:"description,omitempty"` IsPublic bool `json:"is_public"` // this is mandatory field, so no pointers }
func (UpdateOpts) ToRepositoryUpdateMap ¶
func (opts UpdateOpts) ToRepositoryUpdateMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
type UpdateResult ¶
func Update ¶
func Update(client *golangsdk.ServiceClient, organization, repository string, opts UpdateOptsBuilder) (r UpdateResult)
Click to show internal directories.
Click to hide internal directories.