types

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: Apache-2.0, BSD-3-Clause, MIT Imports: 7 Imported by: 22

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:"-"`
}

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:"brokers"`
}

Brokers struct

type Credentials

type Credentials struct {
	Basic *Basic `json:"basic,omitempty"`
}

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 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 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"`

	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

Jump to

Keyboard shortcuts

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