command

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2015 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDBInstancetNotFound = errors.New("DB Instance is not found")
	ErrSnapshotNotFound    = errors.New("DB Snapshot is not found")
	ErrDriverNotFound      = errors.New("DB Driver is not found")
	ErrRdsTypesNotFound    = errors.New("RDS Types is not found")
	ErrRdsARNsNotFound     = errors.New("RDS ARN Types is not found")
)
View Source
var ErrDBInstancetTimeOut = errors.New("DB Instance is time out")
View Source
var ErrInterruptedAskDelete = errors.New("OS Interrupted Ask Delete")

Functions

This section is empty.

Types

type CmdInterface

type CmdInterface interface {
	// return long help string
	Help() string

	// run command with arguments
	Run(args []string) int

	// return short help string
	Synopsis() string
}

type Command

type Command struct {
	OutConfig config.OutConfig
	RDSConfig config.RDSConfig
	RDSClient *rds.RDS
	ARNPrefix string
}

func (*Command) CheckPendingStatus

func (c *Command) CheckPendingStatus(dbInstance *rds.DBInstance) bool

"Pending Status" If the return value is ture

func (*Command) CreateDBSnapshot

func (c *Command) CreateDBSnapshot(dbIdentifier string) (*rds.DBSnapshot, error)

func (*Command) DeleteDBInstance

func (c *Command) DeleteDBInstance(dbIdentifier string) (*rds.DBInstance, error)

delete DB instance and skip create snapshot

func (*Command) DeleteDBResources

func (c *Command) DeleteDBResources(rdstypes interface{}) error

func (*Command) DeleteDBSnapshot

func (c *Command) DeleteDBSnapshot(snapshotIdentifier string) (*rds.DBSnapshot, error)

func (*Command) DescribeDBInstance

func (c *Command) DescribeDBInstance(dbIdentifier string) (*rds.DBInstance, error)

all status in target, result return only one

func (*Command) DescribeDBInstancesByTags

func (c *Command) DescribeDBInstancesByTags() ([]*rds.DBInstance, error)

func (*Command) DescribeDBSnapshot

func (c *Command) DescribeDBSnapshot(snapshotIdentifier string) (*rds.DBSnapshot, error)

all status in target, result return only one

func (*Command) DescribeDBSnapshotsByTags

func (c *Command) DescribeDBSnapshotsByTags() ([]*rds.DBSnapshot, error)

func (*Command) DescribeLatestDBSnapshot

func (c *Command) DescribeLatestDBSnapshot(dbIdentifier string) (*rds.DBSnapshot, error)

the target only "available"

func (*Command) ExecuteSQL

func (c *Command) ExecuteSQL(args *ExecuteSQLArgs) ([]time.Duration, error)

func (*Command) ModifyDBInstance

func (c *Command) ModifyDBInstance(dbIdentifier string, dbInstance *rds.DBInstance) (*rds.DBInstance, error)

func (*Command) RebootDBInstance

func (c *Command) RebootDBInstance(dbIdentifier string) (*rds.DBInstance, error)

func (*Command) RestoreDBInstanceFromDBSnapshot

func (c *Command) RestoreDBInstanceFromDBSnapshot(args *RestoreDBInstanceFromDBSnapshotArgs) (*rds.DBInstance, error)

func (*Command) WaitForStatusAvailable

func (c *Command) WaitForStatusAvailable(rdstypes interface{}) <-chan bool

wait for status available

type EsCommand

type EsCommand struct {
	*Command
	OptQuery string
	OptType  string
	OptSnap  bool
}

func (*EsCommand) Help

func (c *EsCommand) Help() string

func (*EsCommand) Run

func (c *EsCommand) Run(args []string) int

func (*EsCommand) Synopsis

func (c *EsCommand) Synopsis() string

type ExecuteSQLArgs

type ExecuteSQLArgs struct {
	Engine   string // rds engine name
	Endpoint *rds.Endpoint
	Queries  []query.Query
}

type LsCommand

type LsCommand struct {
	*Command
	OptSnap bool
}

func (*LsCommand) Help

func (c *LsCommand) Help() string

func (*LsCommand) Run

func (c *LsCommand) Run(args []string) int

func (*LsCommand) Synopsis

func (c *LsCommand) Synopsis() string

type RestoreDBInstanceFromDBSnapshotArgs

type RestoreDBInstanceFromDBSnapshotArgs struct {
	DBInstanceClass string
	DBIdentifier    string
	MultiAZ         bool
	Snapshot        *rds.DBSnapshot
	Instance        *rds.DBInstance
}

type RmCommand

type RmCommand struct {
	*Command
	OptSnap  bool
	OptForce bool
	OptItem  string
}

func (*RmCommand) Help

func (c *RmCommand) Help() string

func (*RmCommand) Run

func (c *RmCommand) Run(args []string) int

func (*RmCommand) Synopsis

func (c *RmCommand) Synopsis() string

Jump to

Keyboard shortcuts

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