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 ¶
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 (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 ResourceTag ¶
type ResourceTag struct { Key string `json:"key" required:"true"` Value string `json:"value" required:"true"` }
ResourceTag is in key-value format