storage

package
v0.0.0-...-f19ae85 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2015 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ShowCommandDoc = `` /* 287-byte string literal not displayed */

Variables

This section is empty.

Functions

func NewSuperCommand

func NewSuperCommand() cmd.Command

NewSuperCommand creates the storage supercommand and registers the subcommands that it supports.

Types

type Command

type Command struct {
	cmd.SuperCommand
}

Command is the top-level command wrapping all storage functionality.

type ShowCommand

type ShowCommand struct {
	StorageCommandBase
	// contains filtered or unexported fields
}

ShowCommand attempts to release storage instance.

func (*ShowCommand) Info

func (c *ShowCommand) Info() *cmd.Info

Info implements Command.Info.

func (*ShowCommand) Init

func (c *ShowCommand) Init(args []string) (err error)

Init implements Command.Init.

func (*ShowCommand) Run

func (c *ShowCommand) Run(ctx *cmd.Context) (err error)

Run implements Command.Run.

func (*ShowCommand) SetFlags

func (c *ShowCommand) SetFlags(f *gnuflag.FlagSet)

SetFlags implements Command.SetFlags.

type StorageCommandBase

type StorageCommandBase struct {
	envcmd.EnvCommandBase
}

StorageCommandBase is a helper base structure that has a method to get the storage managing client.

func (*StorageCommandBase) NewStorageAPI

func (c *StorageCommandBase) NewStorageAPI() (*storage.Client, error)

NewStorageAPI returns a storage api for the root api endpoint that the environment command returns.

type StorageInfo

type StorageInfo struct {
	StorageTag    string   `yaml:"storage-tag" json:"storage-tag"`
	StorageName   string   `yaml:"storage-name" json:"storage-name"`
	OwnerTag      string   `yaml:"owner-tag" json:"owner-tag"`
	Location      string   `yaml:"location,omitempty" json:"location,omitempty"`
	AvailableSize uint64   `yaml:"available-size" json:"available-size"`
	TotalSize     uint64   `yaml:"total-size" json:"total-size"`
	Tags          []string `yaml:"tags,omitempty" json:"tags,omitempty"`
}

StorageInfo defines the serialization behaviour of the storage information.

type StorageShowAPI

type StorageShowAPI interface {
	Close() error
	Show(tags []names.StorageTag) ([]params.StorageInstance, error)
}

StorageAPI defines the API methods that the storage commands use.

Jump to

Keyboard shortcuts

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