storage

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindRequestDetails

type BindRequestDetails struct {
	ServiceInstanceGUID string
	ServiceBindingGUID  string
	RequestDetails      []byte
}

type Credentials

type Credentials map[string]interface{}

type Encryptor

type Encryptor interface {
	Encrypt(plaintext []byte) ([]byte, error)
	Decrypt(ciphertext []byte) ([]byte, error)
}

type ProvisionRequestDetails

type ProvisionRequestDetails struct {
	ServiceInstanceGUID string
	RequestDetails      []byte
}

type ServiceBindingCredentials

type ServiceBindingCredentials struct {
	ServiceGUID         string
	ServiceInstanceGUID string
	BindingGUID         string
	Credentials         Credentials
}

type ServiceInstanceDetails

type ServiceInstanceDetails struct {
	GUID             string
	Name             string
	Location         string
	URL              string
	Outputs          TerraformOutputs
	ServiceGUID      string
	PlanGUID         string
	SpaceGUID        string
	OrganizationGUID string
	OperationType    string
	OperationGUID    string
}

type Storage

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

func New

func New(db *gorm.DB, encryptor Encryptor) *Storage

func (*Storage) CreateServiceBindingCredentials

func (s *Storage) CreateServiceBindingCredentials(binding ServiceBindingCredentials) error

func (*Storage) DeleteBindRequestDetails

func (s *Storage) DeleteBindRequestDetails(bindingID string, instanceID string) error

func (*Storage) DeleteProvisionRequestDetails

func (s *Storage) DeleteProvisionRequestDetails(serviceInstanceID string) error

func (*Storage) DeleteServiceBindingCredentials

func (s *Storage) DeleteServiceBindingCredentials(bindingID, serviceInstanceID string) error

func (*Storage) DeleteServiceInstanceDetails

func (s *Storage) DeleteServiceInstanceDetails(guid string) error

func (*Storage) DeleteTerraformDeployment

func (s *Storage) DeleteTerraformDeployment(id string) error

func (*Storage) ExistsServiceBindingCredentials

func (s *Storage) ExistsServiceBindingCredentials(bindingID, serviceInstanceID string) (bool, error)

func (*Storage) ExistsServiceInstanceDetails

func (s *Storage) ExistsServiceInstanceDetails(guid string) (bool, error)

func (*Storage) ExistsTerraformDeployment

func (s *Storage) ExistsTerraformDeployment(id string) (bool, error)

func (*Storage) GetBindRequestDetails

func (s *Storage) GetBindRequestDetails(bindingID string, instanceID string) (json.RawMessage, error)

func (*Storage) GetProvisionRequestDetails

func (s *Storage) GetProvisionRequestDetails(serviceInstanceID string) (json.RawMessage, error)

func (*Storage) GetServiceBindingCredentials

func (s *Storage) GetServiceBindingCredentials(bindingID, serviceInstanceID string) (ServiceBindingCredentials, error)

func (*Storage) GetServiceInstanceDetails

func (s *Storage) GetServiceInstanceDetails(guid string) (ServiceInstanceDetails, error)

func (*Storage) GetTerraformDeployment

func (s *Storage) GetTerraformDeployment(id string) (TerraformDeployment, error)

func (*Storage) StoreBindRequestDetails

func (s *Storage) StoreBindRequestDetails(bindRequestDetails BindRequestDetails) error

func (*Storage) StoreProvisionRequestDetails

func (s *Storage) StoreProvisionRequestDetails(serviceInstanceID string, details json.RawMessage) error

func (*Storage) StoreServiceInstanceDetails

func (s *Storage) StoreServiceInstanceDetails(d ServiceInstanceDetails) error

func (*Storage) StoreTerraformDeployment

func (s *Storage) StoreTerraformDeployment(t TerraformDeployment) error

func (*Storage) UpdateAllRecords

func (s *Storage) UpdateAllRecords() error

type TerraformDeployment

type TerraformDeployment struct {
	ID                   string
	Workspace            []byte
	LastOperationType    string
	LastOperationState   string
	LastOperationMessage string
}

type TerraformOutputs

type TerraformOutputs map[string]interface{}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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