command

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2015 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDBInstancetNotFound is the "DB Instance is not found" error
	ErrDBInstancetNotFound = errors.New("DB Instance is not found")
	// ErrSnapshotNotFound is the "DB Snapshot is not found" error
	ErrSnapshotNotFound = errors.New("DB Snapshot is not found")
	// ErrDriverNotFound is the "DB Driver is not found" error
	ErrDriverNotFound = errors.New("DB Driver is not found")
	// ErrRdsTypesNotFound is the "RDS Types is not found" error
	ErrRdsTypesNotFound = errors.New("RDS Types is not found")
	// ErrRdsARNsNotFound is the "RDS ARN Types is not found" error
	ErrRdsARNsNotFound = errors.New("RDS ARN Types is not found")
)
View Source
var ErrDBInstancetTimeOut = errors.New("DB Instance is time out")

ErrDBInstancetTimeOut is the "DB Instance is time out" error

View Source
var ErrInterruptedAskDelete = errors.New("OS Interrupted Ask Delete")

ErrInterruptedAskDelete is the "OS Interrupted Ask Delete" error

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
}

CmdInterface interface is the Help and Run and Synopsis function

type Command

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

Command struct is the OutConfig and RDSConfig and RDSClient and ARNPrefix variable

func (*Command) CheckPendingStatus

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

CheckPendingStatus is check pending status aws rds db instance setting "Pending Status" If the return value is ture

func (*Command) CreateDBSnapshot

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

CreateDBSnapshot is create aws rds db snap shot

func (*Command) DeleteDBInstance

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

DeleteDBInstance is delete aws rds db instance delete DB instance and skip create snapshot

func (*Command) DeleteDBResources

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

DeleteDBResources is aws rds db instance or snap shot

func (*Command) DeleteDBSnapshot

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

DeleteDBSnapshot is delete aws rds db snap shot

func (*Command) DescribeDBInstance

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

DescribeDBInstance is show the aws rds db instance infomations all status in target, result return only one

func (*Command) DescribeDBInstancesByTags

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

DescribeDBInstancesByTags is aws rds db instances list up by tags

func (*Command) DescribeDBSnapshot

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

DescribeDBSnapshot is show aws rds db snap shot all status in target, result return only one

func (*Command) DescribeDBSnapshotsByTags

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

DescribeDBSnapshotsByTags is show aws rds snap shot by tags

func (*Command) DescribeLatestDBSnapshot

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

DescribeLatestDBSnapshot is show latest aws rds db snap shot the target only "available"

func (*Command) ExecuteSQL

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

ExecuteSQL is execute SQL to aws rds

func (*Command) ModifyDBInstance

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

ModifyDBInstance is modify aws rds db instance setting

func (*Command) RebootDBInstance

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

RebootDBInstance is reboot aws rds db instance

func (*Command) RestoreDBInstanceFromDBSnapshot

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

RestoreDBInstanceFromDBSnapshot is restore aws rds db instance from db snap shot

func (*Command) WaitForStatusAvailable

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

WaitForStatusAvailable is the 30 seconds intervals checked aws rds state wait for status available

type EsCommand

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

EsCommand struct is the *Command and OptQuery and OptType and OptSnap variable

func (*EsCommand) Help

func (c *EsCommand) Help() string

Help is the show help text

func (*EsCommand) Run

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

Run is the start command

func (*EsCommand) Synopsis

func (c *EsCommand) Synopsis() string

Synopsis is the show short help text

type ExecuteSQLArgs

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

ExecuteSQLArgs struct is Engine and Endpoint and Queries variable

type LsCommand

type LsCommand struct {
	*Command
	OptSnap bool
}

LsCommand struct is the *Command and OptSnap variable

func (*LsCommand) Help

func (c *LsCommand) Help() string

Help is the show help text

func (*LsCommand) Run

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

Run is the start command

func (*LsCommand) Synopsis

func (c *LsCommand) Synopsis() string

Synopsis is the show short help text

type RestoreDBInstanceFromDBSnapshotArgs

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

RestoreDBInstanceFromDBSnapshotArgs struct is the DBInstanceClass and DBIdentifier and MultiAZ and Snapshot and Instance variable

type RmCommand

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

RmCommand struct is the *Command and OptSnap and OptForce and OptItem variable

func (*RmCommand) Help

func (c *RmCommand) Help() string

Help is the show help text

func (*RmCommand) Run

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

Run is the start command

func (*RmCommand) Synopsis

func (c *RmCommand) Synopsis() string

Synopsis is the show short help text

Jump to

Keyboard shortcuts

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