om

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CFTypeString = "cf"
)

Variables

This section is empty.

Functions

func AllProxyURL

func AllProxyURL(opsman config.OpsManager) string

func Environment

func Environment(boshProperties *config.BoshProperties, cfProperties *config.CFProperties, ccdbProperties *config.CCDBProperties) config.EnvProperties

func NewBOSHPropertiesBuilder

func NewBOSHPropertiesBuilder(client Client, opsManager config.OpsManager) *boshPropertiesBuilder

func NewCCDBPropertiesBuilder

func NewCCDBPropertiesBuilder(client Client, opsman config.OpsManager, boshFactory bosh.ClientFactory, credhubFactory credhub.ClientFactory, boshProperties *config.BoshProperties) *ccdbPropertiesBuilder

func NewCFPropertiesBuilder

func NewCFPropertiesBuilder(client Client, cfDeployment string) *cfPropertiesBuilder

func NewOpsManager

func NewOpsManager(client OpsManClient) *opsManagerImpl

func Run

func Run(e exec.Executor, ctx context.Context, data interface{}, args ...string) (exec.Result, error)

Types

type BoshCredentials

type BoshCredentials struct {
	Client       string
	ClientSecret string
	Environment  string
}

type CertAppender

type CertAppender interface {
	AppendCertsFromPEM(pemCerts []byte) (ok bool)
}

type Client

type Client interface {
	BoshEnvironment() (string, string, string, error)
	CertificateAuthorities() ([]httpclient.CA, error)
	DeployedProductCredentials(deployedProductGUID string, credentialRef string) (httpclient.DeployedProductCredential, error)
	StagedProductProperties(deployedProductGUID string) (map[string]httpclient.ResponseProperty, error)
	DeployedProduct(productType string) (string, error)
}

type ClientFactory

type ClientFactory interface {
	New(url string,
		trustedCertPEM []byte,
		certAppender CertAppender,
		boshAuth config.Authentication) (Client, error)
}

type ClientFactoryFunc

type ClientFactoryFunc func(url string, trustedCertPEM []byte, certAppender CertAppender, auth config.Authentication) (Client, error)

func NewClientFactory

func NewClientFactory(opsManagerFactory OpsManagerFactory, uaaFactory UAAFactory) ClientFactoryFunc

func (ClientFactoryFunc) New

func (f ClientFactoryFunc) New(
	url string,
	trustedCertPEM []byte,
	certAppender CertAppender,
	auth config.Authentication,
) (Client, error)

type ClientImpl

type ClientImpl struct {
	URL            string
	TrustedCertPEM []byte

	Auth config.Authentication
	// contains filtered or unexported fields
}

func (*ClientImpl) BoshEnvironment

func (c *ClientImpl) BoshEnvironment() (string, string, string, error)

func (*ClientImpl) CertificateAuthorities

func (c *ClientImpl) CertificateAuthorities() ([]httpclient.CA, error)

func (*ClientImpl) DeployedProduct

func (c *ClientImpl) DeployedProduct(productType string) (string, error)

func (*ClientImpl) DeployedProductCredentials

func (c *ClientImpl) DeployedProductCredentials(deployedProductGUID string, credentialRef string) (httpclient.DeployedProductCredential, error)

func (*ClientImpl) OpsMan

func (c *ClientImpl) OpsMan() (OpsManager, error)

func (*ClientImpl) StagedProductProperties

func (c *ClientImpl) StagedProductProperties(deployedProductGUID string) (map[string]httpclient.ResponseProperty, error)

type Config

type Config struct {
	Scheme string
	Host   string
	Port   int
	Path   string

	CACert   string
	AllProxy string

	TokenFunc func(bool) (string, error)
}

func NewConfigFromURL

func NewConfigFromURL(url string) (Config, error)

func (Config) CACertPool

func (c Config) CACertPool() (*x509.CertPool, error)

func (Config) Validate

func (c Config) Validate() error

type Factory

type Factory struct{}

func NewFactory

func NewFactory() Factory

func (Factory) New

func (f Factory) New(config Config) (OpsManager, error)

type OpsManClient

type OpsManClient interface {
	GetBOSHCredentials() (string, error)
	ListCertificateAuthorities() ([]httpclient.CA, error)
	ListDeployedProductCredentials(deployedProductGUID string, credentialRef string) (httpclient.DeployedProductCredential, error)
	GetStagedProductProperties(product string) (map[string]httpclient.ResponseProperty, error)
	ListDeployedProducts() ([]httpclient.DeployedProduct, error)
}

type OpsManager

type OpsManager interface {
	GetBOSHCredentials() (BoshCredentials, error)
	GetCertificateAuthorities() ([]httpclient.CA, error)
	GetDeployedProductCredentials(deployedProductGUID string, credentialRef string) (httpclient.DeployedProductCredential, error)
	GetStagedProductProperties(product string) (map[string]httpclient.ResponseProperty, error)
	ListDeployedProducts() ([]httpclient.DeployedProduct, error)
}

type OpsManagerFactory

type OpsManagerFactory interface {
	New(config Config) (OpsManager, error)
}

type PropertiesProvider

type PropertiesProvider struct {
	// contains filtered or unexported fields
}

func NewPropertiesProvider

func NewPropertiesProvider(cfg *config.Config, opsmanConfig config.OpsManager, opsmanFactory ClientFactory, boshFactory bosh.ClientFactory, credhubFactory credhub.ClientFactory) *PropertiesProvider

func (PropertiesProvider) SourceBoshPropertiesBuilder

func (l PropertiesProvider) SourceBoshPropertiesBuilder() config.BoshPropertiesBuilder

func (PropertiesProvider) SourceCCDBPropertiesBuilder

func (PropertiesProvider) SourceCFPropertiesBuilder

func (l PropertiesProvider) SourceCFPropertiesBuilder() config.CFPropertiesBuilder

func (PropertiesProvider) TargetBoshPropertiesBuilder

func (l PropertiesProvider) TargetBoshPropertiesBuilder() config.BoshPropertiesBuilder

func (PropertiesProvider) TargetCCDBPropertiesBuilder

func (PropertiesProvider) TargetCFPropertiesBuilder

func (l PropertiesProvider) TargetCFPropertiesBuilder() config.CFPropertiesBuilder

type UAAFactory

type UAAFactory interface {
	New(config uaa.Config) (uaa.UAA, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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