storage

package
v2.0.2 Latest Latest
Warning

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

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

Documentation

Overview

Package storage implements a Database Access Object (DAO)

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      JSONObject
}

type Encryptor

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

type JSONObject

type JSONObject map[string]any

type ServiceBindingCredentials

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

type ServiceInstanceDetails

type ServiceInstanceDetails struct {
	GUID             string
	Name             string
	Location         string
	URL              string
	Outputs          JSONObject
	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) CheckAllRecords

func (s *Storage) CheckAllRecords() error

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) GetAllTerraformDeployments

func (s *Storage) GetAllTerraformDeployments() ([]TerraformDeploymentListEntry, error)

func (*Storage) GetBindRequestDetails

func (s *Storage) GetBindRequestDetails(bindingID string, instanceID string) (JSONObject, error)

func (*Storage) GetProvisionRequestDetails

func (s *Storage) GetProvisionRequestDetails(serviceInstanceID string) (JSONObject, error)

func (*Storage) GetServiceBindingCredentials

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

func (*Storage) GetServiceBindingIDsForServiceInstance

func (s *Storage) GetServiceBindingIDsForServiceInstance(serviceInstanceID string) ([]string, error)

func (*Storage) GetServiceInstanceDetails

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

func (*Storage) GetServiceInstancesIDs

func (s *Storage) GetServiceInstancesIDs() (ids []string, err 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 JSONObject) 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            workspace.Workspace
	LastOperationType    string
	LastOperationState   string
	LastOperationMessage string
}

func (*TerraformDeployment) TFWorkspace

func (deployment *TerraformDeployment) TFWorkspace() *workspace.TerraformWorkspace

type TerraformDeploymentListEntry

type TerraformDeploymentListEntry struct {
	ID                   string
	LastOperationType    string
	LastOperationState   string
	LastOperationMessage string
	StateVersion         *version.Version
	UpdatedAt            time.Time
}

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