tags

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestOpts = golangsdk.RequestOpts{
	MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"},
}

Functions

This section is empty.

Types

type CreateOpts

type CreateOpts struct {
	// tag key
	Key string `json:"key" required:"true"`
	// tag value
	Value string `json:"value" required:"true"`
}

Tag is a structure of key value pair.

func (CreateOpts) ToCreateMap

func (opts CreateOpts) ToCreateMap() (map[string]interface{}, error)

ToCreateMap assembles a request body based on the contents of a CreateOpts.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToCreateMap() (map[string]interface{}, error)
}

type CreateResult

type CreateResult struct {
	golangsdk.ErrResult
}

func Create

func Create(client *golangsdk.ServiceClient, id string, opts CreateOptsBuilder) (r CreateResult)

Create implements tag create request.

type DeleteOpts

type DeleteOpts struct {
	// tag key
	Key string `json:"key" required:"true"`
}

func (DeleteOpts) ToDeleteMap

func (opts DeleteOpts) ToDeleteMap() (map[string]interface{}, error)

ToDeleteMap assembles a request body based on the contents of a DeleteOpts.

type DeleteOptsBuilder

type DeleteOptsBuilder interface {
	ToDeleteMap() (map[string]interface{}, error)
}

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

func Delete(client *golangsdk.ServiceClient, id string, opts DeleteOptsBuilder) (r DeleteResult)

Delete implements tag delete request.

type GetResult

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

func Get

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

Get implements tag get request.

func (GetResult) Extract

func (r GetResult) Extract() (*RespTags, error)

type RespTags

type RespTags struct {
	// contains list of tags, i.e.key value pair
	Tags []Tag `json:"tags"`
}

type Tag

type Tag struct {
	// tag key
	Key string `json:"key"`
	// tag value
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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