tags

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: 3 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionOpts

type ActionOpts struct {
	Tags   []ResourceTag `json:"tags" required:"true"`
	Action string        `json:"action" required:"true"`
}

ActionOpts is a struct contains the parameters of creating/deleting tags

func (ActionOpts) ToTagsActionMap

func (opts ActionOpts) ToTagsActionMap() (map[string]interface{}, error)

ToTagsActionMap build the action request in json format

type ActionOptsBuilder

type ActionOptsBuilder interface {
	ToTagsActionMap() (map[string]interface{}, error)
}

ActionOptsBuilder is an interface from which can build the request of creating/deleting tags

type ActionResult

type ActionResult struct {
	golangsdk.ErrResult
}

ActionResult is the action result which is the result of create or delete operations

func Create

func Create(client *golangsdk.ServiceClient, serviceType, id string, tags []ResourceTag) (r ActionResult)

Create is a method of creating tags by id

func Delete

func Delete(client *golangsdk.ServiceClient, serviceType, id string, tags []ResourceTag) (r ActionResult)

Delete is a method of deleting tags by id

type GetResult

type GetResult struct {
	golangsdk.Result
}

GetResult contains the body of getting detailed tags request

func Get

func Get(client *golangsdk.ServiceClient, serviceType, id string) (r GetResult)

Get is a method of getting the tags by id

func (GetResult) Extract

func (r GetResult) Extract() ([]ResourceTag, error)

Extract method will parse the result body into ResourceTag struct

type ListResult

type ListResult struct {
	golangsdk.Result
}

ListResult contains the body of getting all tags request

func List

func List(client *golangsdk.ServiceClient, serviceType string) (r ListResult)

List is a method of getting the tags of all service

func (ListResult) Extract

func (r ListResult) Extract() ([]ListedTag, error)

Extract method will parse the result body into ListedTag struct

type ListedTag added in v0.2.5

type ListedTag struct {
	Key    string   `json:"key"`
	Values []string `json:"values"`
}

type ResourceTag

type ResourceTag struct {
	Key   string `json:"key" required:"true"`
	Value string `json:"value"`
}

ResourceTag is in key-value format

Jump to

Keyboard shortcuts

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