Documentation ¶
Index ¶
- Constants
- func CreateDBClusterInput(c *types.DBCluster) *rds.CreateDBClusterInput
- func CreateDbInstanceInput(i *types.DBInstance, ci *string) *rds.CreateDBInstanceInput
- func DecodeAvailabilityZones(b bytes.Buffer) []types.AvailabilityZone
- func DecodeClusterCreateDBInstanceInput(b bytes.Buffer) []rds.CreateDBInstanceInput
- func DecodeCreateDBClusterInput(b bytes.Buffer) *rds.CreateDBClusterInput
- func DecodeCreateDBInstanceInput(b bytes.Buffer) *rds.CreateDBInstanceInput
- func DecodeInternetGateways(b bytes.Buffer) []types.InternetGateway
- func DecodeKmsOutput(b bytes.Buffer) types.KeyMetadata
- func DecodeOptionGroup(b bytes.Buffer) types.OptionGroup
- func DecodeRDSClusterOutput(b bytes.Buffer) types.DBCluster
- func DecodeRDSClusterSnapshotOutput(b bytes.Buffer) types.DBClusterSnapshot
- func DecodeRDSDatabaseOutput(b bytes.Buffer) types.DBInstance
- func DecodeRDSSnapshotOutput(b bytes.Buffer) types.DBSnapshot
- func DecodeRestoreDBClusterFromSnapshotInput(b bytes.Buffer) *rds.RestoreDBClusterFromSnapshotInput
- func DecodeRestoreDBInstanceFromDBSnapshotInput(b bytes.Buffer) *rds.RestoreDBInstanceFromDBSnapshotInput
- func DecodeRouteTables(b bytes.Buffer) []types.RouteTable
- func DecodeSecurityGroup(b bytes.Buffer) ec2types.SecurityGroup
- func DecodeSubnets(b bytes.Buffer) []types.Subnet
- func DecodeVpc(b bytes.Buffer) types.Vpc
- func EncodeAvailabilityZones(azs []types.AvailabilityZone) bytes.Buffer
- func EncodeClusterCreateDBInstanceInput(c []rds.CreateDBInstanceInput) bytes.Buffer
- func EncodeCreateDBClusterInput(c *rds.CreateDBClusterInput) bytes.Buffer
- func EncodeCreateDBInstanceInput(c *rds.CreateDBInstanceInput) bytes.Buffer
- func EncodeInternetGateways(igws []types.InternetGateway) bytes.Buffer
- func EncodeKmsOutput(kmd *types.KeyMetadata) bytes.Buffer
- func EncodeOptionGroup(og *types.OptionGroup) bytes.Buffer
- func EncodeRDSClusterOutput(db *types.DBCluster) bytes.Buffer
- func EncodeRDSClusterSnapshotOutput(snapshot *types.DBClusterSnapshot) bytes.Buffer
- func EncodeRDSDatabaseOutput(db *types.DBInstance) bytes.Buffer
- func EncodeRDSSnapshotOutput(snapshot *types.DBSnapshot) bytes.Buffer
- func EncodeRestoreDBClusterFromSnapshotInput(r *rds.RestoreDBClusterFromSnapshotInput) bytes.Buffer
- func EncodeRestoreDBInstanceFromDBSnapshotInput(r *rds.RestoreDBInstanceFromDBSnapshotInput) bytes.Buffer
- func EncodeRouteTables(rts []types.RouteTable) bytes.Buffer
- func EncodeSGRulesStorage(sg []SGRuleStorage) bytes.Buffer
- func EncodeSecurityGroup(s ec2types.SecurityGroup) bytes.Buffer
- func EncodeSecurityGroups(sg SecurityGroupOutput) bytes.Buffer
- func EncodeSubnets(subnets []types.Subnet) bytes.Buffer
- func EncodeVpc(vpc types.Vpc) bytes.Buffer
- func GenerateRestoreDBClusterFromSnapshotInput(r RDSRestorationStore) *rds.RestoreDBClusterFromSnapshotInput
- func GenerateRestoreDBInstanceFromDBClusterSnapshotInput(r RDSRestorationStore) *rds.RestoreDBInstanceFromDBSnapshotInput
- func GenerateRestoreDBInstanceFromDBSnapshotInput(r RDSRestorationStore) *rds.RestoreDBInstanceFromDBSnapshotInput
- func GetKmsOutput(s *StateManager, KeyID string) (*types.KeyMetadata, error)
- func GetRDSClusterSnapshotOutput(s StateManager, snap string) (*types.DBClusterSnapshot, error)
- func GetRDSDatabaseClusterOutput(s StateManager, dbName string) (*types.DBCluster, error)
- func GetRDSDatabaseInstanceOutput(s StateManager, dbName string) (*types.DBInstance, error)
- func GetRDSSnapshotOutput(s StateManager, snap string) (*types.DBSnapshot, error)
- func InitState(filename string) error
- func SgRuleStorageToIpPermission(sg SGRuleStorage) types.IpPermission
- func SgRuleStoragesToIpPermissions(s []SGRuleStorage) []types.IpPermission
- func WriteOutput(filename string, b bytes.Buffer) (int64, error)
- type RDSRestorationStore
- func (r RDSRestorationStore) GetAllocatedStorage() *int32
- func (r RDSRestorationStore) GetAutoMinorVersionUpgrade() *bool
- func (r RDSRestorationStore) GetBackupTarget() *string
- func (r RDSRestorationStore) GetClusterAZs() *[]string
- func (r RDSRestorationStore) GetClusterEngine() *string
- func (r RDSRestorationStore) GetClusterParameterGroups() *string
- func (r RDSRestorationStore) GetClusterSnapshotIdentifier() *string
- func (r RDSRestorationStore) GetDBClusterIdentifier() *string
- func (r RDSRestorationStore) GetDBClusterInstanceClass() *string
- func (r RDSRestorationStore) GetDBClusterMembers() *[]types.DBClusterMember
- func (r RDSRestorationStore) GetDeleteProtection() *bool
- func (r RDSRestorationStore) GetEnabledCloudwatchLogsExports() []string
- func (r RDSRestorationStore) GetInstanceClass() *string
- func (r RDSRestorationStore) GetInstanceIdentifier() *string
- func (r RDSRestorationStore) GetKmsKey() *string
- func (r RDSRestorationStore) GetParameterGroups() []types.DBParameterGroupStatus
- func (r RDSRestorationStore) GetSnapshotIdentifier() *string
- type SGRuleStorage
- type SecurityGroupOutput
- type StateKV
- type StateManager
Constants ¶
const ClusterSnapshotType = "RDSClusterSnapshot"
const KMSKeyType = "KMSKey"
const RdsClusterType = "RDSCluster"
const RdsInstanceType = "RDSInstance"
const SecurityGroupType = "SecurityGroup"
const SnapshotType = "RDSSnapshot"
Variables ¶
This section is empty.
Functions ¶
func CreateDBClusterInput ¶
func CreateDBClusterInput(c *types.DBCluster) *rds.CreateDBClusterInput
func CreateDbInstanceInput ¶
func CreateDbInstanceInput(i *types.DBInstance, ci *string) *rds.CreateDBInstanceInput
CreateInstanceInput creates an instance to prep for creating our Cluster
func DecodeAvailabilityZones ¶
func DecodeAvailabilityZones(b bytes.Buffer) []types.AvailabilityZone
func DecodeClusterCreateDBInstanceInput ¶
func DecodeClusterCreateDBInstanceInput(b bytes.Buffer) []rds.CreateDBInstanceInput
func DecodeCreateDBClusterInput ¶
func DecodeCreateDBClusterInput(b bytes.Buffer) *rds.CreateDBClusterInput
func DecodeCreateDBInstanceInput ¶
func DecodeCreateDBInstanceInput(b bytes.Buffer) *rds.CreateDBInstanceInput
DecodeCreateDBInstanceInput creates the instance from our bytes buffer when we want to replay
func DecodeInternetGateways ¶
func DecodeInternetGateways(b bytes.Buffer) []types.InternetGateway
func DecodeKmsOutput ¶
func DecodeKmsOutput(b bytes.Buffer) types.KeyMetadata
DecodeKmsOutput takes bytes and turns them into KeyMetadata
func DecodeOptionGroup ¶
func DecodeOptionGroup(b bytes.Buffer) types.OptionGroup
DecodeOptionGroup takes a bytes buffer and returns it to a option group
func DecodeRDSClusterOutput ¶
DecodeRDSClusterOutput takes a bytes buffer and returns it to a DbCluster type in preperation of restoring the database
func DecodeRDSClusterSnapshotOutput ¶
func DecodeRDSClusterSnapshotOutput(b bytes.Buffer) types.DBClusterSnapshot
func DecodeRDSDatabaseOutput ¶
func DecodeRDSDatabaseOutput(b bytes.Buffer) types.DBInstance
DecodeRDSDatabaseOutput takes a bytes buffer and returns it to a DbInstance type in preperation of restoring the database
func DecodeRDSSnapshotOutput ¶
func DecodeRDSSnapshotOutput(b bytes.Buffer) types.DBSnapshot
DecodeRDSSnapshhotOutput takes a bytes buffer and returns it to a DbSnapshot type in preperation of restoring the database
func DecodeRestoreDBClusterFromSnapshotInput ¶
func DecodeRestoreDBClusterFromSnapshotInput(b bytes.Buffer) *rds.RestoreDBClusterFromSnapshotInput
DecodeRestoreDBClusterFromSnapshotInput takes bytes and retruns a db cluster from snapshot input which is needed for restoring a db cluster
func DecodeRestoreDBInstanceFromDBSnapshotInput ¶
func DecodeRestoreDBInstanceFromDBSnapshotInput(b bytes.Buffer) *rds.RestoreDBInstanceFromDBSnapshotInput
DecodeRestoreDBInstanceFromDBSnapshotInput decodes snapshot from bytes
func DecodeRouteTables ¶
func DecodeRouteTables(b bytes.Buffer) []types.RouteTable
func DecodeSecurityGroup ¶
func DecodeSecurityGroup(b bytes.Buffer) ec2types.SecurityGroup
DecodeSecurityGroup takes a bytes buffer and returns it to a option group
func EncodeAvailabilityZones ¶
func EncodeAvailabilityZones(azs []types.AvailabilityZone) bytes.Buffer
func EncodeClusterCreateDBInstanceInput ¶
func EncodeClusterCreateDBInstanceInput(c []rds.CreateDBInstanceInput) bytes.Buffer
func EncodeCreateDBClusterInput ¶
func EncodeCreateDBClusterInput(c *rds.CreateDBClusterInput) bytes.Buffer
func EncodeCreateDBInstanceInput ¶
func EncodeCreateDBInstanceInput(c *rds.CreateDBInstanceInput) bytes.Buffer
EncodeCreateDBInstanceInput bytes buffer for create
func EncodeInternetGateways ¶
func EncodeInternetGateways(igws []types.InternetGateway) bytes.Buffer
func EncodeKmsOutput ¶
func EncodeKmsOutput(kmd *types.KeyMetadata) bytes.Buffer
EncodeKmsOutput encodes the output of KMS into a bytes.Buffer for writing
func EncodeOptionGroup ¶
func EncodeOptionGroup(og *types.OptionGroup) bytes.Buffer
EncodeOptionGroup convers an option group struct to bytes
func EncodeRDSClusterOutput ¶
EncodeRDSClusterOutput takes a cluster snapshot and creates bytes
func EncodeRDSClusterSnapshotOutput ¶
func EncodeRDSClusterSnapshotOutput(snapshot *types.DBClusterSnapshot) bytes.Buffer
EncodeRDSClusterSnapshotOutput cluster output as bytes
func EncodeRDSDatabaseOutput ¶
func EncodeRDSDatabaseOutput(db *types.DBInstance) bytes.Buffer
EncodeRDSDatabaseOutput converts a dbInstace to an array of bytes in preperation for wrtiing it to disk
func EncodeRDSSnapshotOutput ¶
func EncodeRDSSnapshotOutput(snapshot *types.DBSnapshot) bytes.Buffer
EncodeRDSSnapshotOutput converts a DbSnapshot struct to an array of bytes in preperation for wrtiing it to disk
func EncodeRestoreDBClusterFromSnapshotInput ¶
func EncodeRestoreDBClusterFromSnapshotInput(r *rds.RestoreDBClusterFromSnapshotInput) bytes.Buffer
EncodeRestoreDBClusterFromSnapshotInput takes a cluster snapshot and turns it into bytes
func EncodeRestoreDBInstanceFromDBSnapshotInput ¶
func EncodeRestoreDBInstanceFromDBSnapshotInput(r *rds.RestoreDBInstanceFromDBSnapshotInput) bytes.Buffer
EncodeRestoreDBInstanceFromDBSnapshotInput encode snapshot as bytes
func EncodeRouteTables ¶
func EncodeRouteTables(rts []types.RouteTable) bytes.Buffer
func EncodeSGRulesStorage ¶
func EncodeSGRulesStorage(sg []SGRuleStorage) bytes.Buffer
func EncodeSecurityGroup ¶
func EncodeSecurityGroup(s ec2types.SecurityGroup) bytes.Buffer
EncodeSecurityGroup converts a security group struct to bytes
func EncodeSecurityGroups ¶
func EncodeSecurityGroups(sg SecurityGroupOutput) bytes.Buffer
EncodeSecurityGroups encodes a security group to bytes
func GenerateRestoreDBClusterFromSnapshotInput ¶
func GenerateRestoreDBClusterFromSnapshotInput(r RDSRestorationStore) *rds.RestoreDBClusterFromSnapshotInput
GenerateRestoreDBClusterFromSnapshotInput create a snapshot input
func GenerateRestoreDBInstanceFromDBClusterSnapshotInput ¶
func GenerateRestoreDBInstanceFromDBClusterSnapshotInput(r RDSRestorationStore) *rds.RestoreDBInstanceFromDBSnapshotInput
GenerateRestoreDBInstanceFromDBClusterSnapshotInput create a db cluster input
func GenerateRestoreDBInstanceFromDBSnapshotInput ¶
func GenerateRestoreDBInstanceFromDBSnapshotInput(r RDSRestorationStore) *rds.RestoreDBInstanceFromDBSnapshotInput
GenerateRestoreDBInstanceFromDBSnapshotInput create a db instance input
func GetKmsOutput ¶
func GetKmsOutput(s *StateManager, KeyID string) (*types.KeyMetadata, error)
GetKmsOutput takes a keyid and get's the key we can probably delete this one
func GetRDSClusterSnapshotOutput ¶
func GetRDSClusterSnapshotOutput(s StateManager, snap string) (*types.DBClusterSnapshot, error)
func GetRDSDatabaseClusterOutput ¶
func GetRDSDatabaseClusterOutput(s StateManager, dbName string) (*types.DBCluster, error)
func GetRDSDatabaseInstanceOutput ¶
func GetRDSDatabaseInstanceOutput(s StateManager, dbName string) (*types.DBInstance, error)
func GetRDSSnapshotOutput ¶
func GetRDSSnapshotOutput(s StateManager, snap string) (*types.DBSnapshot, error)
GetRDSSnapshotOutput reads a snapshot
func SgRuleStorageToIpPermission ¶
func SgRuleStorageToIpPermission(sg SGRuleStorage) types.IpPermission
func SgRuleStoragesToIpPermissions ¶
func SgRuleStoragesToIpPermissions(s []SGRuleStorage) []types.IpPermission
Types ¶
type RDSRestorationStore ¶
type RDSRestorationStore struct { Snapshot *types.DBSnapshot Instance *types.DBInstance Cluster *types.DBCluster ClusterSnapshot *types.DBClusterSnapshot }
RDSRestorationStore stores all of our things we could possibly need to restore a db or cluster
func RDSRestorationStoreBuilder ¶
func RDSRestorationStoreBuilder(sm StateManager, snapshotName string) (*RDSRestorationStore, error)
RDSRestorationStoreBuilder builds an RDSRestorationStore
func (RDSRestorationStore) GetAllocatedStorage ¶
func (r RDSRestorationStore) GetAllocatedStorage() *int32
GetAllocatedStorage getter for allocated storage
func (RDSRestorationStore) GetAutoMinorVersionUpgrade ¶
func (r RDSRestorationStore) GetAutoMinorVersionUpgrade() *bool
GetAutoMinorVersionUpgrade yet another getter
func (RDSRestorationStore) GetBackupTarget ¶
func (r RDSRestorationStore) GetBackupTarget() *string
GetBackupTarget yet another getter
func (RDSRestorationStore) GetClusterAZs ¶
func (r RDSRestorationStore) GetClusterAZs() *[]string
GetClusterAZs yet another getter
func (RDSRestorationStore) GetClusterEngine ¶
func (r RDSRestorationStore) GetClusterEngine() *string
GetClusterEngine yet another getter
func (RDSRestorationStore) GetClusterParameterGroups ¶
func (r RDSRestorationStore) GetClusterParameterGroups() *string
GetClusterParameterGroups gets the parameter groups for a cluster
func (RDSRestorationStore) GetClusterSnapshotIdentifier ¶
func (r RDSRestorationStore) GetClusterSnapshotIdentifier() *string
GetClusterSnapshotIdentifier yet another getter
func (RDSRestorationStore) GetDBClusterIdentifier ¶
func (r RDSRestorationStore) GetDBClusterIdentifier() *string
GetDBClusterIdentifier yet another getter
func (RDSRestorationStore) GetDBClusterInstanceClass ¶
func (r RDSRestorationStore) GetDBClusterInstanceClass() *string
GetDBClusterInstanceClass yet another getter
func (RDSRestorationStore) GetDBClusterMembers ¶
func (r RDSRestorationStore) GetDBClusterMembers() *[]types.DBClusterMember
GetDBClusterMembers yet another getter
func (RDSRestorationStore) GetDeleteProtection ¶
func (r RDSRestorationStore) GetDeleteProtection() *bool
GetDeleteProtection yet another getter
func (RDSRestorationStore) GetEnabledCloudwatchLogsExports ¶
func (r RDSRestorationStore) GetEnabledCloudwatchLogsExports() []string
GetEnabledCloudwatchLogsExports yet another getter
func (RDSRestorationStore) GetInstanceClass ¶
func (r RDSRestorationStore) GetInstanceClass() *string
GetInstanceClass getter for instance class
func (RDSRestorationStore) GetInstanceIdentifier ¶
func (r RDSRestorationStore) GetInstanceIdentifier() *string
GetInstanceIdentifier get's the instance identifier from the restoration store
func (RDSRestorationStore) GetKmsKey ¶
func (r RDSRestorationStore) GetKmsKey() *string
GetKmsKey yet another getter
func (RDSRestorationStore) GetParameterGroups ¶
func (r RDSRestorationStore) GetParameterGroups() []types.DBParameterGroupStatus
GetParameterGroups gets the parameter groups for an instance
func (RDSRestorationStore) GetSnapshotIdentifier ¶
func (r RDSRestorationStore) GetSnapshotIdentifier() *string
GetSnapshotIdentifier yet another getter
type SGRuleStorage ¶
type SGRuleStorage struct { GroupID *string GroupName *string FromPort *int32 ToPort *int32 IPProtocol *string PrefixIdsList []string IPRanges []types.IpRange }
func DecodeSGRulesStorage ¶
func DecodeSGRulesStorage(b bytes.Buffer) []SGRuleStorage
func SecurityGroupNeeds ¶
func SecurityGroupNeeds(sg SecurityGroupOutput) []SGRuleStorage
SecurityGroupNeeds is a function that takes a security group and get's the parts we need out more for thought then anything
type SecurityGroupOutput ¶
type SecurityGroupOutput struct {
SecurityGroups []types.SecurityGroup
}
SecurityGroupOutput is the wrapper for our security groups not sure we need this but for now it's here
func DecodeSecurityGroups ¶
func DecodeSecurityGroups(b bytes.Buffer) SecurityGroupOutput
DecodeSecurityGroups takes bytes and gives us a securitygroupoutput for resotration
type StateKV ¶
type StateKV struct { Object string `json:"object"` FileLocation string `json:"fileLocation"` ObjectType string `json:"objectType"` }
StateKV manages our state file and object location
type StateManager ¶
func ReadState ¶
func ReadState(filename string) (StateManager, error)
func (*StateManager) GetStateObject ¶
func (s *StateManager) GetStateObject(object string) interface{}
func (*StateManager) SyncState ¶
func (s *StateManager) SyncState(filename string) error
func (*StateManager) UpdateState ¶
func (s *StateManager) UpdateState(name string, filename string, ot string)