Documentation ¶
Index ¶
- Constants
- Variables
- func FreeValue(v bool) *bool
- func ProductionizeUserAgent()
- type AccountManager
- type BindDetails
- type BindResource
- type Binding
- type CloudOperation
- type DeprovisionDetails
- type GCPCredentials
- type IsAsync
- type LastOperation
- type LastOperationState
- type Migration
- type PlanDetails
- type PreviousValues
- type ProvisionDetails
- type ProvisionRequestDetails
- type ProvisionedServiceSpec
- type RequiredPermission
- type Service
- type ServiceBindingCredentials
- type ServiceBroker
- type ServiceBrokerHelper
- type ServiceDashboardClient
- type ServiceInstanceDetails
- type ServiceMetadata
- type ServicePlan
- type ServicePlanCost
- type ServicePlanMetadata
- type UnbindDetails
- type UpdateDetails
Constants ¶
View Source
const ( PermissionRouteForwarding = RequiredPermission("route_forwarding") PermissionSyslogDrain = RequiredPermission("syslog_drain") )
View Source
const AppCredsEnvVar = "GOOGLE_APPLICATION_CREDENTIALS"
View Source
const AppCredsFileName = "application-default-credentials.json"
View Source
const BigqueryName = "google-bigquery"
View Source
const BigtableName = "google-bigtable"
View Source
const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
View Source
const CloudsqlName = "google-cloudsql"
View Source
const MlName = "google-ml-apis"
View Source
const PubsubName = "google-pubsub"
View Source
const RootSaEnvVar = "ROOT_SERVICE_ACCOUNT_JSON"
View Source
const SpannerName = "google-spanner"
View Source
const StorageName = "google-storage"
Variables ¶
View Source
var ( ErrInstanceAlreadyExists = errors.New("instance already exists") ErrInstanceDoesNotExist = errors.New("instance does not exist") ErrInstanceLimitMet = errors.New("instance limit for this service has been reached") ErrPlanQuotaExceeded = errors.New("The quota for this service plan has been exceeded. Please contact your Operator for help.") ErrBindingAlreadyExists = errors.New("binding already exists") ErrBindingDoesNotExist = errors.New("binding does not exist") ErrAsyncRequired = errors.New("This service plan requires client support for asynchronous service operations.") ErrServiceIsNotAsync = errors.New("This service is not provisioned asynchronously; this operation does not apply.") ErrPlanChangeNotSupported = errors.New("The requested plan migration cannot be performed") ErrRawParamsInvalid = errors.New("The format of the parameters is not valid JSON") ErrAppGuidNotProvided = errors.New("app_guid is a required field but was not provided") )
View Source
var CustomUserAgent = "cf-gcp-service-broker-test 3.1.2"
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 { CreateAccountInGoogle(instanceID string, bindingID string, details BindDetails, instance ServiceInstanceDetails) (ServiceBindingCredentials, error) DeleteAccountFromGoogle(creds ServiceBindingCredentials) error BuildInstanceCredentials(bindDetails map[string]string, instanceDetails map[string]string) map[string]string }
type BindDetails ¶
type BindDetails struct { AppGUID string `json:"app_guid"` PlanID string `json:"plan_id"` ServiceID string `json:"service_id"` BindResource *BindResource `json:"bind_resource,omitempty"` Parameters map[string]interface{} `json:"parameters,omitempty"` }
type BindResource ¶
type CloudOperation ¶
type DeprovisionDetails ¶
type GCPCredentials ¶
type GCPCredentials struct { Type string `json:"type"` ProjectId string `json:"project_id"` PrivateKeyId string `json:"private_key_id"` PrivateKey string `json:"private_key"` ClientEmail string `json:"client_email"` ClientId string `json:"client_id"` AuthUri string `json:"auth_uri"` TokenUri string `json:"token_uri"` AuthProviderCertUrl string `json:"auth_provider_x509_cert_url"` ClientCertUrl string `json:"client_x509_cert_url"` }
type LastOperation ¶
type LastOperation struct { State LastOperationState Description string }
type LastOperationState ¶
type LastOperationState string
const ( InProgress LastOperationState = "in progress" Succeeded LastOperationState = "succeeded" Failed LastOperationState = "failed" )
type PlanDetails ¶
type PreviousValues ¶
type ProvisionDetails ¶
type ProvisionRequestDetails ¶
type ProvisionedServiceSpec ¶
type RequiredPermission ¶
type RequiredPermission string
type Service ¶
type Service struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Bindable bool `json:"bindable"` Tags []string `json:"tags,omitempty"` PlanUpdatable bool `json:"plan_updateable"` Plans []ServicePlan `json:"plans"` Requires []RequiredPermission `json:"requires,omitempty"` Metadata *ServiceMetadata `json:"metadata,omitempty"` DashboardClient *ServiceDashboardClient `json:"dashboard_client,omitempty"` }
type ServiceBroker ¶
type ServiceBroker interface { Services() []Service Provision(instanceID string, details ProvisionDetails, asyncAllowed bool) (ProvisionedServiceSpec, error) Deprovision(instanceID string, details DeprovisionDetails, asyncAllowed bool) (IsAsync, error) Bind(instanceID, bindingID string, details BindDetails) (Binding, error) Unbind(instanceID, bindingID string, details UnbindDetails) error Update(instanceID string, details UpdateDetails, asyncAllowed bool) (IsAsync, error) LastOperation(instanceID string) (LastOperation, error) }
type ServiceBrokerHelper ¶
type ServiceBrokerHelper interface { Provision(instanceId string, details ProvisionDetails, plan PlanDetails) (ServiceInstanceDetails, error) Bind(instanceID, bindingID string, details BindDetails) (ServiceBindingCredentials, error) BuildInstanceCredentials(bindDetails map[string]string, instanceDetails map[string]string) map[string]string Unbind(details ServiceBindingCredentials) error Deprovision(instanceID string, details DeprovisionDetails) error PollInstance(instanceID string) (bool, error) Async() bool }
type ServiceDashboardClient ¶
type ServiceInstanceDetails ¶
type ServiceMetadata ¶
type ServiceMetadata struct { DisplayName string `json:"displayName,omitempty"` ImageUrl string `json:"imageUrl,omitempty"` LongDescription string `json:"longDescription,omitempty"` ProviderDisplayName string `json:"providerDisplayName,omitempty"` DocumentationUrl string `json:"documentationUrl,omitempty"` SupportUrl string `json:"supportUrl,omitempty"` }
type ServicePlan ¶
type ServicePlan struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Free *bool `json:"free,omitempty"` Metadata *ServicePlanMetadata `json:"metadata,omitempty"` }
type ServicePlanCost ¶
type ServicePlanMetadata ¶
type ServicePlanMetadata struct { DisplayName string `json:"displayName,omitempty"` Bullets []string `json:"bullets,omitempty"` Costs []ServicePlanCost `json:"costs,omitempty"` }
type UnbindDetails ¶
type UpdateDetails ¶
type UpdateDetails struct { ServiceID string `json:"service_id"` PlanID string `json:"plan_id"` Parameters map[string]interface{} `json:"parameters"` PreviousValues PreviousValues `json:"previous_values"` }
Directories ¶
Path | Synopsis |
---|---|
This file was generated by counterfeiter This file was generated by counterfeiter
|
This file was generated by counterfeiter This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.