cf_client

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2018 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const CLI_VERSION = "2.80.0"

Variables

This section is empty.

Functions

func NewCfLogger

func NewCfLogger(writesToConsole bool) trace.Printer

func NewCloudControllerGateway

func NewCloudControllerGateway(config coreconfig.ReadWriter, logger trace.Printer, uaaClient *uaa.Client) net.Gateway

func NewNOAAClient added in v0.8.0

func NewNOAAClient(config coreconfig.ReadWriter, uaaClient *uaa.Client) *consumer.Consumer

func NewTerraformRepository

func NewTerraformRepository() coreconfig.Repository

func NewUAAGateway

func NewUAAGateway(config coreconfig.ReadWriter, logger trace.Printer, uaaClient *uaa.Client) net.Gateway

Types

type CfClient

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

func (CfClient) AppInstances added in v0.8.0

func (client CfClient) AppInstances() appinstances.Repository

func (CfClient) ApplicationBits added in v0.8.0

func (client CfClient) ApplicationBits() bitsmanager.ApplicationBitsRepository

func (CfClient) Applications added in v0.8.0

func (client CfClient) Applications() applications.Repository

func (*CfClient) Authenticate

func (client *CfClient) Authenticate() error

func (CfClient) Buildpack

func (client CfClient) Buildpack() api.BuildpackRepository

func (CfClient) BuildpackBits

func (client CfClient) BuildpackBits() api.BuildpackBitsRepository

func (CfClient) CCv3Client added in v0.7.0

func (client CfClient) CCv3Client() *ccv3.Client

func (CfClient) Config

func (client CfClient) Config() Config

func (CfClient) Decrypter

func (client CfClient) Decrypter() encryption.Decrypter

func (CfClient) Domain added in v0.6.0

func (client CfClient) Domain() api.DomainRepository

func (CfClient) EnvVarGroup added in v0.7.2

func (client CfClient) EnvVarGroup() environmentvariablegroups.Repository

func (CfClient) FeatureFlags added in v0.6.0

func (client CfClient) FeatureFlags() featureflags.FeatureFlagRepository

func (CfClient) Finder added in v0.6.0

func (client CfClient) Finder() FinderRepository

func (CfClient) Gateways added in v0.6.0

func (client CfClient) Gateways() CloudFoundryGateways

func (*CfClient) Init

func (client *CfClient) Init() error

func (*CfClient) LoadCCv3 added in v0.7.0

func (client *CfClient) LoadCCv3() error

func (*CfClient) LoadDecrypter

func (client *CfClient) LoadDecrypter()

func (*CfClient) LoadRepositories

func (client *CfClient) LoadRepositories()

func (CfClient) Logs added in v0.8.0

func (client CfClient) Logs() logs.Repository

func (CfClient) Organizations

func (client CfClient) Organizations() organizations.OrganizationRepository

func (CfClient) Quotas

func (client CfClient) Quotas() quotas.QuotaRepository

func (CfClient) Route added in v0.6.0

func (client CfClient) Route() api.RouteRepository

func (CfClient) RouteServiceBinding added in v0.6.0

func (client CfClient) RouteServiceBinding() api.RouteServiceBindingRepository

func (CfClient) RoutingAPI added in v0.6.0

func (client CfClient) RoutingAPI() api.RoutingAPIRepository

func (CfClient) SecurityGroups

func (client CfClient) SecurityGroups() securitygroups.SecurityGroupRepo

func (CfClient) SecurityGroupsRunningBinder

func (client CfClient) SecurityGroupsRunningBinder() secgrouprun.SecurityGroupsRepo

func (CfClient) SecurityGroupsSpaceBinder

func (client CfClient) SecurityGroupsSpaceBinder() spacesbinder.SecurityGroupSpaceBinder

func (CfClient) SecurityGroupsStagingBinder

func (client CfClient) SecurityGroupsStagingBinder() secgroupstag.SecurityGroupsRepo

func (CfClient) ServiceBinding added in v0.8.0

func (client CfClient) ServiceBinding() api.ServiceBindingRepository

func (CfClient) ServiceBrokers

func (client CfClient) ServiceBrokers() api.ServiceBrokerRepository

func (CfClient) ServicePlanVisibilities

func (client CfClient) ServicePlanVisibilities() api.ServicePlanVisibilityRepository

func (CfClient) ServicePlans

func (client CfClient) ServicePlans() api.ServicePlanRepository

func (CfClient) Services

func (client CfClient) Services() api.ServiceRepository

func (CfClient) SpaceQuotas

func (client CfClient) SpaceQuotas() spacequotas.SpaceQuotaRepository

func (CfClient) Spaces

func (client CfClient) Spaces() spaces.SpaceRepository

func (CfClient) Stack added in v0.6.0

func (CfClient) UserProvidedService added in v0.6.0

func (client CfClient) UserProvidedService() api.UserProvidedServiceInstanceRepository

type CfLogger

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

func (*CfLogger) Print

func (p *CfLogger) Print(v ...interface{})

func (*CfLogger) Printf

func (p *CfLogger) Printf(format string, v ...interface{})

func (*CfLogger) Println

func (p *CfLogger) Println(v ...interface{})

func (*CfLogger) WritesToConsole

func (p *CfLogger) WritesToConsole() bool

type Client

type Client interface {
	Gateways() CloudFoundryGateways
	Finder() FinderRepository
	Organizations() organizations.OrganizationRepository
	Spaces() spaces.SpaceRepository
	SecurityGroups() securitygroups.SecurityGroupRepo
	SecurityGroupsSpaceBinder() spacesbinder.SecurityGroupSpaceBinder
	SecurityGroupsRunningBinder() secgrouprun.SecurityGroupsRepo
	SecurityGroupsStagingBinder() secgroupstag.SecurityGroupsRepo
	ServiceBrokers() api.ServiceBrokerRepository
	ServicePlanVisibilities() api.ServicePlanVisibilityRepository
	ServicePlans() api.ServicePlanRepository
	Services() api.ServiceRepository
	ServiceBinding() api.ServiceBindingRepository
	SpaceQuotas() spacequotas.SpaceQuotaRepository
	Quotas() quotas.QuotaRepository
	Config() Config
	Buildpack() api.BuildpackRepository
	BuildpackBits() api.BuildpackBitsRepository
	Decrypter() encryption.Decrypter
	Domain() api.DomainRepository
	RoutingAPI() api.RoutingAPIRepository
	Route() api.RouteRepository
	Stack() stacks.CloudControllerStackRepository
	RouteServiceBinding() api.RouteServiceBindingRepository
	UserProvidedService() api.UserProvidedServiceInstanceRepository
	FeatureFlags() featureflags.FeatureFlagRepository
	EnvVarGroup() environmentvariablegroups.Repository
	Applications() applications.Repository
	AppInstances() appinstances.Repository
	ApplicationBits() bitsmanager.ApplicationBitsRepository
	Logs() logs.Repository
	CCv3Client() *ccv3.Client
}

func NewCfClient

func NewCfClient(config Config) (Client, error)

type CloudFoundryGateways

type CloudFoundryGateways struct {
	CloudControllerGateway net.Gateway
	UAAGateway             net.Gateway
	Config                 coreconfig.ReadWriter
}

func NewCloudFoundryGateways

func NewCloudFoundryGateways(config coreconfig.ReadWriter, logger trace.Printer, uaaClient *uaa.Client) CloudFoundryGateways

type Config

type Config struct {
	AppName          string
	AppVersion       string
	ApiEndpoint      string
	SkipInsecureSSL  bool
	Username         string
	Password         string
	UserRefreshToken string
	UserAccessToken  string
	Locale           string
	Verbose          bool
	EncPrivateKey    string
	Passphrase       string
}

func (*Config) AccessToken

func (c *Config) AccessToken() string

func (*Config) ClientID

func (c *Config) ClientID() string

func (*Config) ClientSecret

func (c *Config) ClientSecret() string

func (*Config) RefreshToken

func (c *Config) RefreshToken() string

func (*Config) SetAccessToken

func (c *Config) SetAccessToken(token string)

func (*Config) SkipSSLValidation

func (c *Config) SkipSSLValidation() bool

func (*Config) Target

func (c *Config) Target() string

type Finder added in v0.6.0

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

func (Finder) GetAppFromCf added in v0.8.0

func (f Finder) GetAppFromCf(appGuid string) (models.Application, error)

func (Finder) GetBuildpackFromCf added in v0.6.0

func (f Finder) GetBuildpackFromCf(bpGuid string) (models.Buildpack, error)

func (Finder) GetDomainFromCf added in v0.6.0

func (f Finder) GetDomainFromCf(domain models.DomainFields) (models.DomainFields, error)

func (Finder) GetQuotaFromCf added in v0.6.0

func (f Finder) GetQuotaFromCf(quotaGuid string, isOrgQuota bool) (interface{}, error)

func (Finder) GetRouteFromCf added in v0.6.0

func (f Finder) GetRouteFromCf(routeGuid string) (models.Route, error)

func (Finder) GetSecGroupFromCf added in v0.6.0

func (f Finder) GetSecGroupFromCf(secGroupId string) (models.SecurityGroup, error)

func (Finder) GetServiceBindingsFromApp added in v0.8.0

func (f Finder) GetServiceBindingsFromApp(appGuid string) ([]ServiceBindingFields, error)

func (Finder) GetServiceFromCf added in v0.6.0

func (f Finder) GetServiceFromCf(svcGuid string) (models.ServiceInstance, error)

func (Finder) GetSpaceFromCf added in v0.6.0

func (f Finder) GetSpaceFromCf(spaceGuid string) (models.Space, error)

type FinderRepository added in v0.6.0

type FinderRepository interface {
	GetDomainFromCf(domain models.DomainFields) (models.DomainFields, error)
	GetBuildpackFromCf(bpGuid string) (models.Buildpack, error)
	GetQuotaFromCf(quotaGuid string, isOrgQuota bool) (interface{}, error)
	GetRouteFromCf(routeGuid string) (models.Route, error)
	GetSecGroupFromCf(secGroupId string) (models.SecurityGroup, error)
	GetServiceFromCf(svcGuid string) (models.ServiceInstance, error)
	GetSpaceFromCf(spaceGuid string) (models.Space, error)
	GetAppFromCf(appGuid string) (models.Application, error)
	GetServiceBindingsFromApp(appGuid string) ([]ServiceBindingFields, error)
}

func NewFinderRepository added in v0.6.0

func NewFinderRepository(config Config, ccGateway net.Gateway) FinderRepository

type LastOperation added in v0.6.0

type LastOperation struct {
	Type        string `json:"type"`
	State       string `json:"state"`
	Description string `json:"description"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
}

type PaginatedServiceInstanceResources added in v0.6.0

type PaginatedServiceInstanceResources struct {
	TotalResults int `json:"total_results"`
	Resources    []ServiceInstanceResource
}

type ServiceBindingEntity added in v0.8.0

type ServiceBindingEntity struct {
	AppGUID             string `json:"app_guid"`
	ServiceInstanceGUID string `json:"service_instance_guid"`
}

type ServiceBindingFields added in v0.8.0

type ServiceBindingFields struct {
	GUID                string
	URL                 string
	AppGUID             string
	ServiceInstanceGUID string
}

type ServiceBindingResource added in v0.8.0

type ServiceBindingResource struct {
	resources.Resource
	Entity ServiceBindingEntity
}

func (ServiceBindingResource) ToFields added in v0.8.0

func (resource ServiceBindingResource) ToFields() ServiceBindingFields

type ServiceInstanceEntity added in v0.6.0

type ServiceInstanceEntity struct {
	Name            string                             `json:"name"`
	DashboardURL    string                             `json:"dashboard_url"`
	SysLogDrainURL  string                             `json:"syslog_drain_url"`
	RouteServiceURL string                             `json:"route_service_url"`
	Tags            []string                           `json:"tags"`
	ServiceBindings []resources.ServiceBindingResource `json:"service_bindings"`
	ServiceKeys     []resources.ServiceKeyResource     `json:"service_keys"`
	ServicePlan     resources.ServicePlanResource      `json:"service_plan"`
	LastOperation   LastOperation                      `json:"last_operation"`
}

type ServiceInstanceResource added in v0.6.0

type ServiceInstanceResource struct {
	resources.Resource
	Entity ServiceInstanceEntity
}

func (ServiceInstanceResource) ToFields added in v0.6.0

func (ServiceInstanceResource) ToModel added in v0.6.0

func (resource ServiceInstanceResource) ToModel() (instance models.ServiceInstance)

type TerraformRepository

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

func (*TerraformRepository) APIEndpoint

func (c *TerraformRepository) APIEndpoint() (apiEndpoint string)

func (*TerraformRepository) APIVersion

func (c *TerraformRepository) APIVersion() (apiVersion string)

func (*TerraformRepository) AccessToken

func (c *TerraformRepository) AccessToken() (accessToken string)

func (*TerraformRepository) AsyncTimeout

func (c *TerraformRepository) AsyncTimeout() (timeout uint)

func (*TerraformRepository) AuthenticationEndpoint

func (c *TerraformRepository) AuthenticationEndpoint() (authEndpoint string)

func (*TerraformRepository) CLIVersion added in v0.7.0

func (c *TerraformRepository) CLIVersion() string

func (*TerraformRepository) ClearSession

func (c *TerraformRepository) ClearSession()

func (*TerraformRepository) Close

func (c *TerraformRepository) Close()

func (*TerraformRepository) ColorEnabled

func (c *TerraformRepository) ColorEnabled() (enabled string)

func (*TerraformRepository) DopplerEndpoint

func (c *TerraformRepository) DopplerEndpoint() (dopplerEndpoint string)

func (*TerraformRepository) HasAPIEndpoint

func (c *TerraformRepository) HasAPIEndpoint() (hasEndpoint bool)

func (*TerraformRepository) HasOrganization

func (c *TerraformRepository) HasOrganization() (hasOrg bool)

func (*TerraformRepository) HasSpace

func (c *TerraformRepository) HasSpace() (hasSpace bool)

func (*TerraformRepository) IsLoggedIn

func (c *TerraformRepository) IsLoggedIn() (loggedIn bool)

func (*TerraformRepository) IsMinAPIVersion

func (c *TerraformRepository) IsMinAPIVersion(requiredVersion semver.Version) bool

func (*TerraformRepository) IsMinCLIVersion

func (c *TerraformRepository) IsMinCLIVersion(version string) bool

func (*TerraformRepository) IsSSLDisabled

func (c *TerraformRepository) IsSSLDisabled() (isSSLDisabled bool)

func (*TerraformRepository) Locale

func (c *TerraformRepository) Locale() (locale string)

func (*TerraformRepository) LoggregatorEndpoint

func (c *TerraformRepository) LoggregatorEndpoint() (logEndpoint string)

func (*TerraformRepository) MinCLIVersion

func (c *TerraformRepository) MinCLIVersion() (minCLIVersion string)

func (*TerraformRepository) MinRecommendedCLIVersion

func (c *TerraformRepository) MinRecommendedCLIVersion() (minRecommendedCLIVersion string)

func (*TerraformRepository) OrganizationFields

func (c *TerraformRepository) OrganizationFields() (org models.OrganizationFields)

func (*TerraformRepository) PluginRepos

func (c *TerraformRepository) PluginRepos() []models.PluginRepo

func (*TerraformRepository) RefreshToken

func (c *TerraformRepository) RefreshToken() (refreshToken string)

func (*TerraformRepository) RoutingAPIEndpoint

func (c *TerraformRepository) RoutingAPIEndpoint() (routingAPIEndpoint string)

func (*TerraformRepository) SSHOAuthClient

func (c *TerraformRepository) SSHOAuthClient() (clientID string)

func (*TerraformRepository) SetAPIEndpoint

func (c *TerraformRepository) SetAPIEndpoint(endpoint string)

func (*TerraformRepository) SetAPIVersion

func (c *TerraformRepository) SetAPIVersion(version string)

func (*TerraformRepository) SetAccessToken

func (c *TerraformRepository) SetAccessToken(token string)

func (*TerraformRepository) SetAsyncTimeout

func (c *TerraformRepository) SetAsyncTimeout(timeout uint)

func (*TerraformRepository) SetAuthenticationEndpoint

func (c *TerraformRepository) SetAuthenticationEndpoint(endpoint string)

func (*TerraformRepository) SetCLIVersion added in v0.7.0

func (c *TerraformRepository) SetCLIVersion(version string)

func (*TerraformRepository) SetColorEnabled

func (c *TerraformRepository) SetColorEnabled(enabled string)

func (*TerraformRepository) SetDopplerEndpoint

func (c *TerraformRepository) SetDopplerEndpoint(endpoint string)

func (*TerraformRepository) SetLocale

func (c *TerraformRepository) SetLocale(locale string)

func (*TerraformRepository) SetLoggregatorEndpoint

func (c *TerraformRepository) SetLoggregatorEndpoint(endpoint string)

func (*TerraformRepository) SetMinCLIVersion

func (c *TerraformRepository) SetMinCLIVersion(version string)

func (*TerraformRepository) SetMinRecommendedCLIVersion

func (c *TerraformRepository) SetMinRecommendedCLIVersion(version string)

func (*TerraformRepository) SetOrganizationFields

func (c *TerraformRepository) SetOrganizationFields(org models.OrganizationFields)

func (*TerraformRepository) SetPluginRepo

func (c *TerraformRepository) SetPluginRepo(repo models.PluginRepo)

func (*TerraformRepository) SetRefreshToken

func (c *TerraformRepository) SetRefreshToken(token string)

func (*TerraformRepository) SetRoutingAPIEndpoint

func (c *TerraformRepository) SetRoutingAPIEndpoint(routingAPIEndpoint string)

func (*TerraformRepository) SetSSHOAuthClient

func (c *TerraformRepository) SetSSHOAuthClient(clientID string)

func (*TerraformRepository) SetSSLDisabled

func (c *TerraformRepository) SetSSLDisabled(disabled bool)

func (*TerraformRepository) SetSpaceFields

func (c *TerraformRepository) SetSpaceFields(space models.SpaceFields)

func (*TerraformRepository) SetTrace

func (c *TerraformRepository) SetTrace(value string)

func (*TerraformRepository) SetUAAOAuthClient added in v0.7.0

func (c *TerraformRepository) SetUAAOAuthClient(clientID string)

func (*TerraformRepository) SetUAAOAuthClientSecret added in v0.7.0

func (c *TerraformRepository) SetUAAOAuthClientSecret(clientID string)

func (*TerraformRepository) SetUaaEndpoint

func (c *TerraformRepository) SetUaaEndpoint(uaaEndpoint string)

func (*TerraformRepository) SpaceFields

func (c *TerraformRepository) SpaceFields() (space models.SpaceFields)

func (*TerraformRepository) Trace

func (c *TerraformRepository) Trace() (trace string)

func (*TerraformRepository) UAAOAuthClient added in v0.7.0

func (c *TerraformRepository) UAAOAuthClient() (clientID string)

func (*TerraformRepository) UAAOAuthClientSecret added in v0.7.0

func (c *TerraformRepository) UAAOAuthClientSecret() (clientID string)

func (*TerraformRepository) UaaEndpoint

func (c *TerraformRepository) UaaEndpoint() (uaaEndpoint string)

func (*TerraformRepository) UnSetPluginRepo

func (c *TerraformRepository) UnSetPluginRepo(index int)

func (*TerraformRepository) UserEmail

func (c *TerraformRepository) UserEmail() (email string)

func (*TerraformRepository) UserGUID

func (c *TerraformRepository) UserGUID() (guid string)

func (*TerraformRepository) Username

func (c *TerraformRepository) Username() (name string)

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