domains

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client *golangsdk.ServiceClient, namespace, repository string) (p pagination.Pager)

Types

type AccessDomain

type AccessDomain struct {
	Organization string `json:"namespace"`
	Repository   string `json:"repository"`
	// Name
	AccessDomain string `json:"access_domain"`
	Permit       string `json:"permit"`
	Deadline     string `json:"deadline"`
	Description  string `json:"description"`
	CreatorID    string `json:"creator_id"`
	CreatorName  string `json:"creator_name"`
	Created      string `json:"created"`
	Updated      string `json:"updated"`
	// Status. `true`: valid `false`: expired
	Status bool `json:"status"`
}

func ExtractAccessDomains

func ExtractAccessDomains(p pagination.Page) ([]AccessDomain, error)

type AccessDomainPage

type AccessDomainPage struct {
	pagination.SinglePageBase
}

type CreateOpts

type CreateOpts struct {
	AccessDomain string `json:"access_domain" required:"true"`
	// Currently, only the `read` permission is supported.
	Permit string `json:"permit" required:"true"`
	// End date of image sharing (UTC). When the value is set to `forever`,
	// the image will be permanently available for the domain.
	// The validity period is calculated by day. The shared images expire at 00:00:00 on the day after the end date.
	Deadline    string `json:"deadline" required:"true"`
	Description string `json:"description,omitempty"`
}

func (CreateOpts) ToAccessDomainCreateMap

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

type CreateOptsBuilder

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

type CreateResult

type CreateResult struct {
	golangsdk.ErrResult
}

func Create

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

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

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

type GetResult

type GetResult struct {
	golangsdk.Result
}

func Get

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

func (GetResult) Extract

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

type UpdateOpts

type UpdateOpts struct {
	Permit      string  `json:"permit" required:"true"`
	Deadline    string  `json:"deadline" required:"true"`
	Description *string `json:"description,omitempty"`
}

UpdateOpts used for update operations For argument details see CreateOpts

func (UpdateOpts) ToAccessDomainUpdateMap

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

type UpdateOptsBuilder

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

type UpdateResult

type UpdateResult struct {
	golangsdk.ErrResult
}

func Update

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

Jump to

Keyboard shortcuts

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