helpers

package
v1.59.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BodyBytes

func BodyBytes(resp *http.Response) ([]byte, error)

func CleanUpParameterGroups added in v0.27.0

func CleanUpParameterGroups(prefix string, session *session.Session, logger lager.Logger) error

func CleanUpTestDatabaseInstances added in v0.27.0

func CleanUpTestDatabaseInstances(prefix string, awsSession *session.Session, logger lager.Logger) ([]string, error)

func CreateSecurityGroup

func CreateSecurityGroup(prefix string, session *session.Session) (*string, error)

func CreateSubnetGroup

func CreateSubnetGroup(prefix string, session *session.Session) (*string, error)

func DestroySecurityGroup

func DestroySecurityGroup(id *string, session *session.Session, logger lager.Logger) error

func DestroySubnetGroup

func DestroySubnetGroup(name *string, session *session.Session, logger lager.Logger) error

func GetRDSStatus added in v1.47.0

func GetRDSStatus(instanceID string, session *session.Session) (string, error)

func WaitForDatabasesToBeDeleted added in v0.48.0

func WaitForDatabasesToBeDeleted(ids []string, awsSession *session.Session, logger lager.Logger) error

Types

type BrokerAPIClient

type BrokerAPIClient struct {
	Url                    string
	Username               string
	Password               string
	AcceptsIncomplete      bool
	AcceptsSelfSignedCerts bool
}

func NewBrokerAPIClient

func NewBrokerAPIClient(Url string, Username string, Password string) *BrokerAPIClient

func (*BrokerAPIClient) BindService added in v1.18.0

func (b *BrokerAPIClient) BindService(instanceID, serviceID, planID, appGUID, bindingID string) (int, *apiresponses.BindingResponse, error)

func (*BrokerAPIClient) DeprovisionInstance

func (b *BrokerAPIClient) DeprovisionInstance(instanceID, serviceID, planID string) (responseCode int, operation string, err error)

func (*BrokerAPIClient) DoBindRequest

func (b *BrokerAPIClient) DoBindRequest(instanceID, serviceID, planID, appGUID, bindingID string) (*http.Response, error)

func (*BrokerAPIClient) DoDeprovisionRequest

func (b *BrokerAPIClient) DoDeprovisionRequest(instanceID, serviceID, planID string) (*http.Response, error)

func (*BrokerAPIClient) DoGetInstanceRequest added in v1.36.0

func (b *BrokerAPIClient) DoGetInstanceRequest(instanceID, serviceID, planID string) (*http.Response, error)

func (*BrokerAPIClient) DoLastOperationRequest

func (b *BrokerAPIClient) DoLastOperationRequest(instanceID, serviceID, planID, operation string) (*http.Response, error)

func (*BrokerAPIClient) DoProvisionRequest

func (b *BrokerAPIClient) DoProvisionRequest(instanceID, serviceID, planID string, paramJSON string) (*http.Response, error)

func (*BrokerAPIClient) DoUnbindRequest

func (b *BrokerAPIClient) DoUnbindRequest(instanceID, serviceID, planID, bindingID string) (*http.Response, error)

func (*BrokerAPIClient) DoUpdateRequest

func (b *BrokerAPIClient) DoUpdateRequest(instanceID, serviceID, planID string, newPlanID string, paramJSON string) (*http.Response, error)

func (*BrokerAPIClient) GetCatalog

func (*BrokerAPIClient) GetInstance added in v1.36.0

func (b *BrokerAPIClient) GetInstance(instanceID, serviceID, planID string) (int, *apiresponses.GetInstanceResponse, error)

func (*BrokerAPIClient) GetLastOperationState

func (b *BrokerAPIClient) GetLastOperationState(instanceID, serviceID, planID, operation string) (string, error)

func (*BrokerAPIClient) ProvisionInstance

func (b *BrokerAPIClient) ProvisionInstance(instanceID, serviceID, planID string, paramJSON string) (responseCode int, operation string, err error)

func (*BrokerAPIClient) UnbindService added in v1.18.0

func (b *BrokerAPIClient) UnbindService(instanceID, serviceID, planID, bindingID string) (int, *apiresponses.UnbindResponse, error)

func (*BrokerAPIClient) UpdateInstance

func (b *BrokerAPIClient) UpdateInstance(instanceID, serviceID, planID string, newPlanID string, paramJSON string) (responseCode int, operation string, description string, err error)

type ByServiceID

type ByServiceID []domain.Service

func (ByServiceID) Len

func (a ByServiceID) Len() int

func (ByServiceID) Less

func (a ByServiceID) Less(i, j int) bool

func (ByServiceID) Swap

func (a ByServiceID) Swap(i, j int)

type CleanFunc added in v0.22.0

type CleanFunc func()

type LastOperationResponse

type LastOperationResponse struct {
	State       string `json:"state,omitempty"`
	Description string `json:"description,omitempty"`
}

type ProvisionFunc added in v0.22.0

type ProvisionFunc func() (WaitFunc, CleanFunc)

type ProvisionManager added in v0.22.0

type ProvisionManager struct {
	Provisioner ProvisionFunc
	// contains filtered or unexported fields
}

ProvisionManager performs the provisioning. It gets a Provisioner function that should do the creating and returns:

  • a function that would synchronously wait for the thing to finish
  • a function that would clean up whatever is created

It allows to optionally wait for the creation to finish or cleanup only once.

func (*ProvisionManager) CleanUp added in v0.22.0

func (p *ProvisionManager) CleanUp()

func (*ProvisionManager) Provision added in v0.22.0

func (p *ProvisionManager) Provision()

func (*ProvisionManager) Wait added in v0.22.0

func (p *ProvisionManager) Wait()

type ProvisioningResponse

type ProvisioningResponse struct {
	DashboardURL string `json:"dashboard_url,omitempty"`
	Operation    string `json:"operation,omitempty"`
	Description  string `json:"description,omitempty"`
}

type RDSClient

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

func NewRDSClient

func NewRDSClient(region string, dbPrefix string) (*RDSClient, error)

func (*RDSClient) CreateDBSnapshot added in v0.22.0

func (r *RDSClient) CreateDBSnapshot(ID string) (string, error)

func (*RDSClient) DBInstanceFinalSnapshotIdentifier added in v0.22.0

func (b *RDSClient) DBInstanceFinalSnapshotIdentifier(instanceID string) string

func (*RDSClient) DbInstanceIdentifier added in v1.47.0

func (b *RDSClient) DbInstanceIdentifier(instanceID string) string

func (*RDSClient) DeleteDBSnapshot added in v0.22.0

func (r *RDSClient) DeleteDBSnapshot(snapshotID string) (*rds.DeleteDBSnapshotOutput, error)

func (*RDSClient) GetDBInstanceDetails added in v0.20.0

func (r *RDSClient) GetDBInstanceDetails(ID string) (*rds.DescribeDBInstancesOutput, error)

func (*RDSClient) GetDBInstanceTag added in v1.23.0

func (r *RDSClient) GetDBInstanceTag(ID, tagKey string) (string, error)

func (*RDSClient) GetDBSnapshot added in v0.22.0

func (r *RDSClient) GetDBSnapshot(snapshotID string) (*rds.DescribeDBSnapshotsOutput, error)

func (*RDSClient) Ping

func (r *RDSClient) Ping() (bool, error)

func (*RDSClient) UpgradeEngine added in v1.43.0

func (r *RDSClient) UpgradeEngine(ID string, engineVersion string, parameterGroupFamily string) error

type WaitFunc added in v0.22.0

type WaitFunc func()

Jump to

Keyboard shortcuts

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