Documentation ¶
Index ¶
- func CreateService(orgName, spaceName string, instance *cf.ServiceInstance, h ClientHolder, ...) flow.StepFunc
- func CreateUserProvidedService(orgName, spaceName string, instance *cf.ServiceInstance, holder ClientHolder, ...) flow.StepFunc
- func NewManagedServiceFlow(org, space string, h ClientHolder, instance *cf.ServiceInstance, isExport bool) flow.Flow
- func NewUserProvidedServiceFlow(org, space string, h ClientHolder, instance *cf.ServiceInstance, isExport bool) flow.Flow
- func ReplaceDomain(val string, domainsToReplace map[string]string) string
- type ClientFactory
- func (f *ClientFactory) CFClient(toSource bool) cf.Client
- func (f *ClientFactory) SourceBoshClient() bosh.Client
- func (f *ClientFactory) SourceCFClient() cf.Client
- func (f *ClientFactory) SourceOpsManClient() om.Client
- func (f *ClientFactory) TargetBoshClient() bosh.Client
- func (f *ClientFactory) TargetCFClient() cf.Client
- func (f *ClientFactory) TargetOpsManClient() om.Client
- type ClientHolder
- type ConfigLoader
- func (l ConfigLoader) BoshConfig(toSource bool) *config.Bosh
- func (l ConfigLoader) BuildSourceConfig()
- func (l ConfigLoader) BuildTargetConfig()
- func (l ConfigLoader) CCDBConfig(m string, toSource bool) interface{}
- func (l ConfigLoader) CFConfig(toSource bool) *config.CloudController
- func (l ConfigLoader) SourceApiConfig() *config.CloudController
- func (l ConfigLoader) SourceBoshConfig() *config.Bosh
- func (l ConfigLoader) SourceCCDBConfig(m string) interface{}
- func (l ConfigLoader) TargetApiConfig() *config.CloudController
- func (l ConfigLoader) TargetBoshConfig() *config.Bosh
- func (l ConfigLoader) TargetCCDBConfig(m string) interface{}
- type DefaultMigratorRegistry
- type DefaultServiceInstanceExporter
- type Factory
- type ManagedServiceInstanceImporter
- type ManagedServiceMigrator
- type Migrator
- type MigratorFactory
- type MigratorHelper
- func (h *MigratorHelper) GetMigratorConfig(data interface{}, si *cf.ServiceInstance) (interface{}, error)
- func (h *MigratorHelper) GetMigratorType(service string) (Migrator, bool)
- func (h *MigratorHelper) GetReader() config.MigrationReader
- func (h *MigratorHelper) IsCCDBMigrator(service string) bool
- type MigratorRegistry
- type OrgExporter
- func (e OrgExporter) ExcludeOrg(orgName string) bool
- func (e OrgExporter) Export(ctx context.Context, om config.OpsManager, dir string, orgs ...string) error
- func (e OrgExporter) ExportAll(ctx context.Context, om config.OpsManager, dir string) error
- func (e OrgExporter) IncludeOrg(orgName string) bool
- type OrgImporter
- func (i OrgImporter) ExcludeOrg(orgName string) bool
- func (i OrgImporter) Import(ctx context.Context, om config.OpsManager, dir string, orgs ...string) error
- func (i OrgImporter) ImportAll(ctx context.Context, om config.OpsManager, dir string) error
- func (i OrgImporter) IncludeOrg(orgName string) bool
- type Service
- type ServiceInstanceExporter
- type ServiceInstanceImporter
- type ServiceInstanceMigrator
- type ServiceInstanceParser
- type ServiceType
- type SpaceExporter
- type SpaceImporter
- type UserProvidedServiceMigrator
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateService ¶
func CreateService(orgName, spaceName string, instance *cf.ServiceInstance, h ClientHolder, isExport bool) flow.StepFunc
func CreateUserProvidedService ¶
func CreateUserProvidedService(orgName, spaceName string, instance *cf.ServiceInstance, holder ClientHolder, isExport bool) flow.StepFunc
func NewManagedServiceFlow ¶
func NewManagedServiceFlow(org, space string, h ClientHolder, instance *cf.ServiceInstance, isExport bool) flow.Flow
func NewUserProvidedServiceFlow ¶
func NewUserProvidedServiceFlow(org, space string, h ClientHolder, instance *cf.ServiceInstance, isExport bool) flow.Flow
Types ¶
type ClientFactory ¶
type ClientFactory struct { ConfigLoader config.Loader BoshFactory bosh.ClientFactory OpsmanFactory om.ClientFactory OpsmanConfig config.OpsManager // contains filtered or unexported fields }
func NewClientFactory ¶
func NewClientFactory( configLoader config.Loader, boshFactory bosh.ClientFactory, opsmanFactory om.ClientFactory, opsManConfig config.OpsManager, ) *ClientFactory
func (*ClientFactory) SourceBoshClient ¶
func (f *ClientFactory) SourceBoshClient() bosh.Client
func (*ClientFactory) SourceCFClient ¶
func (f *ClientFactory) SourceCFClient() cf.Client
func (*ClientFactory) SourceOpsManClient ¶
func (f *ClientFactory) SourceOpsManClient() om.Client
func (*ClientFactory) TargetBoshClient ¶
func (f *ClientFactory) TargetBoshClient() bosh.Client
func (*ClientFactory) TargetCFClient ¶
func (f *ClientFactory) TargetCFClient() cf.Client
func (*ClientFactory) TargetOpsManClient ¶
func (f *ClientFactory) TargetOpsManClient() om.Client
type ClientHolder ¶
type ConfigLoader ¶
type ConfigLoader struct {
// contains filtered or unexported fields
}
func NewConfigLoader ¶
func NewConfigLoader( cfg *config.Config, mr config.MigrationReader, pp config.PropertiesProvider, ) ConfigLoader
func (ConfigLoader) BoshConfig ¶
func (l ConfigLoader) BoshConfig(toSource bool) *config.Bosh
func (ConfigLoader) BuildSourceConfig ¶
func (l ConfigLoader) BuildSourceConfig()
func (ConfigLoader) BuildTargetConfig ¶
func (l ConfigLoader) BuildTargetConfig()
func (ConfigLoader) CCDBConfig ¶
func (l ConfigLoader) CCDBConfig(m string, toSource bool) interface{}
func (ConfigLoader) CFConfig ¶
func (l ConfigLoader) CFConfig(toSource bool) *config.CloudController
func (ConfigLoader) SourceApiConfig ¶
func (l ConfigLoader) SourceApiConfig() *config.CloudController
func (ConfigLoader) SourceBoshConfig ¶
func (l ConfigLoader) SourceBoshConfig() *config.Bosh
func (ConfigLoader) SourceCCDBConfig ¶
func (l ConfigLoader) SourceCCDBConfig(m string) interface{}
func (ConfigLoader) TargetApiConfig ¶
func (l ConfigLoader) TargetApiConfig() *config.CloudController
func (ConfigLoader) TargetBoshConfig ¶
func (l ConfigLoader) TargetBoshConfig() *config.Bosh
func (ConfigLoader) TargetCCDBConfig ¶
func (l ConfigLoader) TargetCCDBConfig(m string) interface{}
type DefaultMigratorRegistry ¶
type DefaultMigratorRegistry struct {
// contains filtered or unexported fields
}
func NewMigratorRegistry ¶
func NewMigratorRegistry( factory Factory, helper *MigratorHelper, cfg *config.Config, cfgLoader config.Loader, clientHolder ClientHolder, ) *DefaultMigratorRegistry
func (*DefaultMigratorRegistry) Lookup ¶
func (r *DefaultMigratorRegistry) Lookup(org, space string, si *cf.ServiceInstance, om config.OpsManager, dir string, isExport bool) (ServiceInstanceMigrator, bool, error)
type DefaultServiceInstanceExporter ¶
type DefaultServiceInstanceExporter struct { ClientHolder ClientHolder Registry MigratorRegistry Parser ServiceInstanceParser // contains filtered or unexported fields }
func NewServiceInstanceExporter ¶
func NewServiceInstanceExporter(cfg *config.Config, h ClientHolder, registry MigratorRegistry, parser ServiceInstanceParser) *DefaultServiceInstanceExporter
func (*DefaultServiceInstanceExporter) ExportManagedServices ¶
func (e *DefaultServiceInstanceExporter) ExportManagedServices(ctx context.Context, org cfclient.Org, space cfclient.Space, om config.OpsManager, dir string) error
func (*DefaultServiceInstanceExporter) ExportUserProvidedServices ¶
func (e *DefaultServiceInstanceExporter) ExportUserProvidedServices(ctx context.Context, org cfclient.Org, space cfclient.Space, dir string) error
type Factory ¶
type Factory interface {
New(org, space string, si *cf.ServiceInstance, om config.OpsManager, l config.Loader, h ClientHolder, dir string, isExport bool) (ServiceInstanceMigrator, error)
}
type ManagedServiceInstanceImporter ¶
type ManagedServiceInstanceImporter struct {
Registry MigratorRegistry
}
func NewServiceInstanceImporter ¶
func NewServiceInstanceImporter(registry MigratorRegistry) ManagedServiceInstanceImporter
func (ManagedServiceInstanceImporter) ImportManagedService ¶
func (i ManagedServiceInstanceImporter) ImportManagedService(ctx context.Context, org, space string, si *cf.ServiceInstance, om config.OpsManager, dir string) error
type ManagedServiceMigrator ¶
type ManagedServiceMigrator struct {
// contains filtered or unexported fields
}
func NewManagedServiceMigrator ¶
func NewManagedServiceMigrator(flow flow.Flow) ManagedServiceMigrator
func (ManagedServiceMigrator) Migrate ¶
func (m ManagedServiceMigrator) Migrate(ctx context.Context) (*cf.ServiceInstance, error)
func (ManagedServiceMigrator) Validate ¶
func (m ManagedServiceMigrator) Validate(si *cf.ServiceInstance, export bool) error
type MigratorFactory ¶
type MigratorFactory struct {
// contains filtered or unexported fields
}
func NewMigratorFactory ¶
func NewMigratorFactory(l config.Loader, h ClientHolder, mh *MigratorHelper, e exec.Executor, sf cc.CloudControllerServiceFactory) *MigratorFactory
func (*MigratorFactory) New ¶
func (f *MigratorFactory) New(org, space string, si *cf.ServiceInstance, om config.OpsManager, l config.Loader, h ClientHolder, dir string, isExport bool) (ServiceInstanceMigrator, error)
type MigratorHelper ¶
type MigratorHelper struct {
// contains filtered or unexported fields
}
func NewMigratorHelper ¶
func NewMigratorHelper(mr config.MigrationReader) *MigratorHelper
func (*MigratorHelper) GetMigratorConfig ¶
func (h *MigratorHelper) GetMigratorConfig(data interface{}, si *cf.ServiceInstance) (interface{}, error)
func (*MigratorHelper) GetMigratorType ¶
func (h *MigratorHelper) GetMigratorType(service string) (Migrator, bool)
func (*MigratorHelper) GetReader ¶
func (h *MigratorHelper) GetReader() config.MigrationReader
func (*MigratorHelper) IsCCDBMigrator ¶
func (h *MigratorHelper) IsCCDBMigrator(service string) bool
type MigratorRegistry ¶
type MigratorRegistry interface {
Lookup(org, space string, si *cf.ServiceInstance, om config.OpsManager, dir string, isExport bool) (ServiceInstanceMigrator, bool, error)
}
type OrgExporter ¶
type OrgExporter struct { ClientHolder ClientHolder ExcludedOrgs []string IncludedOrgs []string ServiceInstanceExporter ServiceInstanceExporter }
func NewOrgExporter ¶
func NewOrgExporter(e ServiceInstanceExporter, h ClientHolder, includedOrgs []string, excludedOrgs []string) *OrgExporter
func (OrgExporter) ExcludeOrg ¶
func (e OrgExporter) ExcludeOrg(orgName string) bool
func (OrgExporter) Export ¶
func (e OrgExporter) Export(ctx context.Context, om config.OpsManager, dir string, orgs ...string) error
func (OrgExporter) ExportAll ¶
func (e OrgExporter) ExportAll(ctx context.Context, om config.OpsManager, dir string) error
func (OrgExporter) IncludeOrg ¶
func (e OrgExporter) IncludeOrg(orgName string) bool
type OrgImporter ¶
type OrgImporter struct { IncludedOrgs []string ExcludedOrgs []string *SpaceImporter }
func NewOrgImporter ¶
func NewOrgImporter(spaceImporter *SpaceImporter, includedOrgs []string, excludedOrgs []string) *OrgImporter
func (OrgImporter) ExcludeOrg ¶
func (i OrgImporter) ExcludeOrg(orgName string) bool
func (OrgImporter) Import ¶
func (i OrgImporter) Import(ctx context.Context, om config.OpsManager, dir string, orgs ...string) error
func (OrgImporter) ImportAll ¶
func (i OrgImporter) ImportAll(ctx context.Context, om config.OpsManager, dir string) error
func (OrgImporter) IncludeOrg ¶
func (i OrgImporter) IncludeOrg(orgName string) bool
type ServiceInstanceExporter ¶
type ServiceInstanceImporter ¶
type ServiceInstanceImporter interface {
ImportManagedService(ctx context.Context, org string, space string, instance *cf.ServiceInstance, om config.OpsManager, dir string) error
}
type ServiceInstanceMigrator ¶
type ServiceInstanceParser ¶
type ServiceInstanceParser interface { Unmarshal(out interface{}, fd io.FileDescriptor) error Marshal(in interface{}, fd io.FileDescriptor) error }
type ServiceType ¶
type ServiceType string
const ( ManagedService ServiceType = "managed_service_instance" UserProvidedService ServiceType = "user_provided_service_instance" )
func (ServiceType) String ¶
func (t ServiceType) String() string
type SpaceExporter ¶
type SpaceExporter struct { ClientHolder ClientHolder ServiceInstanceExporter }
func NewSpaceExporter ¶
func NewSpaceExporter(e ServiceInstanceExporter, h ClientHolder) *SpaceExporter
func (SpaceExporter) Export ¶
func (e SpaceExporter) Export(ctx context.Context, om config.OpsManager, dir string, orgName, spaceName string) error
type SpaceImporter ¶
type SpaceImporter struct {
ServiceInstanceImporter
}
func NewSpaceImporter ¶
func NewSpaceImporter(serviceInstanceImporter ServiceInstanceImporter) *SpaceImporter
func (SpaceImporter) Import ¶
func (i SpaceImporter) Import(ctx context.Context, om config.OpsManager, dir string, orgName, spaceName string) error
type UserProvidedServiceMigrator ¶
type UserProvidedServiceMigrator struct {
// contains filtered or unexported fields
}
func NewUserProvidedServiceMigrator ¶
func NewUserProvidedServiceMigrator(flow flow.Flow) UserProvidedServiceMigrator
func (UserProvidedServiceMigrator) Migrate ¶
func (m UserProvidedServiceMigrator) Migrate(ctx context.Context) (*cf.ServiceInstance, error)
func (UserProvidedServiceMigrator) Validate ¶
func (m UserProvidedServiceMigrator) Validate(si *cf.ServiceInstance, export bool) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
db/fakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
fakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
s3/fakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.