types

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0, BSD-3-Clause, MIT Imports: 15 Imported by: 22

Documentation

Overview

  • Copyright 2018 The Service Manager Authors *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

Package types contains the Service Manager web entities

Package types contains the Service Manager web entities

Package types contains the Service Manager web entities

Index

Constants

View Source
const (
	// CREATED represents a notification type for creating a resource
	CREATED NotificationOperation = "CREATED"

	// MODIFIED represents a notification type for modifying a resource
	MODIFIED NotificationOperation = "MODIFIED"

	// DELETED represents a notification type for deleting a resource
	DELETED NotificationOperation = "DELETED"

	// InvalidRevision revision with invalid value
	InvalidRevision int64 = -1
)
View Source
const CFPlatformType = "cloudfoundry"
View Source
const K8sPlatformType = "kubernetes"
View Source
const SMPlatform = "service-manager"

Variables

This section is empty.

Functions

func Equals added in v0.9.6

func Equals(obj, other Object) bool

func GetSMSupportedPlatformType added in v0.13.0

func GetSMSupportedPlatformType() string

func SetSMSupportedPlatformType added in v0.13.0

func SetSMSupportedPlatformType(typee string)

Types

type Base added in v0.2.0

type Base struct {
	ID             string    `json:"id"`
	CreatedAt      time.Time `json:"created_at"`
	UpdatedAt      time.Time `json:"updated_at"`
	Labels         Labels    `json:"labels,omitempty"`
	PagingSequence int64     `json:"-"`
	Ready          bool      `json:"ready"`

	LastOperation *Operation `json:"last_operation,omitempty"`
}

func (*Base) GetCreatedAt added in v0.2.0

func (b *Base) GetCreatedAt() time.Time

func (*Base) GetID added in v0.2.0

func (b *Base) GetID() string

func (*Base) GetLabels added in v0.2.0

func (b *Base) GetLabels() Labels

func (*Base) GetLastOperation added in v0.12.0

func (b *Base) GetLastOperation() *Operation

func (*Base) GetPagingSequence added in v0.6.0

func (b *Base) GetPagingSequence() int64

func (*Base) GetReady added in v0.10.0

func (b *Base) GetReady() bool

func (*Base) GetUpdatedAt added in v0.2.0

func (b *Base) GetUpdatedAt() time.Time

func (*Base) SetCreatedAt added in v0.2.0

func (b *Base) SetCreatedAt(time time.Time)

func (*Base) SetID added in v0.2.0

func (b *Base) SetID(id string)

func (*Base) SetLabels added in v0.2.0

func (b *Base) SetLabels(labels Labels)

func (*Base) SetLastOperation added in v0.12.0

func (b *Base) SetLastOperation(op *Operation)

func (*Base) SetReady added in v0.10.0

func (b *Base) SetReady(ready bool)

func (*Base) SetUpdatedAt added in v0.2.0

func (b *Base) SetUpdatedAt(time time.Time)

type Basic

type Basic struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

Basic basic credentials

type BrokerPlatformCredential added in v0.11.0

type BrokerPlatformCredential struct {
	Base

	Username        string `json:"username"`
	PasswordHash    string `json:"password_hash"`
	OldUsername     string `json:"old_username"`
	OldPasswordHash string `json:"old_password_hash"`

	PlatformID string `json:"platform_id"`
	BrokerID   string `json:"broker_id"`

	NotificationID string `json:"notification_id,omitempty"`
	Integrity      []byte `json:"-"`
}

BrokerPlatformCredential struct

func (*BrokerPlatformCredential) Decrypt added in v0.11.0

func (e *BrokerPlatformCredential) Decrypt(ctx context.Context, decryptionFunc func(context.Context, []byte) ([]byte, error)) error

func (*BrokerPlatformCredential) Encrypt added in v0.11.0

func (e *BrokerPlatformCredential) Encrypt(ctx context.Context, encryptionFunc func(context.Context, []byte) ([]byte, error)) error

func (*BrokerPlatformCredential) Equals added in v0.11.0

func (e *BrokerPlatformCredential) Equals(obj Object) bool

func (*BrokerPlatformCredential) GetIntegrity added in v0.11.0

func (e *BrokerPlatformCredential) GetIntegrity() []byte

func (*BrokerPlatformCredential) GetType added in v0.11.0

func (e *BrokerPlatformCredential) GetType() ObjectType

func (*BrokerPlatformCredential) IntegralData added in v0.11.0

func (e *BrokerPlatformCredential) IntegralData() []byte

func (*BrokerPlatformCredential) MarshalJSON added in v0.11.0

func (e *BrokerPlatformCredential) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*BrokerPlatformCredential) SetIntegrity added in v0.11.0

func (e *BrokerPlatformCredential) SetIntegrity(integrity []byte)

func (*BrokerPlatformCredential) Validate added in v0.11.0

func (e *BrokerPlatformCredential) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type BrokerPlatformCredentials added in v0.11.0

type BrokerPlatformCredentials struct {
	BrokerPlatformCredentials []*BrokerPlatformCredential `json:"broker_platform_credentials"`
}

func (*BrokerPlatformCredentials) Add added in v0.11.0

func (e *BrokerPlatformCredentials) Add(object Object)

func (*BrokerPlatformCredentials) ItemAt added in v0.11.0

func (e *BrokerPlatformCredentials) ItemAt(index int) Object

func (*BrokerPlatformCredentials) Len added in v0.11.0

func (e *BrokerPlatformCredentials) Len() int

type Credentials

type Credentials struct {
	Basic     *Basic `json:"basic,omitempty"`
	TLS       *TLS   `json:"tls,omitempty"`
	Integrity []byte `json:"-"`
}

Credentials credentials

func GenerateCredentials

func GenerateCredentials() (*Credentials, error)

GenerateCredentials return user and password

func (*Credentials) MarshalJSON added in v0.1.2

func (c *Credentials) MarshalJSON() ([]byte, error)

func (*Credentials) Validate

func (c *Credentials) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type InstanceUpdateValues added in v0.10.3

type InstanceUpdateValues struct {
	ServiceInstance *ServiceInstance `json:"instance"`
	LabelChanges    LabelChanges     `json:"label_changes"`
}

type LabelChange added in v0.10.3

type LabelChange struct {
	Operation LabelOperation `json:"op"`
	Key       string         `json:"key"`
	Values    []string       `json:"values"`
}

LabelChange represents the changes that should be performed to a label

func (*LabelChange) Validate added in v0.10.3

func (lc *LabelChange) Validate() error

type LabelChanges added in v0.10.3

type LabelChanges []*LabelChange

func (*LabelChanges) Validate added in v0.10.3

func (lc *LabelChanges) Validate() error

type LabelOperation added in v0.10.3

type LabelOperation string

LabelOperation is an operation to be performed on labels

const (
	// AddLabelOperation takes a label and adds it to the entity's labels
	AddLabelOperation LabelOperation = "add"
	// AddLabelValuesOperation takes a key and values and adds the values to the label with this key
	AddLabelValuesOperation LabelOperation = "add_values"
	// RemoveLabelOperation takes a key and removes the label with this key
	RemoveLabelOperation LabelOperation = "remove"
	// RemoveLabelValuesOperation takes a key and values and removes the values from the label with this key
	RemoveLabelValuesOperation LabelOperation = "remove_values"
)

func (LabelOperation) RequiresValues added in v0.10.3

func (o LabelOperation) RequiresValues() bool

RequiresValues returns true if the operation requires values to be provided

type Labels added in v0.1.8

type Labels map[string][]string

Labels represents key values pairs associated with resources

func (Labels) Validate added in v0.1.8

func (l Labels) Validate() error

type Notification added in v0.3.0

type Notification struct {
	Base
	Resource      ObjectType            `json:"resource"`
	Type          NotificationOperation `json:"type"`
	PlatformID    string                `json:"platform_id,omitempty"`
	Revision      int64                 `json:"revision"`
	Payload       json.RawMessage       `json:"payload"`
	CorrelationID string                `json:"correlation_id"`
}

Notification struct

func (*Notification) Equals added in v0.9.6

func (e *Notification) Equals(obj Object) bool

func (*Notification) GetType added in v0.3.0

func (e *Notification) GetType() ObjectType

func (*Notification) MarshalJSON added in v0.3.0

func (e *Notification) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*Notification) Validate added in v0.3.0

func (n *Notification) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type NotificationOperation added in v0.9.0

type NotificationOperation string

NotificationOperation is the notification type

type Notifications added in v0.3.0

type Notifications struct {
	Notifications []*Notification `json:"notifications"`
}

func (*Notifications) Add added in v0.3.0

func (e *Notifications) Add(object Object)

func (*Notifications) ItemAt added in v0.3.0

func (e *Notifications) ItemAt(index int) Object

func (*Notifications) Len added in v0.3.0

func (e *Notifications) Len() int

type Object added in v0.2.0

type Object interface {
	util.InputValidator

	Equals(object Object) bool
	SetID(id string)
	GetID() string
	GetType() ObjectType
	GetLabels() Labels
	SetLabels(labels Labels)
	SetCreatedAt(time time.Time)
	GetCreatedAt() time.Time
	SetUpdatedAt(time time.Time)
	GetUpdatedAt() time.Time
	GetPagingSequence() int64
	SetReady(bool)
	GetReady() bool
	SetLastOperation(*Operation)
	GetLastOperation() *Operation
}

Object is the common interface that all resources in the Service Manager must implement

type ObjectArray added in v0.9.4

type ObjectArray struct {
	Objects []Object
}

ObjectArray is an ObjectList backed by a slice of Object's

func NewObjectArray added in v0.9.4

func NewObjectArray(objects ...Object) *ObjectArray

func (*ObjectArray) Add added in v0.9.4

func (a *ObjectArray) Add(object Object)

func (*ObjectArray) ItemAt added in v0.9.4

func (a *ObjectArray) ItemAt(index int) Object

func (*ObjectArray) Len added in v0.9.4

func (a *ObjectArray) Len() int

type ObjectList added in v0.2.0

type ObjectList interface {
	Add(object Object)
	ItemAt(index int) Object
	Len() int
}

ObjectList is the interface that lists of objects must implement

type ObjectPage added in v0.6.0

type ObjectPage struct {
	//Token represents the base64 encoded paging_sequence of the last entity in items list
	Token      string   `json:"token,omitempty"`
	ItemsCount int      `json:"num_items"`
	Items      []Object `json:"items"`
}

ObjectPage is the DTO for a given page of resources when listing

type ObjectType added in v0.2.0

type ObjectType string

ObjectType is the type of the object in the Service Manager

const BrokerPlatformCredentialType ObjectType = web.BrokerPlatformCredentialsURL
const NotificationType ObjectType = web.NotificationsURL
const OperationType ObjectType = web.OperationsURL
const PlatformType ObjectType = web.PlatformsURL
const ServiceBindingType ObjectType = web.ServiceBindingsURL
const ServiceBrokerType ObjectType = web.ServiceBrokersURL
const ServiceInstanceType ObjectType = web.ServiceInstancesURL
const ServiceOfferingType ObjectType = web.ServiceOfferingsURL
const ServicePlanType ObjectType = web.ServicePlansURL
const VisibilityType ObjectType = web.VisibilitiesURL

func (ObjectType) String added in v0.9.0

func (ot ObjectType) String() string

type Operation added in v0.9.0

type Operation struct {
	Base
	Description         string            `json:"description,omitempty"`
	Type                OperationCategory `json:"type"`
	State               OperationState    `json:"state"`
	ResourceID          string            `json:"resource_id"`
	TransitiveResources []*RelatedType    `json:"transitive_resources,omitempty"`
	ResourceType        ObjectType        `json:"resource_type"`
	Errors              json.RawMessage   `json:"errors,omitempty"`
	PlatformID          string            `json:"platform_id"`
	CorrelationID       string            `json:"correlation_id"`
	ExternalID          string            `json:"-"`

	// Reschedule specifies that the operation has reached a state after which it can be retried (checkpoint)
	Reschedule bool `json:"reschedule"`
	// RescheduleTimestamp is the time when an operation became reschedulable=true for the first time
	RescheduleTimestamp time.Time `json:"reschedule_timestamp,omitempty"`
	// DeletionScheduled specifies the time when an operation was marked for deletion
	DeletionScheduled time.Time `json:"deletion_scheduled,omitempty"`
}

Operation struct

func (*Operation) Equals added in v0.9.6

func (e *Operation) Equals(obj Object) bool

func (*Operation) GetType added in v0.9.0

func (e *Operation) GetType() ObjectType

func (*Operation) MarshalJSON added in v0.9.0

func (e *Operation) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*Operation) Validate added in v0.9.0

func (o *Operation) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type OperationCategory added in v0.9.0

type OperationCategory string

OperationCategory is the type of an operation

const (
	// CREATE represents an operation type for creating a resource
	CREATE OperationCategory = "create"

	// UPDATE represents an operation type for updating a resource
	UPDATE OperationCategory = "update"

	// DELETE represents an operation type for deleting a resource
	DELETE OperationCategory = "delete"
)

type OperationState added in v0.9.0

type OperationState string

OperationState is the state of an operation

const (
	// SUCCEEDED represents the state of an operation after successful execution
	SUCCEEDED OperationState = "succeeded"

	// IN_PROGRESS represents the state of an operation after execution has started but has not yet finished
	IN_PROGRESS OperationState = "in progress"

	// FAILED represents the state of an operation after unsuccessful execution
	FAILED OperationState = "failed"
)

type Operations added in v0.9.0

type Operations struct {
	Operations []*Operation `json:"operations"`
}

func (*Operations) Add added in v0.9.0

func (e *Operations) Add(object Object)

func (*Operations) ItemAt added in v0.9.0

func (e *Operations) ItemAt(index int) Object

func (*Operations) Len added in v0.9.0

func (e *Operations) Len() int

type Platform

type Platform struct {
	Base
	Secured     `json:"-"`
	Strip       `json:"-"`
	Type        string       `json:"type"`
	Name        string       `json:"name"`
	Description string       `json:"description"`
	Credentials *Credentials `json:"credentials,omitempty"`
	Active      bool         `json:"-"`
	LastActive  time.Time    `json:"-"`
}

Platform platform struct

func (*Platform) Decrypt added in v0.10.0

func (e *Platform) Decrypt(ctx context.Context, decryptionFunc func(context.Context, []byte) ([]byte, error)) error

func (*Platform) Encrypt added in v0.10.0

func (e *Platform) Encrypt(ctx context.Context, encryptionFunc func(context.Context, []byte) ([]byte, error)) error

func (*Platform) Equals added in v0.9.6

func (e *Platform) Equals(obj Object) bool

func (*Platform) GetIntegrity added in v0.11.0

func (e *Platform) GetIntegrity() []byte

func (*Platform) GetType added in v0.2.0

func (e *Platform) GetType() ObjectType

func (*Platform) IntegralData added in v0.11.0

func (e *Platform) IntegralData() []byte

func (*Platform) MarshalJSON

func (e *Platform) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*Platform) Sanitize added in v0.10.0

func (e *Platform) Sanitize()

func (*Platform) SetIntegrity added in v0.11.0

func (e *Platform) SetIntegrity(integrity []byte)

func (*Platform) Validate

func (e *Platform) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type Platforms added in v0.2.0

type Platforms struct {
	Platforms []*Platform `json:"platforms"`
}

func (*Platforms) Add added in v0.2.0

func (e *Platforms) Add(object Object)

func (*Platforms) ItemAt added in v0.2.0

func (e *Platforms) ItemAt(index int) Object

func (*Platforms) Len added in v0.2.0

func (e *Platforms) Len() int

type RelatedType added in v0.12.0

type RelatedType struct {
	ID            string            `json:"id,omitempty"`
	Criteria      interface{}       `json:"criteria,omitempty"`
	Type          ObjectType        `json:"type"`
	OperationType OperationCategory `json:"operation_type"`
}

type Secured added in v0.2.0

type Secured interface {
	Encrypt(context.Context, func(context.Context, []byte) ([]byte, error)) error
	Decrypt(context.Context, func(context.Context, []byte) ([]byte, error)) error
}

Secured interface indicates that an object needs to be processed before stored/retrieved to/from storage

type ServiceBinding added in v0.10.0

type ServiceBinding struct {
	Base
	Secured           `json:"-"`
	Name              string                 `json:"name"`
	ServiceInstanceID string                 `json:"service_instance_id"`
	SyslogDrainURL    string                 `json:"syslog_drain_url,omitempty"`
	RouteServiceURL   string                 `json:"route_service_url,omitempty"`
	VolumeMounts      json.RawMessage        `json:"volume_mounts,omitempty"`
	Endpoints         json.RawMessage        `json:"endpoints,omitempty"`
	Context           json.RawMessage        `json:"context,omitempty"`
	BindResource      json.RawMessage        `json:"bind_resource,omitempty"`
	Credentials       json.RawMessage        `json:"credentials,omitempty"`
	Parameters        map[string]interface{} `json:"parameters,omitempty"`

	Integrity []byte `json:"-"`
}

ServiceBinding struct

func (*ServiceBinding) Decrypt added in v0.10.0

func (e *ServiceBinding) Decrypt(ctx context.Context, decryptionFunc func(context.Context, []byte) ([]byte, error)) error

func (*ServiceBinding) Encrypt added in v0.10.0

func (e *ServiceBinding) Encrypt(ctx context.Context, encryptionFunc func(context.Context, []byte) ([]byte, error)) error

func (*ServiceBinding) Equals added in v0.10.0

func (e *ServiceBinding) Equals(obj Object) bool

func (*ServiceBinding) GetIntegrity added in v0.11.0

func (e *ServiceBinding) GetIntegrity() []byte

func (*ServiceBinding) GetType added in v0.10.0

func (e *ServiceBinding) GetType() ObjectType

func (*ServiceBinding) IntegralData added in v0.11.0

func (e *ServiceBinding) IntegralData() []byte

func (*ServiceBinding) MarshalJSON added in v0.10.0

func (e *ServiceBinding) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*ServiceBinding) SetIntegrity added in v0.11.0

func (e *ServiceBinding) SetIntegrity(integrity []byte)

func (*ServiceBinding) Validate added in v0.10.0

func (e *ServiceBinding) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type ServiceBindings added in v0.10.0

type ServiceBindings struct {
	ServiceBindings []*ServiceBinding `json:"service_bindings"`
}

func (*ServiceBindings) Add added in v0.10.0

func (e *ServiceBindings) Add(object Object)

func (*ServiceBindings) ItemAt added in v0.10.0

func (e *ServiceBindings) ItemAt(index int) Object

func (*ServiceBindings) Len added in v0.10.0

func (e *ServiceBindings) Len() int

type ServiceBroker added in v0.2.0

type ServiceBroker struct {
	Base
	Secured     `json:"-"`
	Strip       `json:"-"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	BrokerURL   string             `json:"broker_url"`
	Credentials *Credentials       `json:"credentials,omitempty"`
	Catalog     json.RawMessage    `json:"-"`
	Services    []*ServiceOffering `json:"-"`
}

ServiceBroker broker struct

func (*ServiceBroker) Decrypt added in v0.10.0

func (e *ServiceBroker) Decrypt(ctx context.Context, decryptionFunc func(context.Context, []byte) ([]byte, error)) error

func (*ServiceBroker) Encrypt added in v0.10.0

func (e *ServiceBroker) Encrypt(ctx context.Context, encryptionFunc func(context.Context, []byte) ([]byte, error)) error

func (*ServiceBroker) Equals added in v0.9.6

func (e *ServiceBroker) Equals(obj Object) bool

func (*ServiceBroker) GetIntegrity added in v0.11.0

func (e *ServiceBroker) GetIntegrity() []byte

func (*ServiceBroker) GetTLSConfig added in v0.12.0

func (e *ServiceBroker) GetTLSConfig() (*tls.Config, error)

func (*ServiceBroker) GetType added in v0.2.0

func (e *ServiceBroker) GetType() ObjectType

func (*ServiceBroker) IntegralData added in v0.11.0

func (e *ServiceBroker) IntegralData() []byte

func (*ServiceBroker) MarshalJSON added in v0.2.0

func (e *ServiceBroker) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*ServiceBroker) Sanitize added in v0.10.0

func (e *ServiceBroker) Sanitize()

func (*ServiceBroker) SetIntegrity added in v0.11.0

func (e *ServiceBroker) SetIntegrity(integrity []byte)

func (*ServiceBroker) Validate added in v0.2.0

func (e *ServiceBroker) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type ServiceBrokers added in v0.2.0

type ServiceBrokers struct {
	ServiceBrokers []*ServiceBroker `json:"service_brokers"`
}

func (*ServiceBrokers) Add added in v0.2.0

func (e *ServiceBrokers) Add(object Object)

func (*ServiceBrokers) ItemAt added in v0.2.0

func (e *ServiceBrokers) ItemAt(index int) Object

func (*ServiceBrokers) Len added in v0.2.0

func (e *ServiceBrokers) Len() int

type ServiceInstance added in v0.9.0

type ServiceInstance struct {
	Base
	Name            string               `json:"name"`
	ServicePlanID   string               `json:"service_plan_id"`
	PlatformID      string               `json:"platform_id"`
	DashboardURL    string               `json:"dashboard_url,omitempty"`
	MaintenanceInfo json.RawMessage      `json:"maintenance_info,omitempty"`
	Context         json.RawMessage      `json:"context,omitempty"`
	UpdateValues    InstanceUpdateValues `json:"-"`
	PreviousValues  json.RawMessage      `json:"-"`

	Parameters map[string]interface{} `json:"parameters,omitempty"`
	Usable     bool                   `json:"usable"`
}

ServiceInstance struct

func (*ServiceInstance) Equals added in v0.9.6

func (e *ServiceInstance) Equals(obj Object) bool

func (*ServiceInstance) GetType added in v0.9.0

func (e *ServiceInstance) GetType() ObjectType

func (*ServiceInstance) MarshalJSON added in v0.9.0

func (e *ServiceInstance) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*ServiceInstance) Validate added in v0.9.0

func (e *ServiceInstance) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type ServiceInstances added in v0.9.0

type ServiceInstances struct {
	ServiceInstances []*ServiceInstance `json:"service_instances"`
}

func (*ServiceInstances) Add added in v0.9.0

func (e *ServiceInstances) Add(object Object)

func (*ServiceInstances) ItemAt added in v0.9.0

func (e *ServiceInstances) ItemAt(index int) Object

func (*ServiceInstances) Len added in v0.9.0

func (e *ServiceInstances) Len() int

type ServiceOffering added in v0.1.2

type ServiceOffering struct {
	Base

	Name                 string `json:"name"`
	Description          string `json:"description"`
	Bindable             bool   `json:"bindable"`
	InstancesRetrievable bool   `json:"instances_retrievable"`
	BindingsRetrievable  bool   `json:"bindings_retrievable"`
	PlanUpdatable        bool   `json:"plan_updateable"`
	AllowContextUpdates  bool   `json:"allow_context_updates"`

	Tags     json.RawMessage `json:"tags,omitempty"`
	Requires json.RawMessage `json:"requires,omitempty"`
	Metadata json.RawMessage `json:"metadata,omitempty"`

	BrokerID    string `json:"broker_id"`
	CatalogID   string `json:"catalog_id"`
	CatalogName string `json:"catalog_name"`

	Plans []*ServicePlan `json:"plans"`
}

Service Offering struct

func (*ServiceOffering) Equals added in v0.9.6

func (e *ServiceOffering) Equals(obj Object) bool

func (*ServiceOffering) GetType added in v0.2.0

func (e *ServiceOffering) GetType() ObjectType

func (*ServiceOffering) MarshalJSON added in v0.1.2

func (e *ServiceOffering) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*ServiceOffering) Validate added in v0.1.2

func (e *ServiceOffering) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type ServiceOfferings added in v0.1.6

type ServiceOfferings struct {
	ServiceOfferings []*ServiceOffering `json:"service_offerings"`
}

func (*ServiceOfferings) Add added in v0.2.0

func (e *ServiceOfferings) Add(object Object)

func (*ServiceOfferings) ItemAt added in v0.2.0

func (e *ServiceOfferings) ItemAt(index int) Object

func (*ServiceOfferings) Len added in v0.2.0

func (e *ServiceOfferings) Len() int

type ServicePlan added in v0.1.2

type ServicePlan struct {
	Base
	Name        string `json:"name"`
	Description string `json:"description"`

	CatalogID     string `json:"catalog_id"`
	CatalogName   string `json:"catalog_name"`
	Free          bool   `json:"free"`
	Bindable      *bool  `json:"bindable,omitempty"`
	PlanUpdatable *bool  `json:"plan_updateable,omitempty"`

	Metadata               json.RawMessage `json:"metadata,omitempty"`
	Schemas                json.RawMessage `json:"schemas,omitempty"`
	MaximumPollingDuration int             `json:"maximum_polling_duration,omitempty"`
	MaintenanceInfo        json.RawMessage `json:"maintenance_info,omitempty"`

	ServiceOfferingID string `json:"service_offering_id"`
}

Service Plan struct

func (*ServicePlan) Equals added in v0.9.6

func (e *ServicePlan) Equals(obj Object) bool

func (*ServicePlan) GetType added in v0.2.0

func (e *ServicePlan) GetType() ObjectType

func (*ServicePlan) MarshalJSON added in v0.1.2

func (e *ServicePlan) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*ServicePlan) SupportedPlatformNames added in v0.13.1

func (e *ServicePlan) SupportedPlatformNames() []string

SupportedPlatformNames returns the supportedPlatformNames provided in a plan's metadata (if a value is provided at all). If there are no supported platforms names, nil is returned

func (*ServicePlan) SupportedPlatformTypes added in v0.13.1

func (e *ServicePlan) SupportedPlatformTypes() []string

SupportedPlatformTypes returns the supportedPlatforms provided in a plan's metadata (if a value is provided at all). If there are no supported platforms, nil is returned denoting that the plan is available to platforms of all types.

func (*ServicePlan) SupportsAllPlatforms added in v0.13.1

func (e *ServicePlan) SupportsAllPlatforms() bool

SupportsAllPlatforms determines whether the plan supports all platforms

func (*ServicePlan) SupportsPlatformInstance added in v0.13.1

func (e *ServicePlan) SupportsPlatformInstance(platform Platform) bool

SupportsPlatformInstance determines whether a specific platform instance is among the ones that a plan supports

func (*ServicePlan) SupportsPlatformType added in v0.13.1

func (e *ServicePlan) SupportsPlatformType(platformType string) bool

SupportsPlatform determines whether a specific platform type is among the ones that a plan supports

func (*ServicePlan) Validate added in v0.1.2

func (e *ServicePlan) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type ServicePlans added in v0.1.8

type ServicePlans struct {
	ServicePlans []*ServicePlan `json:"service_plans"`
}

func (*ServicePlans) Add added in v0.2.0

func (e *ServicePlans) Add(object Object)

func (*ServicePlans) ItemAt added in v0.2.0

func (e *ServicePlans) ItemAt(index int) Object

func (*ServicePlans) Len added in v0.2.0

func (e *ServicePlans) Len() int

type Strip added in v0.10.0

type Strip interface {
	Sanitize()
}

Strip interface indicates that an object needs to be sanitized before it is returned to the client

type TLS added in v0.12.0

type TLS struct {
	Certificate string `json:"client_certificate,omitempty"`
	Key         string `json:"client_key,omitempty"`
}

type Visibilities added in v0.1.6

type Visibilities struct {
	Visibilities []*Visibility `json:"visibilities"`
}

func (*Visibilities) Add added in v0.2.0

func (e *Visibilities) Add(object Object)

func (*Visibilities) ItemAt added in v0.2.0

func (e *Visibilities) ItemAt(index int) Object

func (*Visibilities) Len added in v0.2.0

func (e *Visibilities) Len() int

type Visibility added in v0.1.6

type Visibility struct {
	Base
	PlatformID    string `json:"platform_id"`
	ServicePlanID string `json:"service_plan_id"`
}

Visibility struct

func (*Visibility) Equals added in v0.9.6

func (e *Visibility) Equals(obj Object) bool

func (*Visibility) GetType added in v0.2.0

func (e *Visibility) GetType() ObjectType

func (*Visibility) MarshalJSON added in v0.1.6

func (e *Visibility) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*Visibility) Validate added in v0.1.6

func (e *Visibility) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

Jump to

Keyboard shortcuts

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