domains

package
v0.5.22 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client *golangsdk.ServiceClient, org, repo 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"`
	// Currently, only the `read` permission is supported.
	Permit string `json:"permit"`
	// 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"`
	Description string `json:"description"`
}

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, org, repo string, opts CreateOptsBuilder) (r CreateResult)

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

func Delete(client *golangsdk.ServiceClient, org, repo, domain string) (r DeleteResult)

type GetResult

type GetResult struct {
	golangsdk.Result
}

func Get

func Get(client *golangsdk.ServiceClient, org, repo, domain string) (r GetResult)

func (GetResult) Extract

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

type UpdateOpts

type UpdateOpts struct {
	Permit      string `json:"permit"`
	Deadline    string `json:"deadline"`
	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, org, repo, domain string, opts UpdateOptsBuilder) (r UpdateResult)

Jump to

Keyboard shortcuts

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