repositories

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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 {
	// Name of the image repository
	Repository string `json:"repository" required:"true"`
	// Type of the image repository
	// The value can be app_server, linux, framework_app, database, lang, other, windows, arm
	Category string `json:"category,omitempty"`
	// Description of the image repository
	Description string `json:"description,omitempty"`
	// Whether the image repository is public
	IsPublic bool `json:"is_public"`
}

func (CreateOpts) ToRepositoryCreateMap

func (opts CreateOpts) ToRepositoryCreateMap() (map[string]interface{}, error)

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToRepositoryCreateMap() (map[string]interface{}, error)
}

type CreateResult

type CreateResult struct {
	golangsdk.ErrResult
}

func Create

func Create(client *golangsdk.ServiceClient, namespace string, opts CreateOptsBuilder) (r CreateResult)

Create new repository in the namespace(organization)

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

func Delete(client *golangsdk.ServiceClient, namespace, repository string) (r DeleteResult)

type GetResult

type GetResult struct {
	golangsdk.Result
}

func Get

func Get(client *golangsdk.ServiceClient, namespace, repository string) (r GetResult)

func (GetResult) Extract

func (r GetResult) Extract() (*ImageRepository, error)

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"`
	Prioriry       int    `json:"poriroty"`
}

func ExtractRepositories

func ExtractRepositories(p pagination.Page) ([]ImageRepository, error)

type ListOpts

type ListOpts struct {
	// Namespace(Organization) name
	Namespace string `q:"namespace"`
	// Image repository name
	Name string `q:"name"`
	// Image repository category.
	// The value can be app_server, linux, framework_app, database, lang, other, windows, arm
	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 0 is a valid value
	Offset *int `q:"offset,omitempty"`
	Limit  int  `q:"limit,omitempty"`
}

func (ListOpts) ToRepositoryListQuery

func (opts ListOpts) ToRepositoryListQuery() (string, error)

type ListOptsBuilder

type ListOptsBuilder interface {
	ToRepositoryListQuery() (string, error)
}

type RepositoryPage

type RepositoryPage struct {
	pagination.LinkedPageBase
}

type UpdateOpts

type UpdateOpts struct {
	Category    string `json:"category,omitempty"`
	Description string `json:"description,omitempty"`
	IsPublic    bool   `json:"is_public"`
}

func (UpdateOpts) ToRepositoryUpdateMap

func (opts UpdateOpts) ToRepositoryUpdateMap() (map[string]interface{}, error)

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToRepositoryUpdateMap() (map[string]interface{}, error)
}

type UpdateResult

type UpdateResult struct {
	golangsdk.ErrResult
}

func Update

func Update(client *golangsdk.ServiceClient, namespace, repository string, opts UpdateOptsBuilder) (r UpdateResult)

Jump to

Keyboard shortcuts

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