v3

package
v0.0.0-...-b5648fb Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	VolumeBody RequestBody `json:"volume"`
}

type DetailResponse

type DetailResponse struct {
	ID              string               `json:"id"`
	Attachments     []map[string]string  `json:"attachments"`
	Links           []map[string]string  `json:"links"`
	Metadata        map[string]string    `json:"metadata"`
	Protected       bool                 `json:"protected"`
	Status          string               `json:"status"`
	MigrationStatus string               `json:"migration_status"`
	UserID          string               `json:"user_id"`
	Encrypted       bool                 `json:"encrypted"`
	Multiattach     bool                 `json:"multiattach"`
	CreatedAt       util.RFC8601DateTime `json:"created_at"`
	Description     string               `json:"description"`
	Volume_type     string               `json:"volume_type"`
	Name            string               `json:"name"`
	Source_volid    string               `json:"source_volid"`
	Snapshot_id     string               `json:"snapshot_id"`
	Size            int64                `json:"size"`

	Aavailability_zone  string `json:"availability_zone"`
	Rreplication_status string `json:"replication_status"`
	Consistencygroup_id string `json:"consistencygroup_id"`
}

DetailResponse is a structure for all properties of an volume for a detailed query

type DetailVolumeResponse

type DetailVolumeResponse struct {
	DetailVolume DetailResponse `json:"volume"`
}

type DetailVolumesResponse

type DetailVolumesResponse struct {
	DetailVolumes []DetailResponse `json:"volumes"`
}

type RequestBody

type RequestBody struct {
	// The volume name [OPTIONAL]
	Name string `json:"name"`
	// The size of the volume, in gibibytes (GiB) [REQUIRED]
	Size int `json:"size"`
}

type Response

type Response struct {
	ID   string `json:"id"`
	Name string `json:"name"`

	Consistencygroup_id string `json:"consistencygroup_id"`
}

Response is a structure for all properties of an volume for a non detailed query

type Service

type Service struct {
	Session openstack.Session
	Client  http.Client
	URL     string
}

func (Service) Create

func (volumeService Service) Create(reqBody *Body) (Response, error)

func (Service) Delete

func (volumeService Service) Delete(id string) error

func (Service) List

func (volumeService Service) List() ([]Response, error)

func (Service) Show

func (volumeService Service) Show(id string) (Response, error)

func (Service) Update

func (volumeService Service) Update(id string, reqBody *Body) (Response, error)

type VolumeResponse

type VolumeResponse struct {
	Volume Response `json:"volume"`
}

type VolumesResponse

type VolumesResponse struct {
	Volumes []Response `json:"volumes"`
}

Jump to

Keyboard shortcuts

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