domains

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (err error)

func Delete

func Delete(client *golangsdk.ServiceClient, opts GetOpts) (err error)

func Update

func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (err error)

Types

type AccessDomain

type AccessDomain struct {
	Exist bool `json:"exist"`
	// Organization name.
	Namespace string `json:"namespace"`
	// Image repository name.
	Repository string `json:"repository"`
	// Name of the account used for image sharing
	AccessDomain string `json:"access_domain"`
	// Permission
	Permit string `json:"permit"`
	// Expiration time.
	Deadline string `json:"deadline"`
	// Description
	Description string `json:"description"`
	// Creator ID.
	CreatorID string `json:"creator_id"`
	// Name of the creator.
	CreatorName string `json:"creator_name"`
	// Time when an image is created. It is the UTC standard time.
	Created string `json:"created"`
	// Time when an image is updated. It is the UTC standard time.
	Updated string `json:"updated"`
	// Status. `true`: valid `false`: expired
	Status bool `json:"status"`
}

func Get

func Get(client *golangsdk.ServiceClient, opts GetOpts) (*AccessDomain, error)

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]AccessDomain, error)

func ListSharedReposDetails added in v0.5.27

func ListSharedReposDetails(client *golangsdk.ServiceClient, opts ListSharedReposOpts) ([]AccessDomain, error)

type CreateOpts

type CreateOpts struct {
	// Organization name
	Namespace string `json:"-" required:"true"`
	// Image repository name
	Repository string `json:"-" required:"true"`
	// Name of the account used for image sharing.
	AccessDomain string `json:"access_domain"`
	// Currently, only the read permission is supported.
	Permit string `json:"permit"`
	// Valid until (UTC). If the sharing is permanent, the value is forever. Otherwise, the sharing is valid until 00:00:00 of the next day.
	Deadline string `json:"deadline"`
	// Description
	Description string `json:"description"`
}

type GetOpts added in v0.5.27

type GetOpts struct {
	// Organization name
	Namespace string `json:"-" required:"true"`
	// Image repository name
	Repository string `json:"-" required:"true"`
	// Name of the account used for image sharing.
	AccessDomain string `json:"access_domain"`
}

type ListOpts added in v0.5.27

type ListOpts struct {
	// Organization name
	Namespace string `json:"-" required:"true"`
	// Image repository name
	Repository string `json:"-" required:"true"`
}

type ListSharedReposOpts added in v0.5.27

type ListSharedReposOpts struct {
	// Image repository name.
	Name string `q:"name,omitempty"`
	// self: images shared by you.
	// thirdparty: images shared with you by others.
	Center string `q:"center,omitempty"`
	// Number of returned records. Ensure that the offset and limit parameters are used together.
	Limit int `q:"limit,omitempty"`
	// Start index. Ensure that the offset and limit parameters are used together.
	Offset int `q:"offset,omitempty"`
}

type UpdateOpts

type UpdateOpts struct {
	// Organization name
	Namespace string `json:"-" required:"true"`
	// Image repository name
	Repository string `json:"-" required:"true"`
	// Name of the account used for image sharing
	AccessDomain string `json:"-" required:"true"`
	// Currently, only the read permission is supported.
	Permit string `json:"permit"`
	// Valid until (UTC). If the sharing is permanent, the value is forever. Otherwise, the sharing is valid until 00:00:00 of the next day.
	Deadline string `json:"deadline"`
	// Description. This parameter is left blank by default.
	Description string `json:"description,omitempty"`
}

Jump to

Keyboard shortcuts

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