tags

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2019 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListInstanceTagsURL

func ListInstanceTagsURL(c *gophercloud.ServiceClient, resourceType string) string

func ListResourceTagsURL

func ListResourceTagsURL(c *gophercloud.ServiceClient, resourceType string, resourceId string) string

func ListTenantTagsURL

func ListTenantTagsURL(c *gophercloud.ServiceClient, resourceType string) string

func UpdateURL

func UpdateURL(c *gophercloud.ServiceClient, resourceType string, resourceId string) string

Types

type InstanceOpts

type InstanceOpts struct {
	// Operation ID (case sensitive).update: indicates updating a tag.
	// If the same key value exists, it will be overwritten. If no same key value exists, a
	// new tag will be created.delete: indicates deleting a tag.create: indicates creating a
	// tag. If the same key value already exists, it will be overwritten.
	Action     string `json:"action" required:"true"`
	Offset     string `json:"offset,omitempty"`
	Limit      string `json:"limit,omitempty"`
	Matches    []Tag  `json:"matches,omitempty"`
	NotTags    []Tags `json:"not_tags,omitempty"`
	Tags       []Tags `json:"tags,omitempty"`
	NotTagsAny []Tags `json:"not_tags_any,omitempty"`
	TagsAny    []Tags `json:"tags_any,omitempty"`
}

func (InstanceOpts) ToInstanceMap

func (opts InstanceOpts) ToInstanceMap() (map[string]interface{}, error)

type InstanceOptsBuilder

type InstanceOptsBuilder interface {
	ToInstanceMap() (map[string]interface{}, error)
}

type ListInstanceTagsResponse

type ListInstanceTagsResponse struct {
	Resources  []Resource `json:"resources"`
	Marker     string     `json:"marker"`
	TotalCount int        `json:"total_count"`
}

type ListInstanceTagsResult

type ListInstanceTagsResult struct {
	// contains filtered or unexported fields
}

func ListInstanceTags

func ListInstanceTags(client *gophercloud.ServiceClient, resourceType string, opts InstanceOptsBuilder) (r ListInstanceTagsResult)

func (ListInstanceTagsResult) Extract

type ListResourceTagsResponse

type ListResourceTagsResponse struct {
	// Specifies the resource tag.
	Tags    []Tag `json:"tags"`
	SysTags []Tag `json:"sys_tags"`
}

type ListResourceTagsResult

type ListResourceTagsResult struct {
	// contains filtered or unexported fields
}

func ListResourceTags

func ListResourceTags(client *gophercloud.ServiceClient, resourceType string, resourceId string) (r ListResourceTagsResult)

func (ListResourceTagsResult) Extract

type ListTenantTagsResponse

type ListTenantTagsResponse struct {
	// Specifies the resource tag.
	Tags []Tags `json:"tags"`
}

type ListTenantTagsResult

type ListTenantTagsResult struct {
	// contains filtered or unexported fields
}

func ListTenantTags

func ListTenantTags(client *gophercloud.ServiceClient, resourceType string) (r ListTenantTagsResult)

func (ListTenantTagsResult) Extract

type Resource

type Resource struct {
	ResourceID     string `json:"resource_id"`
	ResourceDetail string `json:"resource_detail"`
	Tags           []Tag  `json:"tags"`
	ResourceName   string `json:"resource_name"`
}

type Tag

type Tag struct {
	// Specifies the resource tag key.
	Key string `json:"key" required:"true"`

	// Specifies the resource tag values.
	Value string `json:"value,omitempty"`
}

type Tags

type Tags struct {
	// Specifies the resource tag key.
	Key string `json:"key"`

	// Specifies the resource tag values.
	Values []string `json:"values"`
}

type UpdateOpts

type UpdateOpts struct {
	// Specifies the tag list.If action is set to delete, the tag
	// structure cannot be missing, and the key cannot be left blank or an empty string.
	Tags []Tag `json:"tags" required:"true"`

	// Operation ID (case sensitive).update: indicates updating a tag.
	// If the same key value exists, it will be overwritten. If no same key value exists, a
	// new tag will be created.delete: indicates deleting a tag.create: indicates creating a
	// tag. If the same key value already exists, it will be overwritten.
	Action string `json:"action" required:"true"`
}

func (UpdateOpts) ToTagsUpdateMap

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

type UpdateOptsBuilder

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

type UpdateResult

type UpdateResult struct {
	gophercloud.ErrResult
}

func Update

func Update(client *gophercloud.ServiceClient, resourceType string, resourceId string, opts UpdateOptsBuilder) (r UpdateResult)

Jump to

Keyboard shortcuts

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