Documentation
¶
Index ¶
- Variables
- type DBCluster
- type DBClusterCreateOptions
- type DBClusterDeleteOptions
- type DBClusterEndpoint
- type DBClusterFilters
- type DBClusterMember
- type DBClusterModifyOptions
- type DBClusterParameterGroup
- type DBClusterSnapshot
- type DBInstance
- type DBInstanceCreateOptions
- type DBInstanceModifyOptions
- type DBParameterGroup
- type DBSubnetGroup
- type EventSubscription
- type GlobalCluster
- type GlobalClusterMember
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AddClusterInternal(id string) *DBCluster
- func (b *InMemoryBackend) AddClusterParameterGroupInternal(name, family string) *DBClusterParameterGroup
- func (b *InMemoryBackend) AddEventSubscriptionInternal(name, snsTopicARN string) *EventSubscription
- func (b *InMemoryBackend) AddParameterGroupInternal(name, family string) *DBParameterGroup
- func (b *InMemoryBackend) AddRoleToDBCluster(ctx context.Context, clusterID, roleARN string) error
- func (b *InMemoryBackend) AddSnapshotInternal(snapshotID, clusterID string) *DBClusterSnapshot
- func (b *InMemoryBackend) AddSourceIdentifierToSubscription(ctx context.Context, name, sourceID string) (*EventSubscription, error)
- func (b *InMemoryBackend) AddTagsToResource(ctx context.Context, arnStr string, tags []Tag) error
- func (b *InMemoryBackend) ApplyPendingMaintenanceAction(_ context.Context, resourceID, applyAction, optInType string) error
- func (b *InMemoryBackend) CopyDBClusterParameterGroup(ctx context.Context, sourceName, targetName, targetDescription string) (*DBClusterParameterGroup, error)
- func (b *InMemoryBackend) CopyDBClusterSnapshot(ctx context.Context, sourceSnapshotID, targetSnapshotID string) (*DBClusterSnapshot, error)
- func (b *InMemoryBackend) CopyDBParameterGroup(ctx context.Context, sourceName, targetName, targetDescription string) (*DBParameterGroup, error)
- func (b *InMemoryBackend) CreateDBCluster(ctx context.Context, id, paramGroupName string, port int, ...) (*DBCluster, error)
- func (b *InMemoryBackend) CreateDBClusterEndpoint(ctx context.Context, endpointID, clusterID, endpointType string) (*DBClusterEndpoint, error)
- func (b *InMemoryBackend) CreateDBClusterParameterGroup(ctx context.Context, name, family, description string) (*DBClusterParameterGroup, error)
- func (b *InMemoryBackend) CreateDBClusterSnapshot(ctx context.Context, snapshotID, clusterID string) (*DBClusterSnapshot, error)
- func (b *InMemoryBackend) CreateDBInstance(ctx context.Context, id, clusterID, instanceClass string, ...) (*DBInstance, error)
- func (b *InMemoryBackend) CreateDBParameterGroup(ctx context.Context, name, family, description string) (*DBParameterGroup, error)
- func (b *InMemoryBackend) CreateDBSubnetGroup(ctx context.Context, name, description, vpcID string, subnetIDs []string) (*DBSubnetGroup, error)
- func (b *InMemoryBackend) CreateEventSubscription(ctx context.Context, name, snsTopicARN, sourceType string, sourceIDs []string, ...) (*EventSubscription, error)
- func (b *InMemoryBackend) CreateGlobalCluster(ctx context.Context, globalClusterID, sourceDBClusterID string) (*GlobalCluster, error)
- func (b *InMemoryBackend) DeleteDBCluster(ctx context.Context, id string, opts DBClusterDeleteOptions) (*DBCluster, error)
- func (b *InMemoryBackend) DeleteDBClusterEndpoint(ctx context.Context, endpointID string) (*DBClusterEndpoint, error)
- func (b *InMemoryBackend) DeleteDBClusterParameterGroup(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeleteDBClusterSnapshot(ctx context.Context, snapshotID string) (*DBClusterSnapshot, error)
- func (b *InMemoryBackend) DeleteDBInstance(ctx context.Context, id string) (*DBInstance, error)
- func (b *InMemoryBackend) DeleteDBParameterGroup(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeleteDBSubnetGroup(ctx context.Context, name string) error
- func (b *InMemoryBackend) DeleteEventSubscription(ctx context.Context, name string) (*EventSubscription, error)
- func (b *InMemoryBackend) DeleteGlobalCluster(_ context.Context, globalClusterID string) (*GlobalCluster, error)
- func (b *InMemoryBackend) DescribeDBClusterEndpoints(ctx context.Context, endpointID, clusterID string) ([]DBClusterEndpoint, error)
- func (b *InMemoryBackend) DescribeDBClusterParameterGroups(ctx context.Context, name string) ([]DBClusterParameterGroup, error)
- func (b *InMemoryBackend) DescribeDBClusterSnapshots(ctx context.Context, snapshotID, clusterID, snapshotTypeFilter string) ([]DBClusterSnapshot, error)
- func (b *InMemoryBackend) DescribeDBClusters(ctx context.Context, id string, filters DBClusterFilters) ([]DBCluster, error)
- func (b *InMemoryBackend) DescribeDBInstances(ctx context.Context, id, clusterFilter string) ([]DBInstance, error)
- func (b *InMemoryBackend) DescribeDBParameterGroups(ctx context.Context, name string) ([]DBParameterGroup, error)
- func (b *InMemoryBackend) DescribeDBSubnetGroups(ctx context.Context, name string) ([]DBSubnetGroup, error)
- func (b *InMemoryBackend) DescribeEventSubscriptions(ctx context.Context, name string) ([]EventSubscription, error)
- func (b *InMemoryBackend) DescribeGlobalClusters(_ context.Context) []GlobalCluster
- func (b *InMemoryBackend) FailoverDBCluster(ctx context.Context, id, targetInstanceID string) (*DBCluster, error)
- func (b *InMemoryBackend) FailoverGlobalCluster(_ context.Context, globalClusterID, _ string) (*GlobalCluster, error)
- func (b *InMemoryBackend) ListTagsForResource(ctx context.Context, arnStr string) ([]Tag, error)
- func (b *InMemoryBackend) ModifyDBCluster(ctx context.Context, id, paramGroupName string, opts DBClusterModifyOptions) (*DBCluster, error)
- func (b *InMemoryBackend) ModifyDBClusterEndpoint(ctx context.Context, endpointID, endpointType string) (*DBClusterEndpoint, error)
- func (b *InMemoryBackend) ModifyDBClusterParameterGroup(ctx context.Context, name string) (*DBClusterParameterGroup, error)
- func (b *InMemoryBackend) ModifyDBClusterSnapshotAttribute(ctx context.Context, snapshotID, attributeName string, ...) (*DBClusterSnapshot, error)
- func (b *InMemoryBackend) ModifyDBInstance(ctx context.Context, id, instanceClass string, opts DBInstanceModifyOptions) (*DBInstance, error)
- func (b *InMemoryBackend) ModifyDBParameterGroup(ctx context.Context, name string) (*DBParameterGroup, error)
- func (b *InMemoryBackend) ModifyDBSubnetGroup(ctx context.Context, name, description string, subnetIDs []string) (*DBSubnetGroup, error)
- func (b *InMemoryBackend) ModifyEventSubscription(ctx context.Context, name, snsTopicARN, sourceType, enabled string, ...) (*EventSubscription, error)
- func (b *InMemoryBackend) ModifyGlobalCluster(_ context.Context, globalClusterID string) (*GlobalCluster, error)
- func (b *InMemoryBackend) RebootDBInstance(ctx context.Context, id string) (*DBInstance, error)
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) RemoveFromGlobalCluster(_ context.Context, globalClusterID, dbClusterARN string) (*GlobalCluster, error)
- func (b *InMemoryBackend) RemoveRoleFromDBCluster(ctx context.Context, clusterID, roleARN string) error
- func (b *InMemoryBackend) RemoveSourceIdentifierFromSubscription(ctx context.Context, name, sourceID string) (*EventSubscription, error)
- func (b *InMemoryBackend) RemoveTagsFromResource(ctx context.Context, arnStr string, keys []string) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) ResetDBClusterParameterGroup(ctx context.Context, name string) (*DBClusterParameterGroup, error)
- func (b *InMemoryBackend) ResetDBParameterGroup(ctx context.Context, name string) (*DBParameterGroup, error)
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) RestoreDBClusterFromSnapshot(ctx context.Context, snapshotID, clusterID string) (*DBCluster, error)
- func (b *InMemoryBackend) RestoreDBClusterToPointInTime(ctx context.Context, srcClusterID, targetClusterID string) (*DBCluster, error)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartDBCluster(ctx context.Context, id string) (*DBCluster, error)
- func (b *InMemoryBackend) StopDBCluster(ctx context.Context, id string) (*DBCluster, error)
- func (b *InMemoryBackend) SwitchoverGlobalCluster(_ context.Context, globalClusterID, _ string) (*GlobalCluster, error)
- type MasterUserManagedSecret
- type Provider
- type ServerlessV2ScalingConfiguration
- type StorageBackend
- type Tag
Constants ¶
This section is empty.
Variables ¶
var ( ErrClusterNotFound = errors.New("DBClusterNotFound") ErrClusterAlreadyExists = errors.New("DBClusterAlreadyExists") ErrInstanceNotFound = errors.New("DBInstanceNotFound") ErrInstanceAlreadyExists = errors.New("DBInstanceAlreadyExists") ErrSubnetGroupNotFound = errors.New("DBSubnetGroupNotFound") ErrSubnetGroupAlreadyExists = errors.New("DBSubnetGroupAlreadyExists") ErrClusterParameterGroupNotFound = errors.New("DBClusterParameterGroupNotFound") ErrClusterParameterGroupAlreadyExists = errors.New("DBClusterParameterGroupAlreadyExists") ErrClusterSnapshotNotFound = errors.New("DBClusterSnapshotNotFound") ErrClusterSnapshotAlreadyExists = errors.New("DBClusterSnapshotAlreadyExists") ErrParameterGroupNotFound = errors.New("DBParameterGroupNotFound") ErrParameterGroupAlreadyExists = errors.New("DBParameterGroupAlreadyExists") ErrClusterEndpointNotFound = errors.New("DBClusterEndpointNotFound") ErrClusterEndpointAlreadyExists = errors.New("DBClusterEndpointAlreadyExists") ErrSubscriptionNotFound = errors.New("SubscriptionNotFound") ErrSubscriptionAlreadyExists = errors.New("SubscriptionAlreadyExists") ErrGlobalClusterNotFound = errors.New("GlobalClusterNotFound") ErrGlobalClusterAlreadyExists = errors.New("GlobalClusterAlreadyExists") ErrInvalidParameter = errors.New("InvalidParameterValue") ErrUnknownAction = errors.New("InvalidAction") ErrInvalidDBClusterStateFault = errors.New("InvalidDBClusterStateFault") ErrInvalidDBInstanceStateFault = errors.New("InvalidDBInstanceStateFault") ErrInvalidDBClusterSnapshotStateFault = errors.New("InvalidDBClusterSnapshotStateFault") ErrSnapshotRequired = errors.New("InvalidParameterCombination") )
var ErrNilAppContext = errors.New("nil AppContext passed to Neptune Provider.Init")
ErrNilAppContext is returned by Init when a nil AppContext is passed.
Functions ¶
This section is empty.
Types ¶
type DBCluster ¶
type DBCluster struct {
ServerlessV2ScalingConfig *ServerlessV2ScalingConfiguration `json:"ServerlessV2ScalingConfiguration,omitempty"`
MasterUserManagedSecret *MasterUserManagedSecret `json:"MasterUserManagedSecret,omitempty"`
KmsKeyID string `json:"KmsKeyID"`
HostedZoneID string `json:"HostedZoneId"`
Engine string `json:"Engine"`
EngineVersion string `json:"EngineVersion"`
DBClusterIdentifier string `json:"DBClusterIdentifier"`
Status string `json:"Status"`
DBClusterParameterGroupName string `json:"DBClusterParameterGroupName"`
DBSubnetGroupName string `json:"DBSubnetGroupName"`
Endpoint string `json:"Endpoint"`
ReaderEndpoint string `json:"ReaderEndpoint"`
PreferredBackupWindow string `json:"PreferredBackupWindow"`
PreferredMaintenanceWindow string `json:"PreferredMaintenanceWindow"`
DBClusterArn string `json:"DBClusterArn"`
DBClusterResourceID string `json:"DbClusterResourceId"`
ClusterCreateTime string `json:"ClusterCreateTime"`
StorageType string `json:"StorageType"`
EngineMode string `json:"EngineMode"`
MasterUsername string `json:"MasterUsername"`
AvailabilityZones []string `json:"AvailabilityZones"`
VpcSecurityGroupIDs []string `json:"VpcSecurityGroupIds"`
AssociatedRoles []string `json:"AssociatedRoles"`
DBClusterMembers []DBClusterMember `json:"DBClusterMembers"`
Port int `json:"Port"`
BackupRetentionPeriod int `json:"BackupRetentionPeriod"`
AllocatedStorage int `json:"AllocatedStorage"`
EnableIAMDatabaseAuthentication bool `json:"EnableIAMDatabaseAuthentication"`
StorageEncrypted bool `json:"StorageEncrypted"`
MultiAZ bool `json:"MultiAZ"`
DeletionProtection bool `json:"DeletionProtection"`
CopyTagsToSnapshot bool `json:"CopyTagsToSnapshot"`
// contains filtered or unexported fields
}
DBCluster represents an Amazon Neptune DB cluster.
type DBClusterCreateOptions ¶
type DBClusterCreateOptions struct {
ServerlessV2ScalingConfig *ServerlessV2ScalingConfiguration
DBSubnetGroupName string
StorageType string
EngineVersion string
EngineMode string
KmsKeyID string
PreferredBackupWindow string
MasterUsername string
PreferredMaintenanceWindow string
AvailabilityZones []string
VpcSecurityGroupIDs []string
BackupRetentionPeriod int
EnableIAMDatabaseAuthentication bool
ManageMasterUserPassword bool
StorageEncrypted bool
DeletionProtection bool
CopyTagsToSnapshot bool
}
DBClusterCreateOptions holds optional fields for CreateDBCluster.
type DBClusterDeleteOptions ¶
DBClusterDeleteOptions holds optional fields for DeleteDBCluster.
type DBClusterEndpoint ¶
type DBClusterEndpoint struct {
DBClusterEndpointIdentifier string `json:"DBClusterEndpointIdentifier"`
DBClusterIdentifier string `json:"DBClusterIdentifier"`
DBClusterEndpointArn string `json:"DBClusterEndpointArn"`
DBClusterEndpointResourceIdentifier string `json:"DBClusterEndpointResourceIdentifier"`
EndpointType string `json:"EndpointType"`
CustomEndpointType string `json:"CustomEndpointType"`
Status string `json:"Status"`
Endpoint string `json:"Endpoint"`
StaticMembers []string `json:"StaticMembers"`
ExcludedMembers []string `json:"ExcludedMembers"`
// contains filtered or unexported fields
}
DBClusterEndpoint represents a Neptune DB cluster custom endpoint.
type DBClusterFilters ¶
DBClusterFilters holds filter values for DescribeDBClusters.
type DBClusterMember ¶
type DBClusterMember struct {
DBInstanceIdentifier string `json:"DBInstanceIdentifier"`
IsClusterWriter bool `json:"IsClusterWriter"`
}
DBClusterMember represents a single DB instance member of a Neptune cluster.
type DBClusterModifyOptions ¶
type DBClusterModifyOptions struct {
ServerlessV2ScalingConfig *ServerlessV2ScalingConfiguration
EngineVersion string
PreferredBackupWindow string
PreferredMaintenanceWindow string
VpcSecurityGroupIDs []string
BackupRetentionPeriod int
EnableIAMDatabaseAuthentication bool
IamAuthSet bool
ManageMasterUserPassword bool
DeletionProtection bool
DeletionProtectionSet bool
CopyTagsToSnapshot bool
CopyTagsToSnapshotSet bool
BackupRetentionPeriodSet bool
}
DBClusterModifyOptions holds optional fields for ModifyDBCluster.
type DBClusterParameterGroup ¶
type DBClusterParameterGroup struct {
DBClusterParameterGroupName string `json:"DBClusterParameterGroupName"`
DBClusterParameterGroupArn string `json:"DBClusterParameterGroupArn"`
DBParameterGroupFamily string `json:"DBParameterGroupFamily"`
Description string `json:"Description"`
// contains filtered or unexported fields
}
DBClusterParameterGroup represents a Neptune DB cluster parameter group.
type DBClusterSnapshot ¶
type DBClusterSnapshot struct {
DBClusterSnapshotIdentifier string `json:"DBClusterSnapshotIdentifier"`
DBClusterSnapshotArn string `json:"DBClusterSnapshotArn"`
DBClusterIdentifier string `json:"DBClusterIdentifier"`
Engine string `json:"Engine"`
EngineVersion string `json:"EngineVersion"`
Status string `json:"Status"`
SnapshotType string `json:"SnapshotType"`
SnapshotCreateTime string `json:"SnapshotCreateTime"`
ClusterCreateTime string `json:"ClusterCreateTime"`
KmsKeyID string `json:"KmsKeyId"`
VpcID string `json:"VpcId"`
// RestoreAttributeValues holds the account IDs (or "all") authorized to
// copy/restore this manual snapshot via the "restore" DB cluster snapshot
// attribute -- the only attribute Neptune's API models (see
// ModifyDBClusterSnapshotAttribute/DescribeDBClusterSnapshotAttributes).
RestoreAttributeValues []string `json:"RestoreAttributeValues"`
Port int `json:"Port"`
PercentProgress int `json:"PercentProgress"`
AllocatedStorage int `json:"AllocatedStorage"`
StorageEncrypted bool `json:"StorageEncrypted"`
IAMDatabaseAuthenticationEnabled bool `json:"IAMDatabaseAuthenticationEnabled"`
// contains filtered or unexported fields
}
DBClusterSnapshot represents a Neptune DB cluster snapshot.
type DBInstance ¶
type DBInstance struct {
DBInstanceIdentifier string `json:"DBInstanceIdentifier"`
DBInstanceArn string `json:"DBInstanceArn"`
DBClusterIdentifier string `json:"DBClusterIdentifier"`
DBInstanceClass string `json:"DBInstanceClass"`
Engine string `json:"Engine"`
EngineVersion string `json:"EngineVersion"`
DBInstanceStatus string `json:"DBInstanceStatus"`
InstanceCreateTime string `json:"InstanceCreateTime"`
Endpoint string `json:"Endpoint"`
DBSubnetGroupName string `json:"DBSubnetGroupName"`
DBParameterGroupName string `json:"DBParameterGroupName"`
PreferredMaintenanceWindow string `json:"PreferredMaintenanceWindow"`
PreferredBackupWindow string `json:"PreferredBackupWindow"`
AvailabilityZone string `json:"AvailabilityZone"`
Port int `json:"Port"`
PromotionTier int `json:"PromotionTier"`
StorageEncrypted bool `json:"StorageEncrypted"`
AutoMinorVersionUpgrade bool `json:"AutoMinorVersionUpgrade"`
CopyTagsToSnapshot bool `json:"CopyTagsToSnapshot"`
EnableIAMDatabaseAuthentication bool `json:"EnableIAMDatabaseAuthentication"`
MultiAZ bool `json:"MultiAZ"`
PubliclyAccessible bool `json:"PubliclyAccessible"`
// contains filtered or unexported fields
}
DBInstance represents an Amazon Neptune DB instance.
type DBInstanceCreateOptions ¶
type DBInstanceCreateOptions struct {
DBParameterGroupName string
PreferredMaintenanceWindow string
PreferredBackupWindow string
AvailabilityZone string
PromotionTier int
AutoMinorVersionUpgrade bool
CopyTagsToSnapshot bool
EnableIAMDatabaseAuthentication bool
StorageEncrypted bool
}
DBInstanceCreateOptions holds optional fields for CreateDBInstance.
type DBInstanceModifyOptions ¶
type DBInstanceModifyOptions struct {
DBParameterGroupName string
PreferredMaintenanceWindow string
PreferredBackupWindow string
AvailabilityZone string
PromotionTier int
AutoMinorVersionUpgrade bool
AutoMinorVersionUpgradeSet bool
CopyTagsToSnapshot bool
CopyTagsToSnapshotSet bool
EnableIAMDatabaseAuthentication bool
IamAuthSet bool
PromotionTierSet bool
}
DBInstanceModifyOptions holds optional fields for ModifyDBInstance.
type DBParameterGroup ¶
type DBParameterGroup struct {
DBParameterGroupName string `json:"DBParameterGroupName"`
DBParameterGroupArn string `json:"DBParameterGroupArn"`
DBParameterGroupFamily string `json:"DBParameterGroupFamily"`
Description string `json:"Description"`
// contains filtered or unexported fields
}
DBParameterGroup represents a Neptune DB parameter group.
type DBSubnetGroup ¶
type DBSubnetGroup struct {
DBSubnetGroupName string `json:"DBSubnetGroupName"`
DBSubnetGroupArn string `json:"DBSubnetGroupArn"`
DBSubnetGroupDescription string `json:"DBSubnetGroupDescription"`
VpcID string `json:"VpcID"`
Status string `json:"Status"`
SubnetIDs []string `json:"SubnetIDs"`
// contains filtered or unexported fields
}
DBSubnetGroup represents a Neptune DB subnet group.
type EventSubscription ¶
type EventSubscription struct {
CustSubscriptionID string `json:"CustSubscriptionID"`
SnsTopicARN string `json:"SnsTopicARN"`
EventSubscriptionArn string `json:"EventSubscriptionArn"`
Status string `json:"Status"`
SourceType string `json:"SourceType"`
SubscriptionCreationTime string `json:"SubscriptionCreationTime"`
SourceIDs []string `json:"SourceIDs"`
EventCategoriesList []string `json:"EventCategoriesList"`
Enabled bool `json:"Enabled"`
// contains filtered or unexported fields
}
EventSubscription represents a Neptune event subscription.
type GlobalCluster ¶
type GlobalCluster struct {
GlobalClusterIdentifier string `json:"GlobalClusterIdentifier"`
GlobalClusterArn string `json:"GlobalClusterArn"`
GlobalClusterResourceID string `json:"GlobalClusterResourceId"`
Status string `json:"Status"`
Engine string `json:"Engine"`
EngineVersion string `json:"EngineVersion"`
GlobalClusterMembers []GlobalClusterMember `json:"GlobalClusterMembers"`
StorageEncrypted bool `json:"StorageEncrypted"`
DeletionProtection bool `json:"DeletionProtection"`
}
GlobalCluster represents a Neptune global cluster.
type GlobalClusterMember ¶
type GlobalClusterMember struct {
DBClusterARN string `json:"DBClusterARN"`
IsWriter bool `json:"IsWriter"`
}
GlobalClusterMember represents a member cluster in a global cluster.
type Handler ¶
type Handler struct {
Backend StorageBackend
}
Handler is the Echo HTTP handler for Neptune operations.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a new Neptune handler.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this Neptune instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the Neptune action from the request.
func (*Handler) ExtractResource ¶
ExtractResource returns the DB cluster identifier from the request.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns supported Neptune operations (sorted).
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority for Neptune (higher than RDS to intercept Neptune requests first).
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches Neptune requests.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is a thread-safe in-memory backend for Neptune.
Eight resource collections that were previously nested by region (outer key = region, e.g. map[string]map[string]*DBCluster) are now each a single flat *store.Table keyed by the composite "region|id" string (see store_setup.go), with a companion *store.Index grouping entries by region for per-region scans -- the same region-qualified-table pattern services/secretsmanager and services/cloudwatchlogs use. GlobalClusters are global/partition-scoped (like AWS) and were already flat, so they became a plain (non-composite-key) *store.Table. clusterRoles and tags remain raw nested maps: their values (a bare []string / []Tag) carry no identity of their own to key a store.Table by (see store_setup.go's doc comment for the full rationale).
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend creates a new in-memory Neptune backend.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the backend's AWS account ID.
func (*InMemoryBackend) AddClusterInternal ¶
func (b *InMemoryBackend) AddClusterInternal(id string) *DBCluster
AddClusterInternal creates a cluster directly, bypassing normal validation. Used for seeding tests.
func (*InMemoryBackend) AddClusterParameterGroupInternal ¶
func (b *InMemoryBackend) AddClusterParameterGroupInternal( name, family string, ) *DBClusterParameterGroup
AddClusterParameterGroupInternal creates a cluster parameter group directly. Used for seeding tests.
func (*InMemoryBackend) AddEventSubscriptionInternal ¶
func (b *InMemoryBackend) AddEventSubscriptionInternal( name, snsTopicARN string, ) *EventSubscription
AddEventSubscriptionInternal creates an event subscription directly. Used for seeding tests.
func (*InMemoryBackend) AddParameterGroupInternal ¶
func (b *InMemoryBackend) AddParameterGroupInternal(name, family string) *DBParameterGroup
AddParameterGroupInternal creates a DB parameter group directly. Used for seeding tests.
func (*InMemoryBackend) AddRoleToDBCluster ¶
func (b *InMemoryBackend) AddRoleToDBCluster(ctx context.Context, clusterID, roleARN string) error
AddRoleToDBCluster associates an IAM role with a Neptune DB cluster.
func (*InMemoryBackend) AddSnapshotInternal ¶
func (b *InMemoryBackend) AddSnapshotInternal(snapshotID, clusterID string) *DBClusterSnapshot
AddSnapshotInternal creates a snapshot directly, bypassing normal validation. Used for seeding tests.
func (*InMemoryBackend) AddSourceIdentifierToSubscription ¶
func (b *InMemoryBackend) AddSourceIdentifierToSubscription( ctx context.Context, name, sourceID string, ) (*EventSubscription, error)
AddSourceIdentifierToSubscription adds a source identifier to an event subscription.
func (*InMemoryBackend) AddTagsToResource ¶
AddTagsToResource adds or updates tags on a Neptune resource. The resource's region is resolved from the ARN, falling back to the ctx region.
func (*InMemoryBackend) ApplyPendingMaintenanceAction ¶
func (b *InMemoryBackend) ApplyPendingMaintenanceAction( _ context.Context, resourceID, applyAction, optInType string, ) error
ApplyPendingMaintenanceAction applies a pending maintenance action to a resource.
func (*InMemoryBackend) CopyDBClusterParameterGroup ¶
func (b *InMemoryBackend) CopyDBClusterParameterGroup( ctx context.Context, sourceName, targetName, targetDescription string, ) (*DBClusterParameterGroup, error)
CopyDBClusterParameterGroup copies a Neptune DB cluster parameter group.
func (*InMemoryBackend) CopyDBClusterSnapshot ¶
func (b *InMemoryBackend) CopyDBClusterSnapshot( ctx context.Context, sourceSnapshotID, targetSnapshotID string, ) (*DBClusterSnapshot, error)
CopyDBClusterSnapshot copies a Neptune DB cluster snapshot.
func (*InMemoryBackend) CopyDBParameterGroup ¶
func (b *InMemoryBackend) CopyDBParameterGroup( ctx context.Context, sourceName, targetName, targetDescription string, ) (*DBParameterGroup, error)
CopyDBParameterGroup copies a Neptune DB parameter group.
func (*InMemoryBackend) CreateDBCluster ¶
func (b *InMemoryBackend) CreateDBCluster( ctx context.Context, id, paramGroupName string, port int, opts DBClusterCreateOptions, ) (*DBCluster, error)
CreateDBCluster creates a new Neptune DB cluster.
func (*InMemoryBackend) CreateDBClusterEndpoint ¶
func (b *InMemoryBackend) CreateDBClusterEndpoint( ctx context.Context, endpointID, clusterID, endpointType string, ) (*DBClusterEndpoint, error)
CreateDBClusterEndpoint creates a Neptune DB cluster custom endpoint.
func (*InMemoryBackend) CreateDBClusterParameterGroup ¶
func (b *InMemoryBackend) CreateDBClusterParameterGroup( ctx context.Context, name, family, description string, ) (*DBClusterParameterGroup, error)
CreateDBClusterParameterGroup creates a Neptune DB cluster parameter group.
func (*InMemoryBackend) CreateDBClusterSnapshot ¶
func (b *InMemoryBackend) CreateDBClusterSnapshot( ctx context.Context, snapshotID, clusterID string, ) (*DBClusterSnapshot, error)
CreateDBClusterSnapshot creates a Neptune DB cluster snapshot.
func (*InMemoryBackend) CreateDBInstance ¶
func (b *InMemoryBackend) CreateDBInstance( ctx context.Context, id, clusterID, instanceClass string, opts DBInstanceCreateOptions, ) (*DBInstance, error)
CreateDBInstance creates a new Neptune DB instance.
func (*InMemoryBackend) CreateDBParameterGroup ¶
func (b *InMemoryBackend) CreateDBParameterGroup( ctx context.Context, name, family, description string, ) (*DBParameterGroup, error)
CreateDBParameterGroup creates a Neptune DB parameter group.
func (*InMemoryBackend) CreateDBSubnetGroup ¶
func (b *InMemoryBackend) CreateDBSubnetGroup( ctx context.Context, name, description, vpcID string, subnetIDs []string, ) (*DBSubnetGroup, error)
CreateDBSubnetGroup creates a new Neptune DB subnet group.
func (*InMemoryBackend) CreateEventSubscription ¶
func (b *InMemoryBackend) CreateEventSubscription( ctx context.Context, name, snsTopicARN, sourceType string, sourceIDs []string, enabled bool, ) (*EventSubscription, error)
CreateEventSubscription creates a Neptune event notification subscription.
func (*InMemoryBackend) CreateGlobalCluster ¶
func (b *InMemoryBackend) CreateGlobalCluster( ctx context.Context, globalClusterID, sourceDBClusterID string, ) (*GlobalCluster, error)
CreateGlobalCluster creates a Neptune global cluster. Global clusters are partition-scoped (not region-isolated), but the optional source DB cluster is looked up in the ctx region where it resides.
func (*InMemoryBackend) DeleteDBCluster ¶
func (b *InMemoryBackend) DeleteDBCluster( ctx context.Context, id string, opts DBClusterDeleteOptions, ) (*DBCluster, error)
DeleteDBCluster deletes a Neptune DB cluster and all associated DB instances.
func (*InMemoryBackend) DeleteDBClusterEndpoint ¶
func (b *InMemoryBackend) DeleteDBClusterEndpoint( ctx context.Context, endpointID string, ) (*DBClusterEndpoint, error)
DeleteDBClusterEndpoint deletes a Neptune DB cluster custom endpoint, returning the deleted endpoint's details -- AWS's DeleteDBClusterEndpoint response echoes them back (DeleteDBClusterEndpointResult), unlike e.g. DeleteDBSubnetGroup which has a genuinely empty output.
func (*InMemoryBackend) DeleteDBClusterParameterGroup ¶
func (b *InMemoryBackend) DeleteDBClusterParameterGroup(ctx context.Context, name string) error
DeleteDBClusterParameterGroup deletes a Neptune DB cluster parameter group.
func (*InMemoryBackend) DeleteDBClusterSnapshot ¶
func (b *InMemoryBackend) DeleteDBClusterSnapshot( ctx context.Context, snapshotID string, ) (*DBClusterSnapshot, error)
DeleteDBClusterSnapshot deletes a Neptune DB cluster snapshot.
func (*InMemoryBackend) DeleteDBInstance ¶
func (b *InMemoryBackend) DeleteDBInstance(ctx context.Context, id string) (*DBInstance, error)
DeleteDBInstance deletes a Neptune DB instance.
func (*InMemoryBackend) DeleteDBParameterGroup ¶
func (b *InMemoryBackend) DeleteDBParameterGroup(ctx context.Context, name string) error
DeleteDBParameterGroup deletes a Neptune DB parameter group.
func (*InMemoryBackend) DeleteDBSubnetGroup ¶
func (b *InMemoryBackend) DeleteDBSubnetGroup(ctx context.Context, name string) error
DeleteDBSubnetGroup deletes a Neptune DB subnet group.
func (*InMemoryBackend) DeleteEventSubscription ¶
func (b *InMemoryBackend) DeleteEventSubscription( ctx context.Context, name string, ) (*EventSubscription, error)
DeleteEventSubscription deletes a Neptune event subscription.
func (*InMemoryBackend) DeleteGlobalCluster ¶
func (b *InMemoryBackend) DeleteGlobalCluster( _ context.Context, globalClusterID string, ) (*GlobalCluster, error)
DeleteGlobalCluster deletes a Neptune global cluster (partition-scoped).
func (*InMemoryBackend) DescribeDBClusterEndpoints ¶
func (b *InMemoryBackend) DescribeDBClusterEndpoints( ctx context.Context, endpointID, clusterID string, ) ([]DBClusterEndpoint, error)
DescribeDBClusterEndpoints returns all Neptune DB cluster endpoints or a specific one.
func (*InMemoryBackend) DescribeDBClusterParameterGroups ¶
func (b *InMemoryBackend) DescribeDBClusterParameterGroups( ctx context.Context, name string, ) ([]DBClusterParameterGroup, error)
DescribeDBClusterParameterGroups returns all Neptune cluster parameter groups or a specific one.
func (*InMemoryBackend) DescribeDBClusterSnapshots ¶
func (b *InMemoryBackend) DescribeDBClusterSnapshots( ctx context.Context, snapshotID, clusterID, snapshotTypeFilter string, ) ([]DBClusterSnapshot, error)
DescribeDBClusterSnapshots returns all Neptune cluster snapshots or a specific one. If clusterID is set, results are filtered to that cluster.
func (*InMemoryBackend) DescribeDBClusters ¶
func (b *InMemoryBackend) DescribeDBClusters( ctx context.Context, id string, filters DBClusterFilters, ) ([]DBCluster, error)
DescribeDBClusters returns all Neptune DB clusters or a specific one. Filters (when set) restrict results to matching clusters.
func (*InMemoryBackend) DescribeDBInstances ¶
func (b *InMemoryBackend) DescribeDBInstances( ctx context.Context, id, clusterFilter string, ) ([]DBInstance, error)
DescribeDBInstances returns all Neptune DB instances or a specific one by ID. The clusterFilter (when non-empty) restricts results to instances of that cluster.
func (*InMemoryBackend) DescribeDBParameterGroups ¶
func (b *InMemoryBackend) DescribeDBParameterGroups( ctx context.Context, name string, ) ([]DBParameterGroup, error)
DescribeDBParameterGroups returns all Neptune DB parameter groups or a specific one.
func (*InMemoryBackend) DescribeDBSubnetGroups ¶
func (b *InMemoryBackend) DescribeDBSubnetGroups( ctx context.Context, name string, ) ([]DBSubnetGroup, error)
DescribeDBSubnetGroups returns all Neptune DB subnet groups or a specific one.
func (*InMemoryBackend) DescribeEventSubscriptions ¶
func (b *InMemoryBackend) DescribeEventSubscriptions( ctx context.Context, name string, ) ([]EventSubscription, error)
DescribeEventSubscriptions returns all event subscriptions or a specific one.
func (*InMemoryBackend) DescribeGlobalClusters ¶
func (b *InMemoryBackend) DescribeGlobalClusters(_ context.Context) []GlobalCluster
DescribeGlobalClusters returns all Neptune global clusters. Global clusters are partition-scoped, so all are returned regardless of region.
func (*InMemoryBackend) FailoverDBCluster ¶
func (b *InMemoryBackend) FailoverDBCluster( ctx context.Context, id, targetInstanceID string, ) (*DBCluster, error)
FailoverDBCluster triggers a failover for a Neptune DB cluster.
func (*InMemoryBackend) FailoverGlobalCluster ¶
func (b *InMemoryBackend) FailoverGlobalCluster( _ context.Context, globalClusterID, _ string, ) (*GlobalCluster, error)
FailoverGlobalCluster performs a failover for a Neptune global cluster (partition-scoped). targetDBClusterID is accepted for API compatibility but not used in the in-memory backend.
func (*InMemoryBackend) ListTagsForResource ¶
ListTagsForResource returns the tags for a Neptune resource.
func (*InMemoryBackend) ModifyDBCluster ¶
func (b *InMemoryBackend) ModifyDBCluster( ctx context.Context, id, paramGroupName string, opts DBClusterModifyOptions, ) (*DBCluster, error)
ModifyDBCluster modifies a Neptune DB cluster.
func (*InMemoryBackend) ModifyDBClusterEndpoint ¶
func (b *InMemoryBackend) ModifyDBClusterEndpoint( ctx context.Context, endpointID, endpointType string, ) (*DBClusterEndpoint, error)
ModifyDBClusterEndpoint modifies a Neptune DB cluster custom endpoint.
func (*InMemoryBackend) ModifyDBClusterParameterGroup ¶
func (b *InMemoryBackend) ModifyDBClusterParameterGroup( ctx context.Context, name string, ) (*DBClusterParameterGroup, error)
ModifyDBClusterParameterGroup modifies a Neptune DB cluster parameter group.
func (*InMemoryBackend) ModifyDBClusterSnapshotAttribute ¶
func (b *InMemoryBackend) ModifyDBClusterSnapshotAttribute( ctx context.Context, snapshotID, attributeName string, valuesToAdd, valuesToRemove []string, ) (*DBClusterSnapshot, error)
ModifyDBClusterSnapshotAttribute adds and/or removes values from a Neptune DB cluster snapshot's "restore" attribute (the list of accounts authorized to copy/restore the snapshot). It returns the updated snapshot so callers can render the DBClusterSnapshotAttributesResult AWS includes in both the Modify and Describe responses.
func (*InMemoryBackend) ModifyDBInstance ¶
func (b *InMemoryBackend) ModifyDBInstance( ctx context.Context, id, instanceClass string, opts DBInstanceModifyOptions, ) (*DBInstance, error)
ModifyDBInstance modifies a Neptune DB instance.
func (*InMemoryBackend) ModifyDBParameterGroup ¶
func (b *InMemoryBackend) ModifyDBParameterGroup( ctx context.Context, name string, ) (*DBParameterGroup, error)
ModifyDBParameterGroup modifies a Neptune DB parameter group.
func (*InMemoryBackend) ModifyDBSubnetGroup ¶
func (b *InMemoryBackend) ModifyDBSubnetGroup( ctx context.Context, name, description string, subnetIDs []string, ) (*DBSubnetGroup, error)
ModifyDBSubnetGroup modifies a Neptune DB subnet group.
func (*InMemoryBackend) ModifyEventSubscription ¶
func (b *InMemoryBackend) ModifyEventSubscription( ctx context.Context, name, snsTopicARN, sourceType, enabled string, eventCategories []string, ) (*EventSubscription, error)
ModifyEventSubscription modifies a Neptune event subscription.
func (*InMemoryBackend) ModifyGlobalCluster ¶
func (b *InMemoryBackend) ModifyGlobalCluster( _ context.Context, globalClusterID string, ) (*GlobalCluster, error)
ModifyGlobalCluster modifies a Neptune global cluster (partition-scoped).
func (*InMemoryBackend) RebootDBInstance ¶
func (b *InMemoryBackend) RebootDBInstance(ctx context.Context, id string) (*DBInstance, error)
RebootDBInstance reboots a Neptune DB instance.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the backend's AWS region.
func (*InMemoryBackend) RemoveFromGlobalCluster ¶
func (b *InMemoryBackend) RemoveFromGlobalCluster( _ context.Context, globalClusterID, dbClusterARN string, ) (*GlobalCluster, error)
RemoveFromGlobalCluster removes a DB cluster from a Neptune global cluster (partition-scoped).
func (*InMemoryBackend) RemoveRoleFromDBCluster ¶
func (b *InMemoryBackend) RemoveRoleFromDBCluster( ctx context.Context, clusterID, roleARN string, ) error
RemoveRoleFromDBCluster removes an IAM role association from a Neptune DB cluster.
func (*InMemoryBackend) RemoveSourceIdentifierFromSubscription ¶
func (b *InMemoryBackend) RemoveSourceIdentifierFromSubscription( ctx context.Context, name, sourceID string, ) (*EventSubscription, error)
RemoveSourceIdentifierFromSubscription removes a source identifier from a Neptune event subscription.
func (*InMemoryBackend) RemoveTagsFromResource ¶
func (b *InMemoryBackend) RemoveTagsFromResource( ctx context.Context, arnStr string, keys []string, ) error
RemoveTagsFromResource removes tags from a Neptune resource.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all backend state, returning it to a clean empty state.
It calls b.registry.ResetAll() rather than re-registering tables: registerAllTables must run exactly once, at construction (store.Register panics on a duplicate name) -- see the doc comment on registerAllTables in store_setup.go.
func (*InMemoryBackend) ResetDBClusterParameterGroup ¶
func (b *InMemoryBackend) ResetDBClusterParameterGroup( ctx context.Context, name string, ) (*DBClusterParameterGroup, error)
ResetDBClusterParameterGroup resets a Neptune DB cluster parameter group to its default values.
func (*InMemoryBackend) ResetDBParameterGroup ¶
func (b *InMemoryBackend) ResetDBParameterGroup( ctx context.Context, name string, ) (*DBParameterGroup, error)
ResetDBParameterGroup resets a Neptune DB parameter group to its default values.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.
func (*InMemoryBackend) RestoreDBClusterFromSnapshot ¶
func (b *InMemoryBackend) RestoreDBClusterFromSnapshot( ctx context.Context, snapshotID, clusterID string, ) (*DBCluster, error)
RestoreDBClusterFromSnapshot restores a Neptune DB cluster from a snapshot.
func (*InMemoryBackend) RestoreDBClusterToPointInTime ¶
func (b *InMemoryBackend) RestoreDBClusterToPointInTime( ctx context.Context, srcClusterID, targetClusterID string, ) (*DBCluster, error)
RestoreDBClusterToPointInTime restores a Neptune DB cluster to a point in time.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) StartDBCluster ¶
StartDBCluster starts a stopped Neptune DB cluster.
func (*InMemoryBackend) StopDBCluster ¶
StopDBCluster stops a Neptune DB cluster.
func (*InMemoryBackend) SwitchoverGlobalCluster ¶
func (b *InMemoryBackend) SwitchoverGlobalCluster( _ context.Context, globalClusterID, _ string, ) (*GlobalCluster, error)
SwitchoverGlobalCluster switches over a Neptune global cluster to a new primary (partition-scoped). targetDBClusterID is accepted for API compatibility but not used in the in-memory backend.
type MasterUserManagedSecret ¶
type MasterUserManagedSecret struct {
SecretARN string `json:"secretArn"`
SecretStatus string `json:"secretStatus"`
}
MasterUserManagedSecret holds the ARN of the Secrets Manager secret for the master user password.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Neptune.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the Neptune service backend and handler.
type ServerlessV2ScalingConfiguration ¶
type ServerlessV2ScalingConfiguration struct {
MinCapacity float64 `json:"minCapacity"`
MaxCapacity float64 `json:"maxCapacity"`
}
ServerlessV2ScalingConfiguration holds Neptune Serverless v2 capacity settings.
type StorageBackend ¶
type StorageBackend interface {
// Cluster operations
CreateDBCluster(
ctx context.Context,
id, paramGroupName string,
port int,
opts DBClusterCreateOptions,
) (*DBCluster, error)
DescribeDBClusters(
ctx context.Context,
id string,
filters DBClusterFilters,
) ([]DBCluster, error)
DeleteDBCluster(ctx context.Context, id string, opts DBClusterDeleteOptions) (*DBCluster, error)
ModifyDBCluster(
ctx context.Context,
id, paramGroupName string,
opts DBClusterModifyOptions,
) (*DBCluster, error)
StopDBCluster(ctx context.Context, id string) (*DBCluster, error)
StartDBCluster(ctx context.Context, id string) (*DBCluster, error)
FailoverDBCluster(ctx context.Context, id, targetInstanceID string) (*DBCluster, error)
// Instance operations
CreateDBInstance(
ctx context.Context,
id, clusterID, instanceClass string,
opts DBInstanceCreateOptions,
) (*DBInstance, error)
DescribeDBInstances(ctx context.Context, id, clusterFilter string) ([]DBInstance, error)
DeleteDBInstance(ctx context.Context, id string) (*DBInstance, error)
ModifyDBInstance(
ctx context.Context,
id, instanceClass string,
opts DBInstanceModifyOptions,
) (*DBInstance, error)
RebootDBInstance(ctx context.Context, id string) (*DBInstance, error)
// Subnet group operations
CreateDBSubnetGroup(
ctx context.Context,
name, description, vpcID string,
subnetIDs []string,
) (*DBSubnetGroup, error)
DescribeDBSubnetGroups(ctx context.Context, name string) ([]DBSubnetGroup, error)
DeleteDBSubnetGroup(ctx context.Context, name string) error
// Cluster parameter group operations
CreateDBClusterParameterGroup(
ctx context.Context,
name, family, description string,
) (*DBClusterParameterGroup, error)
DescribeDBClusterParameterGroups(
ctx context.Context,
name string,
) ([]DBClusterParameterGroup, error)
DeleteDBClusterParameterGroup(ctx context.Context, name string) error
ModifyDBClusterParameterGroup(
ctx context.Context,
name string,
) (*DBClusterParameterGroup, error)
// Cluster snapshot operations
CreateDBClusterSnapshot(
ctx context.Context,
snapshotID, clusterID string,
) (*DBClusterSnapshot, error)
DescribeDBClusterSnapshots(
ctx context.Context,
snapshotID, clusterID, snapshotTypeFilter string,
) ([]DBClusterSnapshot, error)
DeleteDBClusterSnapshot(ctx context.Context, snapshotID string) (*DBClusterSnapshot, error)
ModifyDBClusterSnapshotAttribute(
ctx context.Context,
snapshotID, attributeName string,
valuesToAdd, valuesToRemove []string,
) (*DBClusterSnapshot, error)
// Tag operations
AddTagsToResource(ctx context.Context, arn string, tags []Tag) error
RemoveTagsFromResource(ctx context.Context, arn string, keys []string) error
ListTagsForResource(ctx context.Context, arn string) ([]Tag, error)
// New operations (Issue #902)
AddRoleToDBCluster(ctx context.Context, clusterID, roleARN string) error
AddSourceIdentifierToSubscription(
ctx context.Context,
name, sourceID string,
) (*EventSubscription, error)
ApplyPendingMaintenanceAction(
ctx context.Context,
resourceID, applyAction, optInType string,
) error
CopyDBClusterParameterGroup(
ctx context.Context,
sourceName, targetName, targetDescription string,
) (*DBClusterParameterGroup, error)
CopyDBClusterSnapshot(
ctx context.Context,
sourceSnapshotID, targetSnapshotID string,
) (*DBClusterSnapshot, error)
CopyDBParameterGroup(
ctx context.Context,
sourceName, targetName, targetDescription string,
) (*DBParameterGroup, error)
CreateDBClusterEndpoint(
ctx context.Context,
endpointID, clusterID, endpointType string,
) (*DBClusterEndpoint, error)
CreateDBParameterGroup(
ctx context.Context,
name, family, description string,
) (*DBParameterGroup, error)
CreateEventSubscription(
ctx context.Context,
name, snsTopicARN, sourceType string,
sourceIDs []string,
enabled bool,
) (*EventSubscription, error)
CreateGlobalCluster(
ctx context.Context,
globalClusterID, sourceDBClusterID string,
) (*GlobalCluster, error)
DescribeGlobalClusters(ctx context.Context) []GlobalCluster
// Cluster endpoint operations
DeleteDBClusterEndpoint(ctx context.Context, endpointID string) (*DBClusterEndpoint, error)
DescribeDBClusterEndpoints(
ctx context.Context,
endpointID, clusterID string,
) ([]DBClusterEndpoint, error)
ModifyDBClusterEndpoint(
ctx context.Context,
endpointID, endpointType string,
) (*DBClusterEndpoint, error)
// DB parameter group operations
DeleteDBParameterGroup(ctx context.Context, name string) error
DescribeDBParameterGroups(ctx context.Context, name string) ([]DBParameterGroup, error)
ModifyDBParameterGroup(ctx context.Context, name string) (*DBParameterGroup, error)
ResetDBParameterGroup(ctx context.Context, name string) (*DBParameterGroup, error)
// Cluster parameter group extended operations
ResetDBClusterParameterGroup(ctx context.Context, name string) (*DBClusterParameterGroup, error)
// Event subscription extended operations
DeleteEventSubscription(ctx context.Context, name string) (*EventSubscription, error)
DescribeEventSubscriptions(ctx context.Context, name string) ([]EventSubscription, error)
ModifyEventSubscription(
ctx context.Context,
name, snsTopicARN, sourceType, enabled string,
eventCategories []string,
) (*EventSubscription, error)
RemoveSourceIdentifierFromSubscription(
ctx context.Context,
name, sourceID string,
) (*EventSubscription, error)
// Global cluster extended operations
DeleteGlobalCluster(ctx context.Context, globalClusterID string) (*GlobalCluster, error)
FailoverGlobalCluster(
ctx context.Context,
globalClusterID, targetDBClusterID string,
) (*GlobalCluster, error)
ModifyGlobalCluster(ctx context.Context, globalClusterID string) (*GlobalCluster, error)
RemoveFromGlobalCluster(
ctx context.Context,
globalClusterID, dbClusterID string,
) (*GlobalCluster, error)
SwitchoverGlobalCluster(
ctx context.Context,
globalClusterID, targetDBClusterID string,
) (*GlobalCluster, error)
// Role operations
RemoveRoleFromDBCluster(ctx context.Context, clusterID, roleARN string) error
// Restore operations
RestoreDBClusterFromSnapshot(
ctx context.Context,
snapshotID, clusterID string,
) (*DBCluster, error)
RestoreDBClusterToPointInTime(
ctx context.Context,
srcClusterID, targetClusterID string,
) (*DBCluster, error)
// Subnet group extended operations
ModifyDBSubnetGroup(ctx context.Context, name, description string, subnetIDs []string) (*DBSubnetGroup, error)
// Lifecycle
Reset()
Region() string
AccountID() string
Snapshot(ctx context.Context) []byte
Restore(ctx context.Context, data []byte) error
}
StorageBackend defines the interface for Neptune backend implementations. All mutating methods must be safe for concurrent use.
Regional operations take a context.Context from which the target AWS region is resolved (see getRegion); same-named resources are isolated per region. Global cluster operations are partition-scoped and ignore the region.
Source Files
¶
- cluster_endpoints.go
- cluster_parameter_groups.go
- cluster_snapshots.go
- db_clusters.go
- db_instances.go
- errors.go
- event_subscriptions.go
- global_clusters.go
- handler.go
- handler_cluster_endpoints.go
- handler_cluster_parameter_groups.go
- handler_cluster_snapshots.go
- handler_db_clusters.go
- handler_db_instances.go
- handler_event_subscriptions.go
- handler_global_clusters.go
- handler_parameter_groups.go
- handler_subnet_groups.go
- handler_tags.go
- interfaces.go
- models.go
- parameter_groups.go
- persistence.go
- provider.go
- store.go
- store_setup.go
- subnet_groups.go
- tags.go