types

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const BROKER_ID = "BROKER ID"

Variables

View Source
var DefaultInfo = Info{
	TokenBasicAuth: true,
}

DefaultInfo contains default values

Functions

This section is empty.

Types

type Basic

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

Basic wraps basic credentials

type Broker

type Broker struct {
	ID          string       `json:"id,omitempty" yaml:"id,omitempty"`
	Name        string       `json:"name,omitempty" yaml:"name,omitempty"`
	URL         string       `json:"broker_url,omitempty" yaml:"broker_url,omitempty"`
	Description string       `json:"description,omitempty" yaml:"description,omitempty"`
	Created     string       `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	Updated     string       `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
	Credentials *Credentials `json:"credentials,omitempty" yaml:"credentials,omitempty"`
	Labels      types.Labels `json:"labels,omitempty" yaml:"labels,omitempty"`
	Ready       bool         `json:"ready,omitempty" yaml:"ready,omitempty"`

	LastOperation *types.Operation `json:"last_operation,omitempty" yaml:"last_operation,omitempty"`
}

Broker defines the data of a service broker.

func (*Broker) IsEmpty

func (b *Broker) IsEmpty() bool

IsEmpty whether the structure is empty

func (*Broker) Message

func (b *Broker) Message() string

Message title of the table

func (*Broker) TableData

func (b *Broker) TableData() *TableData

TableData returns the data to populate a table

type Brokers

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

Brokers wraps an array of brokers

func (*Brokers) IsEmpty

func (b *Brokers) IsEmpty() bool

IsEmpty whether the structure is empty

func (*Brokers) Message

func (b *Brokers) Message() string

Message title of the table

func (*Brokers) TableData

func (b *Brokers) TableData() *TableData

TableData returns the data to populate a table

type Credentials

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

Credentials contains types of credentials

type Info

type Info struct {
	TokenIssuerURL string `json:"token_issuer_url"`
	TokenBasicAuth bool   `json:"token_basic_auth"`
}

Info contains the url of a token issuer

type LabelChanges added in v1.5.0

type LabelChanges struct {
	LabelChanges []*smtypes.LabelChange `json:"labels,omitempty"`
}

LabelChanges wraps multiple labels change request body structure

type Marketplace added in v1.7.0

type Marketplace struct {
	ServiceOfferings []ServiceOffering `json:"items" yaml:"items"`
}

Marketplace wraps an array of service offerings with marketplace related table data

func (*Marketplace) IsEmpty added in v1.7.0

func (m *Marketplace) IsEmpty() bool

IsEmpty whether the structure is empty

func (*Marketplace) Message added in v1.7.0

func (m *Marketplace) Message() string

Message title of the table

func (*Marketplace) TableData added in v1.7.0

func (m *Marketplace) TableData() *TableData

TableData returns the data to populate a table

type Operation added in v1.10.0

type Operation struct {
	ID           string          `json:"id,omitempty" yaml:"id,omitempty"`
	Description  string          `json:"description,omitempty" yaml:"description,omitempty"`
	Type         string          `json:"type,omitempty" yaml:"type,omitempty"`
	State        string          `json:"state,omitempty" yaml:"state,omitempty"`
	ResourceID   string          `json:"resource_id,omitempty" yaml:"resource_id,omitempty"`
	ResourceType string          `json:"resource_type,omitempty" yaml:"resource_type,omitempty"`
	Errors       json.RawMessage `json:"errors,omitempty" yaml:"errors,omitempty"`
	Created      string          `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	Updated      string          `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
	Labels       types.Labels    `json:"labels,omitempty" yaml:"labels,omitempty"`
}

Operation defines the data of a operation.

func (*Operation) IsEmpty added in v1.10.0

func (o *Operation) IsEmpty() bool

IsEmpty whether the structure is empty

func (*Operation) Message added in v1.10.0

func (o *Operation) Message() string

Message title of the table

func (*Operation) TableData added in v1.10.0

func (o *Operation) TableData() *TableData

TableData returns the data to populate a table

type Platform

type Platform struct {
	ID          string       `json:"id,omitempty" yaml:"id,omitempty"`
	Name        string       `json:"name,omitempty" yaml:"name,omitempty"`
	Description string       `json:"description,omitempty" yaml:"description,omitempty"`
	Type        string       `json:"type,omitempty" yaml:"type,omitempty"`
	Created     string       `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	Updated     string       `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
	Credentials *Credentials `json:"credentials,omitempty" yaml:"credentials,omitempty"`
	Labels      types.Labels `json:"labels,omitempty" yaml:"labels,omitempty"`
	Ready       bool         `json:"ready,omitempty" yaml:"ready,omitempty"`
}

Platform defines the data of a platform.

func (*Platform) IsEmpty

func (p *Platform) IsEmpty() bool

IsEmpty whether the structure is empty

func (*Platform) Message

func (p *Platform) Message() string

Message title of the table

func (*Platform) TableData

func (p *Platform) TableData() *TableData

TableData returns the data to populate a table

type Platforms

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

Platforms wraps an array of platforms

func (*Platforms) IsEmpty

func (p *Platforms) IsEmpty() bool

IsEmpty whether the structure is empty

func (*Platforms) Message

func (p *Platforms) Message() string

Message title of the table

func (*Platforms) TableData

func (p *Platforms) TableData() *TableData

TableData returns the data to populate a table

type ServiceBinding added in v1.10.0

type ServiceBinding struct {
	ID             string       `json:"id,omitempty" yaml:"id,omitempty"`
	Name           string       `json:"name,omitempty" yaml:"name,omitempty"`
	CreatedAt      string       `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt      string       `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
	Labels         types.Labels `json:"labels,omitempty" yaml:"labels,omitempty"`
	PagingSequence int64        `json:"-" yaml:"-"`

	Credentials json.RawMessage `json:"credentials,omitempty" yaml:"credentials,omitempty"`

	ServiceInstanceID   string `json:"service_instance_id" yaml:"service_instance_id,omitempty"`
	ServiceInstanceName string `json:"service_instance_name,omitempty" yaml:"service_instance_name,omitempty"`

	SyslogDrainURL  string          `json:"syslog_drain_url,omitempty" yaml:"syslog_drain_url,omitempty"`
	RouteServiceURL string          `json:"route_service_url,omitempty"`
	VolumeMounts    json.RawMessage `json:"-" yaml:"-"`
	Endpoints       json.RawMessage `json:"-" yaml:"-"`
	Context         json.RawMessage `json:"context,omitempty" yaml:"context,omitempty"`
	Parameters      json.RawMessage `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	BindResource    json.RawMessage `json:"-" yaml:"-"`

	Ready bool `json:"ready,omitempty" yaml:"ready,omitempty"`

	LastOperation *types.Operation `json:"last_operation,omitempty" yaml:"last_operation,omitempty"`
}

ServiceBinding defines the data of a service instance.

func (*ServiceBinding) IsEmpty added in v1.10.0

func (sb *ServiceBinding) IsEmpty() bool

IsEmpty whether the structure is empty

func (*ServiceBinding) Message added in v1.10.0

func (sb *ServiceBinding) Message() string

Message title of the table

func (*ServiceBinding) TableData added in v1.10.0

func (sb *ServiceBinding) TableData() *TableData

TableData returns the data to populate a table

type ServiceBindings added in v1.10.0

type ServiceBindings struct {
	ServiceBindings []ServiceBinding `json:"items" yaml:"items"`
	Vertical        bool             `json:"-" yaml:"-"`
}

ServiceBindings wraps an array of service bindings

func (*ServiceBindings) IsEmpty added in v1.10.0

func (sb *ServiceBindings) IsEmpty() bool

IsEmpty whether the structure is empty

func (*ServiceBindings) Message added in v1.10.0

func (sb *ServiceBindings) Message() string

Message title of the table

func (*ServiceBindings) TableData added in v1.10.0

func (sb *ServiceBindings) TableData() *TableData

TableData returns the data to populate a table

type ServiceInstance added in v1.7.3

type ServiceInstance struct {
	ID        string `json:"id,omitempty" yaml:"id,omitempty"`
	Name      string `json:"name,omitempty" yaml:"name,omitempty"`
	CreatedAt string `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`

	Labels types.Labels `json:"labels,omitempty" yaml:"labels,omitempty"`

	ServiceID     string `json:"service_id,omitempty" yaml:"service_id,omitempty"`
	ServicePlanID string `json:"service_plan_id,omitempty" yaml:"service_plan_id,omitempty"`
	PlatformID    string `json:"platform_id,omitempty" yaml:"platform_id,omitempty"`

	Parameters      json.RawMessage `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	MaintenanceInfo json.RawMessage `json:"maintenance_info,omitempty" yaml:"-"`
	Context         json.RawMessage `json:"context,omitempty" yaml:"context,omitempty"`
	PreviousValues  json.RawMessage `json:"-" yaml:"-"`

	Ready         *bool            `json:"ready,omitempty" yaml:"ready,omitempty"`
	Usable        *bool            `json:"usable,omitempty" yaml:"usable,omitempty"`
	Shared        *bool            `json:"shared,omitempty" yaml:"shared,omitempty"`
	LastOperation *types.Operation `json:"last_operation,omitempty" yaml:"last_operation,omitempty"`
}

ServiceInstance defines the data of a service instance.

func (*ServiceInstance) IsEmpty added in v1.7.3

func (si *ServiceInstance) IsEmpty() bool

IsEmpty whether the structure is empty

func (*ServiceInstance) Message added in v1.7.3

func (si *ServiceInstance) Message() string

Message title of the table

func (*ServiceInstance) TableData added in v1.7.3

func (si *ServiceInstance) TableData() *TableData

TableData returns the data to populate a table

type ServiceInstances added in v1.7.3

type ServiceInstances struct {
	ServiceInstances []ServiceInstance `json:"items" yaml:"items"`
	Vertical         bool              `json:"-" yaml:"-"`
}

ServiceInstances wraps an array of service instances

func (*ServiceInstances) IsEmpty added in v1.7.3

func (si *ServiceInstances) IsEmpty() bool

IsEmpty whether the structure is empty

func (*ServiceInstances) Message added in v1.7.3

func (si *ServiceInstances) Message() string

Message title of the table

func (*ServiceInstances) TableData added in v1.7.3

func (si *ServiceInstances) TableData() *TableData

TableData returns the data to populate a table

type ServiceManagerObject

type ServiceManagerObject interface {
	IsEmpty() bool
	Message() string
}

ServiceManagerObject defines interface for printable SM object

type ServiceOffering added in v1.5.0

type ServiceOffering struct {
	ID          string `json:"id,omitempty" yaml:"id,omitempty"`
	Name        string `json:"name,omitempty" yaml:"name,omitempty"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	CreatedAt   string `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt   string `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`

	Bindable             bool   `json:"bindable,omitempty" yaml:"bindable,omitempty"`
	InstancesRetrievable bool   `json:"instances_retrievable,omitempty" yaml:"instances_retrievable,omitempty"`
	BindingsRetrievable  bool   `json:"bindings_retrievable,omitempty" yaml:"bindings_retrievable,omitempty"`
	AllowContextUpdates  bool   `json:"allow_context_updates,omitempty" yaml:"allow_context_updates,omitempty"`
	PlanUpdatable        bool   `json:"plan_updateable,omitempty" yaml:"plan_updateable,omitempty"`
	CatalogID            string `json:"catalog_id,omitempty" yaml:"catalog_id,omitempty"`
	CatalogName          string `json:"catalog_name,omitempty" yaml:"catalog_name,omitempty"`

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

	BrokerID   string        `json:"broker_id,omitempty" yaml:"broker_id,omitempty"`
	BrokerName string        `json:"broker_name,omitempty" yaml:"broker_name,omitempty"`
	Plans      []ServicePlan `json:"plans,omitempty" yaml:"plans,omitempty"`
	Labels     types.Labels  `json:"labels,omitempty" yaml:"labels,omitempty"`
	Ready      bool          `json:"ready,omitempty" yaml:"ready,omitempty"`
}

ServiceOffering defines the data of a service offering.

func (*ServiceOffering) IsEmpty added in v1.5.0

func (so *ServiceOffering) IsEmpty() bool

IsEmpty whether the structure is empty

func (*ServiceOffering) Message added in v1.5.0

func (so *ServiceOffering) Message() string

Message title of the table

func (*ServiceOffering) TableData added in v1.5.0

func (so *ServiceOffering) TableData() *TableData

TableData returns the data to populate a table

type ServiceOfferings added in v1.5.0

type ServiceOfferings struct {
	ServiceOfferings []ServiceOffering `json:"items" yaml:"items"`
}

ServiceOfferings wraps an array of service offerings

func (*ServiceOfferings) IsEmpty added in v1.5.0

func (so *ServiceOfferings) IsEmpty() bool

IsEmpty whether the structure is empty

func (*ServiceOfferings) Message added in v1.5.0

func (so *ServiceOfferings) Message() string

Message title of the table

func (*ServiceOfferings) TableData added in v1.5.0

func (so *ServiceOfferings) TableData() *TableData

TableData returns the data to populate a table

type ServicePlan added in v1.5.0

type ServicePlan struct {
	ID          string `json:"id,omitempty" yaml:"id,omitempty"`
	Name        string `json:"name,omitempty" yaml:"name,omitempty"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	CreatedAt   string `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt   string `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`

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

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

	ServiceOfferingID string       `json:"service_offering_id,omitempty" yaml:"service_offering_id,omitempty"`
	Labels            types.Labels `json:"labels,omitempty" yaml:"labels,omitempty"`
	Ready             bool         `json:"ready,omitempty" yaml:"ready,omitempty"`
}

ServicePlan defines the data of a service plan.

func (*ServicePlan) IsEmpty added in v1.5.0

func (sp *ServicePlan) IsEmpty() bool

IsEmpty whether the structure is empty

func (*ServicePlan) Message added in v1.5.0

func (sp *ServicePlan) Message() string

Message title of the table

func (*ServicePlan) ShareableProperty added in v1.11.9

func (sp *ServicePlan) ShareableProperty() bool

func (*ServicePlan) TableData added in v1.5.0

func (sp *ServicePlan) TableData() *TableData

TableData returns the data to populate a table

type ServicePlans added in v1.5.0

type ServicePlans struct {
	ServicePlans []ServicePlan `json:"items" yaml:"items"`
}

ServicePlans wraps an array of service plans

func (*ServicePlans) IsEmpty added in v1.5.0

func (sp *ServicePlans) IsEmpty() bool

IsEmpty whether the structure is empty

func (*ServicePlans) Message added in v1.5.0

func (sp *ServicePlans) Message() string

Message title of the table

func (*ServicePlans) TableData added in v1.5.0

func (sp *ServicePlans) TableData() *TableData

TableData returns the data to populate a table

type ServicePlansForOffering added in v1.7.0

type ServicePlansForOffering struct {
	ServicePlans []ServicePlan `json:"items" yaml:"items"`
}

ServicePlansForOffering wraps an array of service plans for marketplace command

func (*ServicePlansForOffering) IsEmpty added in v1.7.0

func (sp *ServicePlansForOffering) IsEmpty() bool

IsEmpty whether the structure is empty

func (*ServicePlansForOffering) Message added in v1.7.0

func (sp *ServicePlansForOffering) Message() string

Message title of the table

func (*ServicePlansForOffering) TableData added in v1.7.0

func (sp *ServicePlansForOffering) TableData() *TableData

TableData returns the data to populate a table

type TableData

type TableData struct {
	Headers  []string
	Data     [][]string
	Vertical bool
}

TableData holds data for table header and content

func (*TableData) String

func (table *TableData) String() string

String implements Stringer interface

type TableDataPrinter

type TableDataPrinter interface {
	TableData() *TableData
}

TableDataPrinter defines interface for table printing

type Visibilities added in v1.5.0

type Visibilities struct {
	Visibilities []Visibility `json:"items,omitempty" yaml:"items,omitempty"`
}

Visibilities wraps an array of Visibilities

func (*Visibilities) IsEmpty added in v1.5.0

func (v *Visibilities) IsEmpty() bool

IsEmpty whether the structure is empty

func (*Visibilities) Message added in v1.5.0

func (v *Visibilities) Message() string

Message title of the table

func (*Visibilities) TableData added in v1.5.0

func (v *Visibilities) TableData() *TableData

TableData returns the data to populate a table

type Visibility added in v1.5.0

type Visibility struct {
	ID            string       `json:"id,omitempty" yaml:"id,omitempty"`
	PlatformID    string       `json:"platform_id,omitempty" yaml:"platform_id,omitempty"`
	ServicePlanID string       `json:"service_plan_id,omitempty" yaml:"service_plan_id,omitempty"`
	CreatedAt     string       `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt     string       `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
	Labels        types.Labels `json:"labels,omitempty" yaml:"labels,omitempty"`
	Ready         bool         `json:"ready,omitempty" yaml:"ready,omitempty"`
}

Visibility defines the data of a visibility

func (*Visibility) IsEmpty added in v1.5.0

func (v *Visibility) IsEmpty() bool

IsEmpty whether the struct is empty

func (*Visibility) Message added in v1.5.0

func (v *Visibility) Message() string

Message title of the table

func (*Visibility) TableData added in v1.5.0

func (v *Visibility) TableData() *TableData

TableData returns the data to populate a table

Jump to

Keyboard shortcuts

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