predefinetags

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

Types

type CreateOrDeleteBuilder

type CreateOrDeleteBuilder interface {
	CreateOrDeleteMap() (map[string]interface{}, error)
}

type CreateOrDeleteOpts

type CreateOrDeleteOpts struct {
	Action string `json:"action"  required:"true"`
	Tags   []Tag  `json:"tags,omitempty"`
}

func (CreateOrDeleteOpts) CreateOrDeleteMap

func (opts CreateOrDeleteOpts) CreateOrDeleteMap() (map[string]interface{}, error)

type ErrorResult

type ErrorResult struct {
	gophercloud.ErrResult
}

func CreateOrDelete

func CreateOrDelete(client *gophercloud.ServiceClient, opts CreateOrDeleteBuilder) (r ErrorResult)

func Update

func Update(client *gophercloud.ServiceClient, opts UpdateBuilder) (r ErrorResult)

func (ErrorResult) Extract

func (r ErrorResult) Extract() (*Tag, error)

type ListBuilder

type ListBuilder interface {
	ToListQuery() (string, error)
}

type ListOpts

type ListOpts struct {
	Key         string `q:"key" `
	Value       string `q:"value"`
	Limit       int    `q:"limit"`
	Marker      string `q:"marker"`
	OrderField  int    `q:"order_field"`
	OrderMethod int    `q:"order_method"`
}

func (ListOpts) ToListQuery

func (opts ListOpts) ToListQuery() (string, error)

type ListPage

type ListPage struct {
	pagination.SinglePageBase
}

type Tag

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

type TagResp

type TagResp struct {
	Key         string `q:"key"`
	Value       string `q:"value"`
	Update_Time string `q:"update_time"`
}

func ExtractTags

func ExtractTags(r pagination.Page) ([]TagResp, error)

type UpdateBuilder

type UpdateBuilder interface {
	UpdateMap() (map[string]interface{}, error)
}

type UpdateOpts

type UpdateOpts struct {
	NewTag Tag `json:"new_tag,omitempty"`
	OldTag Tag `json:"old_tag,omitempty"`
}

func (UpdateOpts) UpdateMap

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

Jump to

Keyboard shortcuts

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