types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2018 License: Apache-2.0, BSD-3-Clause, MIT Imports: 7 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"`
	Password string `json:"password"`
}

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:"-"`
	Catalog     json.RawMessage `json:"catalog,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:"brokers"`
}

Brokers struct

type Credentials

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

Credentials credentials

func GenerateCredentials

func GenerateCredentials() (*Credentials, error)

GenerateCredentials return user and password

func NewBasicCredentials

func NewBasicCredentials(username string, password string) *Credentials

NewBasicCredentials returns new basic credentials object

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

Jump to

Keyboard shortcuts

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