Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionOpts ¶
type ActionOpts struct { Action string `json:"action" required:"ture"` Tags []ResourceTag `json:"tags" 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 ¶
ActionOptsBuilder is an interface from which can build the request of creating/deleting tags
type ActionResult ¶
ActionResult is the action result which is the result of create or delete operations
func Create ¶
func Create(client *golangsdk.ServiceClient, srvType, id string, tags []ResourceTag) (r ActionResult)
Create is a method of creating tags by id
func Delete ¶
func Delete(client *golangsdk.ServiceClient, srvType, id string, tags []ResourceTag) (r ActionResult)
Delete is a method of deleting tags by id
type DeleteResult ¶
func DeleteWithKey ¶
func DeleteWithKey(client *golangsdk.ServiceClient, srvType, id, key string) (r DeleteResult)
DeleteWithKey is a method of deleting tags by key
type GetResult ¶
GetResult contains the body of getting detailed tags request
func Get ¶
func Get(client *golangsdk.ServiceClient, srvType, id string) (r GetResult)
Get is a method of getting the tags by id
func (GetResult) Extract ¶
func (r GetResult) Extract() (ResourceTags, error)
Extract method will parse the result body into ResourceTags struct
type ListResult ¶
ListResult contains the body of getting all tags request
func List ¶
func List(client *golangsdk.ServiceClient, srvType string) (r ListResult)
List is a method of getting the tags of all service
func (ListResult) Extract ¶
func (r ListResult) Extract() (ResourceTags, error)
Extract method will parse the result body into ResourceTags struct
type ResourceTag ¶
type ResourceTag struct { Key string `json:"key" required:"ture"` Value string `json:"value,omitempty"` }
ResourceTag is in key-value format
type ResourceTags ¶
type ResourceTags struct {
Tags []ResourceTag `json:"tags"`
}
ResourceTags represents the tags response