Documentation
¶
Index ¶
- Constants
- Variables
- func ProductionizeUserAgent()
- type AccountManager
- type CloudOperation
- type CloudOperationV1
- type Migration
- type MigrationV1
- type PlanDetailsV1
- type ProvisionRequestDetails
- type ProvisionRequestDetailsV1
- type Service
- type ServiceAccountManager
- type ServiceBindingCredentials
- type ServiceBindingCredentialsV1
- type ServiceBrokerHelper
- type ServiceInstanceDetails
- type ServiceInstanceDetailsV1
- type ServicePlan
Constants ¶
const BigqueryName = "google-bigquery"
const BigtableName = "google-bigtable"
const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
const CloudsqlMySQLName = "google-cloudsql-mysql"
const CloudsqlPostgresName = "google-cloudsql-postgres"
const DatastoreName = "google-datastore"
const MlName = "google-ml-apis"
const PubsubName = "google-pubsub"
const SpannerName = "google-spanner"
const StackdriverDebuggerName = "google-stackdriver-debugger"
const StackdriverProfilerName = "google-stackdriver-profiler"
const StackdriverTraceName = "google-stackdriver-trace"
const StorageName = "google-storage"
Variables ¶
var CustomUserAgent = "cf-gcp-service-broker-test 4.0.0"
This custom user agent string is added to provision calls so that Google can track the aggregated use of this tool We can better advocate for devoting resources to supporting cloud foundry and this service broker if we can show good usage statistics for it, so if you feel the need to fork this repo, please leave this string in place!
Functions ¶
func ProductionizeUserAgent ¶
func ProductionizeUserAgent()
Types ¶
type AccountManager ¶
type AccountManager interface { CreateCredentials(instanceID string, bindingID string, details brokerapi.BindDetails, instance ServiceInstanceDetails) (ServiceBindingCredentials, error) DeleteCredentials(creds ServiceBindingCredentials) error BuildInstanceCredentials(bindRecord ServiceBindingCredentials, instanceRecord ServiceInstanceDetails) (map[string]string, error) }
type CloudOperation ¶
type CloudOperation CloudOperationV1
CloudOperation holds information about the status of Google Cloud long-running operations.
type CloudOperationV1 ¶
type CloudOperationV1 struct { gorm.Model Name string Status string OperationType string ErrorMessage string `gorm:"type:text"` InsertTime string StartTime string TargetId string TargetLink string ServiceId string ServiceInstanceId string }
CloudOperationV1 holds information about the status of Google Cloud long-running operations.
func (CloudOperationV1) TableName ¶
func (CloudOperationV1) TableName() string
TableName returns a consistent table name (`cloud_operations`) for gorm so multiple structs from different versions of the database all operate on the same table.
type Migration ¶
type Migration MigrationV1
Migration represents the mgirations table. It holds a monotonically increasing number that gets incremented with every database schema revision.
type MigrationV1 ¶
MigrationV1 represents the mgirations table. It holds a monotonically increasing number that gets incremented with every database schema revision.
func (MigrationV1) TableName ¶
func (MigrationV1) TableName() string
TableName returns a consistent table name (`migrations`) for gorm so multiple structs from different versions of the database all operate on the same table.
type PlanDetailsV1 ¶
type PlanDetailsV1 struct { ID string `gorm:"primary_key"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time ServiceId string Name string Features string `sql:"type:text"` }
PlanDetailsV1 is a table that was deprecated in favor of using Environment variables. It only remains for ORM migrations and the ability for existing users to export their plans.
func (PlanDetailsV1) TableName ¶
func (PlanDetailsV1) TableName() string
TableName returns a consistent table name (`plan_details`) for gorm so multiple structs from different versions of the database all operate on the same table.
type ProvisionRequestDetails ¶
type ProvisionRequestDetails ProvisionRequestDetailsV1
ProvisionRequestDetails holds user-defined properties passed to a call to provision a service.
type ProvisionRequestDetailsV1 ¶
type ProvisionRequestDetailsV1 struct { gorm.Model ServiceInstanceId string // is a json.Marshal of models.ProvisionDetails RequestDetails string }
ProvisionRequestDetailsV1 holds user-defined properties passed to a call to provision a service.
func (ProvisionRequestDetailsV1) TableName ¶
func (ProvisionRequestDetailsV1) TableName() string
TableName returns a consistent table name (`provision_request_details`) for gorm so multiple structs from different versions of the database all operate on the same table.
type Service ¶
type Service struct { pcfosb.Service Plans []ServicePlan `json:"plans"` }
Service overrides the canonical Service Broker service type using a custom type for Plans, everything else is the same.
type ServiceAccountManager ¶
type ServiceAccountManager interface { AccountManager CreateAccountWithRoles(bindingID string, roles []string) (ServiceBindingCredentials, error) }
type ServiceBindingCredentials ¶
type ServiceBindingCredentials ServiceBindingCredentialsV1
ServiceBindingCredentials holds credentials returned to the users after binding to a service.
func (ServiceBindingCredentials) GetOtherDetails ¶
func (sbc ServiceBindingCredentials) GetOtherDetails() (map[string]string, error)
GetOtherDetails returns an unmarshaled version of the OtherDetails field or errors.
type ServiceBindingCredentialsV1 ¶
type ServiceBindingCredentialsV1 struct { gorm.Model OtherDetails string `gorm:"type:text"` ServiceId string ServiceInstanceId string BindingId string }
ServiceBindingCredentialsV1 holds credentials returned to the users after binding to a service.
func (ServiceBindingCredentialsV1) TableName ¶
func (ServiceBindingCredentialsV1) TableName() string
TableName returns a consistent table name (`service_binding_credentials`) for gorm so multiple structs from different versions of the database all operate on the same table.
type ServiceBrokerHelper ¶
type ServiceBrokerHelper interface { Provision(instanceId string, details brokerapi.ProvisionDetails, plan ServicePlan) (ServiceInstanceDetails, error) Bind(instanceID, bindingID string, details brokerapi.BindDetails) (ServiceBindingCredentials, error) BuildInstanceCredentials(bindRecord ServiceBindingCredentials, instanceRecord ServiceInstanceDetails) (map[string]string, error) Unbind(details ServiceBindingCredentials) error Deprovision(ctx context.Context, instance ServiceInstanceDetails, details brokerapi.DeprovisionDetails) error PollInstance(instanceID string) (bool, error) LastOperationWasDelete(instanceID string) (bool, error) ProvisionsAsync() bool DeprovisionsAsync() bool }
type ServiceInstanceDetails ¶
type ServiceInstanceDetails ServiceInstanceDetailsV1
ServiceInstanceDetails holds information about provisioned services
func (ServiceInstanceDetails) GetOtherDetails ¶
func (si ServiceInstanceDetails) GetOtherDetails() (map[string]string, error)
GetOtherDetails returns an unmarshaled version of the OtherDetails field or errors.
type ServiceInstanceDetailsV1 ¶
type ServiceInstanceDetailsV1 struct { ID string `gorm:"primary_key;type:varchar(255);not null"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time Name string Location string Url string OtherDetails string `gorm:"type:text"` ServiceId string PlanId string SpaceGuid string OrganizationGuid string }
ServiceInstanceDetailsV1 holds information about provisioned services.
func (ServiceInstanceDetailsV1) TableName ¶
func (ServiceInstanceDetailsV1) TableName() string
TableName returns a consistent table name (`service_instance_details`) for gorm so multiple structs from different versions of the database all operate on the same table.
type ServicePlan ¶
type ServicePlan struct { pcfosb.ServicePlan ServiceProperties map[string]string `json:"service_properties"` }
ServicePlan extends the OSB ServicePlan by including a map of key/value pairs that can be used to pass additional information to the back-end.