types

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: Apache-2.0, BSD-3-Clause, MIT Imports: 9 Imported by: 0

Documentation

Overview

Package types contains the Service Manager web entities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basic

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

Basic basic credentials

type Broker

type Broker struct {
	ID          string       `json:"id"`
	Name        string       `json:"name"`
	Description string       `json:"description"`
	CreatedAt   time.Time    `json:"created_at"`
	UpdatedAt   time.Time    `json:"updated_at"`
	BrokerURL   string       `json:"broker_url"`
	Credentials *Credentials `json:"credentials,omitempty" structs:"-"`

	Services []*ServiceOffering `json:"services,omitempty" structs:"-"`

	Labels Labels `json:"labels,omitempty"`
}

Broker broker struct

func (*Broker) MarshalJSON

func (b *Broker) MarshalJSON() ([]byte, error)

MarshalJSON override json serialization for http response

func (*Broker) Validate

func (b *Broker) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type Brokers

type Brokers struct {
	Brokers []*Broker `json:"service_brokers"`
}

Brokers struct

type Credentials

type Credentials struct {
	Basic   *Basic `json:"basic,omitempty"`
	Details []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 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 Platform

type Platform struct {
	ID          string       `json:"id"`
	Type        string       `json:"type"`
	Name        string       `json:"name"`
	Description string       `json:"description"`
	CreatedAt   time.Time    `json:"created_at"`
	UpdatedAt   time.Time    `json:"updated_at"`
	Credentials *Credentials `json:"credentials,omitempty"`
}

Platform platform struct

func (*Platform) MarshalJSON

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

MarshalJSON override json serialization for http response

func (*Platform) Validate

func (p *Platform) Validate() error

Validate implements InputValidator and verifies all mandatory fields are populated

type ServiceOffering added in v0.1.2

type ServiceOffering struct {
	ID          string    `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`

	Bindable             bool   `json:"bindable"`
	InstancesRetrievable bool   `json:"instances_retrievable"`
	BindingsRetrievable  bool   `json:"bindings_retrievable"`
	PlanUpdatable        bool   `json:"plan_updateable"`
	CatalogID            string `json:"catalog_id"`
	CatalogName          string `json:"catalog_name"`

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

	BrokerID string         `json:"broker_id"`
	Plans    []*ServicePlan `json:"plans"`
}

Service Offering struct

func (*ServiceOffering) MarshalJSON added in v0.1.2

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

MarshalJSON override json serialization for http response

func (*ServiceOffering) Validate added in v0.1.2

func (so *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:"services"`
}

ServiceOfferings struct

type ServicePlan added in v0.1.2

type ServicePlan struct {
	ID          string    `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`

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

	Metadata json.RawMessage `json:"metadata,omitempty"`
	Schemas  json.RawMessage `json:"schemas,omitempty"`

	ServiceOfferingID string `json:"service_offering_id"`
}

Service Plan struct

func (*ServicePlan) MarshalJSON added in v0.1.2

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

MarshalJSON override json serialization for http response

func (*ServicePlan) Validate added in v0.1.2

func (sp *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"`
}

ServicePlans struct

type Visibilities added in v0.1.6

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

Visibilities struct

type Visibility added in v0.1.6

type Visibility struct {
	ID            string    `json:"id"`
	PlatformID    string    `json:"platform_id"`
	ServicePlanID string    `json:"service_plan_id"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
	Labels        Labels    `json:"labels,omitempty"`
}

Visibility struct

func (*Visibility) MarshalJSON added in v0.1.6

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

MarshalJSON override json serialization for http response

func (*Visibility) Validate added in v0.1.6

func (v *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