utilities

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenClientPassword

func GenClientPassword() string

Generate a random password.

func GetKind

func GetKind(details interface{}) (string, error)

Given a broker request details object, determine which of the supported services the request is about.

func MakeAppName

func MakeAppName(serviceId string, instanceId string) string

Generate an app name based on the kind of service in question and a service instance ID.

func MakeClientIdForBinding

func MakeClientIdForBinding(serviceId string, bindingId string) string

Generate a UAA client ID binding name based on the kind of service in question and the binding's ID.

func SafeApp

func SafeApp(app ccv3.Application) ccv3.Application

Types

type RegistryConfig

type RegistryConfig struct {
	Mode  string
	Peers []*RegistryPeer
}

func NewRegistryConfig

func NewRegistryConfig() *RegistryConfig

func (*RegistryConfig) AddPeer

func (rc *RegistryConfig) AddPeer(idx int, uri string, serviceinstanceID string)

func (*RegistryConfig) Clustered

func (rc *RegistryConfig) Clustered()

func (*RegistryConfig) Standalone

func (rc *RegistryConfig) Standalone()

type RegistryParams

type RegistryParams struct {
	RawCount                 int    `json:"count"`
	ApplicationSecurityGroup string `json:"application_security_group"`
}

func ExtractRegistryParams

func ExtractRegistryParams(details string) (*RegistryParams, error)

func NewRegistryParams

func NewRegistryParams() *RegistryParams

func (*RegistryParams) Count

func (rp *RegistryParams) Count() (int, error)

type RegistryPeer

type RegistryPeer struct {
	Index             int    `json:"index"`
	Count             int    `json:"nodeCount"`
	URI               string `json:"uri"`
	ServiceInstanceId string `json:"service-instance-id"`
}

Jump to

Keyboard shortcuts

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