config

package
v0.0.0-...-4d1605e Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeNoauth    = "noauth"
	TypeBasicAuth = "basic"
)
View Source
const (
	MockBrokerEndpoint = "localhost:3000"
	HTTPRWTimeout      = 30 * time.Second
	HTTPIdleTimeout    = 60 * time.Second
)
View Source
const (
	TypeServiceInstance = "service_instance"
	TypeServiceBinding  = "service_binding"

	ActionCreate = "create"
	ActionUpdate = "update"
)
View Source
const (
	Version214 = "2.14"
)

Variables

View Source
var CONF = &Config{}

Functions

func Load

func Load(path string) error

Types

type AuthOption

type AuthOption struct {
	AuthType string `json:"authType"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type Config

type Config struct {
	URL             string      `json:"url"`
	APIVersion      string      `json:"apiVersion"`
	Authentication  *AuthOption `json:"authentication"`
	PollingInterval int         `json:"pollingInterval"`
	MaxPollingNum   int         `json:"maxPollingNum"`
	Services        []*Service  `json:"services"`
}

type Operation

type Operation struct {
	Type       string                 `json:"type"`
	PlanID     string                 `json:"plan_id,omitempty"`
	Async      bool                   `json:"async,omitempty"`
	Parameters map[string]interface{} `json:"parameters,omitempty"`
}

type Service

type Service struct {
	Name             string       `json:"name"`
	ServiceID        string       `json:"service_id"`
	OrganizationGUID string       `json:"organization_guid"`
	SpaceGUID        string       `json:"space_guid"`
	Operations       []*Operation `json:"operations"`
}

Jump to

Keyboard shortcuts

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