do

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2015 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyOptions

type CopyOptions struct {
	ImageID       int
	SourceRegions []string
	// contains filtered or unexported fields
}

type DeleteOptions

type DeleteOptions struct {
	ImageIds []int
	// contains filtered or unexported fields
}

type DoCommand

type DoCommand struct {
	*DoImages
}

DoCommand implements the images various interfaces, such as Fetcher, Deleter, Modifier, etc..

func NewCommand

func NewCommand(args []string) (*DoCommand, []string, error)

NewCommand returns a new instance of DoCommand

func (*DoCommand) Copy

func (d *DoCommand) Copy(args []string) error

func (*DoCommand) Delete

func (d *DoCommand) Delete(args []string) error

func (*DoCommand) Help

func (d *DoCommand) Help(command string) string

Help prints the help message for the given command

func (*DoCommand) List

func (d *DoCommand) List(args []string) error

List implements the command.Lister interface

func (*DoCommand) Modify

func (d *DoCommand) Modify(args []string) error

Modify renames the given images

type DoConfig

type DoConfig struct {
	Token string `toml:"token" json:"token"`
}

type DoImages

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

DoImages is responsible of managing DigitalOcean images

func New

func New(conf *DoConfig) (*DoImages, error)

New returns a new instance of DoImages

func (*DoImages) CopyImages

func (d *DoImages) CopyImages(opts *CopyOptions) error

Copy transfers the images to other regions

func (*DoImages) DeleteImages

func (d *DoImages) DeleteImages(opts *DeleteOptions) error

Delete deletes the given images.

func (*DoImages) RenameImages

func (d *DoImages) RenameImages(opts *RenameOptions) error

RenameImages renames the images to the given new names

func (*DoImages) UserImages

func (d *DoImages) UserImages() (Images, error)

type Images

type Images []godo.Image

Images defines and represents a list of images

func (Images) Print

func (i Images) Print(mode utils.OutputMode) error

Print prints the stored images to standard output.

type RenameOptions

type RenameOptions struct {
	// ImageIds to be renamed
	ImageIds []int

	// Name the images will changed to
	Name string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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