models

package
v4.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

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 CloudsqlMySQLName = "google-cloudsql-mysql"
View Source
const CloudsqlPostgresName = "google-cloudsql-postgres"
View Source
const DatastoreName = "google-datastore"
View Source
const MlName = "google-ml-apis"
View Source
const PubsubName = "google-pubsub"
View Source
const SpannerName = "google-spanner"
View Source
const StackdriverDebuggerName = "google-stackdriver-debugger"
View Source
const StackdriverProfilerName = "google-stackdriver-profiler"
View Source
const StackdriverTraceName = "google-stackdriver-trace"
View Source
const StorageName = "google-storage"

Variables

View Source
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

type MigrationV1 struct {
	gorm.Model

	MigrationId int `gorm:"type:int(10)"`
}

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.

func (Service) ToPlain

func (s Service) ToPlain() pcfosb.Service

ToPlain converts this service to a plain PCF Service definition.

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.

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