Documentation ¶
Index ¶
- func ContextWithConfig(ctx context.Context, config *Config) context.Context
- func ContextWithProgress(ctx context.Context, p *mpb.Progress) context.Context
- func ContextWithSummary(ctx context.Context, summary *report.Summary) context.Context
- func NewFieldError(field string, err error) error
- func NewFieldsError(fields []string, err error) error
- func ProgressFromContext(ctx context.Context) (*mpb.Progress, bool)
- func SummaryFromContext(ctx context.Context) (*report.Summary, bool)
- type Authentication
- type Bosh
- type BoshProperties
- type BoshPropertiesBuilder
- type CCDBProperties
- type CCDBPropertiesBuilder
- type CFProperties
- type CFPropertiesBuilder
- type ClientCredentials
- type CloudController
- type Config
- type EnvProperties
- type FieldError
- type Loader
- type MapDecoder
- type Migration
- type MigrationDecoder
- type MigrationReader
- type Migrator
- type OpsManager
- type PropertiesProvider
- type UAAAuthentication
- type UserCredentials
- type YAMLMigrationReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithConfig ¶
func ContextWithProgress ¶
func ContextWithSummary ¶
func NewFieldError ¶
func NewFieldsError ¶
func ProgressFromContext ¶
Types ¶
type Authentication ¶
type Authentication struct { Basic UserCredentials UAA UAAAuthentication }
func (Authentication) IsSet ¶
func (a Authentication) IsSet() bool
func (Authentication) Validate ¶
func (a Authentication) Validate(URLRequired bool) error
type Bosh ¶
type Bosh struct { URL string `yaml:"url" mapstructure:"url"` AllProxy string `yaml:"all_proxy" mapstructure:"all_proxy"` TrustedCert string `yaml:"root_ca_cert" mapstructure:"root_ca_cert"` Authentication Authentication Deployment string }
type BoshProperties ¶
type BoshProperties struct {
URL, AllProxy, ClientID, ClientSecret string
RootCA []httpclient.CA
Deployment string
}
type BoshPropertiesBuilder ¶
type BoshPropertiesBuilder interface {
Build() *BoshProperties
}
type CCDBProperties ¶
type CCDBPropertiesBuilder ¶
type CCDBPropertiesBuilder interface {
Build() *CCDBProperties
}
type CFProperties ¶
type CFProperties struct {
URL, Username, Password string
}
type CFPropertiesBuilder ¶
type CFPropertiesBuilder interface {
Build() *CFProperties
}
type ClientCredentials ¶
type ClientCredentials struct { ID string `yaml:"client_id" mapstructure:"client_id"` Secret string `yaml:"client_secret" mapstructure:"client_secret"` }
func (ClientCredentials) IsSet ¶
func (cc ClientCredentials) IsSet() bool
func (ClientCredentials) Validate ¶
func (cc ClientCredentials) Validate() error
type CloudController ¶
type CloudController struct { URL string `yaml:"url" mapstructure:"url"` Username string `yaml:"username" mapstructure:"username"` Password string `yaml:"password" mapstructure:"password"` ClientID string `yaml:"client_id" mapstructure:"client_id"` ClientSecret string `yaml:"client_secret" mapstructure:"client_secret"` }
func (CloudController) IsSet ¶
func (c CloudController) IsSet() bool
func (CloudController) Validate ¶
func (c CloudController) Validate() error
type Config ¶
type Config struct { ConfigDir string ConfigFile string Debug bool DryRun bool `mapstructure:"dry_run"` DomainsToReplace map[string]string ExportDir string `mapstructure:"export_dir"` ExcludedOrgs []string `mapstructure:"exclude_orgs"` IncludedOrgs []string `mapstructure:"include_orgs"` IgnoreServiceKeys bool `mapstructure:"ignore_service_keys"` Foundations struct { Source OpsManager `yaml:"source"` Target OpsManager `yaml:"target"` } `yaml:"foundations"` Migration Migration Name string Services []string `mapstructure:"services"` Instances []string `mapstructure:"instances"` SourceApi CloudController `yaml:"source_api" mapstructure:"source_api"` SourceBosh Bosh `yaml:"source_bosh" mapstructure:"source_bosh"` TargetApi CloudController `yaml:"target_api" mapstructure:"target_api"` TargetBosh Bosh `yaml:"target_bosh" mapstructure:"target_bosh"` // contains filtered or unexported fields }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type EnvProperties ¶
type EnvProperties struct { *BoshProperties *CFProperties *CCDBProperties }
type FieldError ¶
func (FieldError) Error ¶
func (f FieldError) Error() string
type Loader ¶
type Loader interface { BoshConfig(toSource bool) *Bosh SourceBoshConfig() *Bosh TargetBoshConfig() *Bosh CFConfig(toSource bool) *CloudController SourceApiConfig() *CloudController TargetApiConfig() *CloudController CCDBConfig(m string, toSource bool) interface{} SourceCCDBConfig(m string) interface{} TargetCCDBConfig(m string) interface{} }
type MapDecoder ¶
type MapDecoder struct { Config *interface{} Decoder *mapstructure.Decoder }
func NewMapDecoder ¶
func NewMapDecoder(cfg interface{}) MapDecoder
func (MapDecoder) Decode ¶
func (d MapDecoder) Decode(migration Migration, key string) interface{}
type MigrationDecoder ¶
type MigrationReader ¶
type Migrator ¶
type Migrator struct { Name string `yaml:"name" mapstructure:"name"` Value map[string]interface{} `yaml:"migrator" mapstructure:"migrator"` }
func LookupMigrator ¶
type OpsManager ¶
type OpsManager struct { URL string `yaml:"url"` Username string `yaml:"username"` Password string `yaml:"password"` ClientID string `yaml:"client_id" mapstructure:"client_id"` ClientSecret string `yaml:"client_secret" mapstructure:"client_secret"` Hostname string `yaml:"hostname,omitempty" mapstructure:"hostname,omitempty"` IP string `yaml:"ip,omitempty" mapstructure:"ip,omitempty"` PrivateKey string `yaml:"private_key,omitempty" mapstructure:"private_key,omitempty"` SshUser string `yaml:"ssh_user,omitempty" mapstructure:"ssh_user,omitempty"` }
func (OpsManager) Validate ¶
func (c OpsManager) Validate() error
func (OpsManager) ValidateSSH ¶
func (c OpsManager) ValidateSSH() error
type PropertiesProvider ¶
type PropertiesProvider interface { Environment(BoshPropertiesBuilder, CFPropertiesBuilder, CCDBPropertiesBuilder) EnvProperties SourceBoshPropertiesBuilder() BoshPropertiesBuilder TargetBoshPropertiesBuilder() BoshPropertiesBuilder SourceCFPropertiesBuilder() CFPropertiesBuilder TargetCFPropertiesBuilder() CFPropertiesBuilder SourceCCDBPropertiesBuilder(b BoshPropertiesBuilder) CCDBPropertiesBuilder TargetCCDBPropertiesBuilder(b BoshPropertiesBuilder) CCDBPropertiesBuilder }
type UAAAuthentication ¶
type UAAAuthentication struct { URL string ClientCredentials ClientCredentials `yaml:"client_credentials" mapstructure:"client_credentials"` UserCredentials UserCredentials `yaml:"user_credentials" mapstructure:"user_credentials"` }
func (UAAAuthentication) IsSet ¶
func (a UAAAuthentication) IsSet() bool
func (UAAAuthentication) Validate ¶
func (a UAAAuthentication) Validate(URLRequired bool) error
type UserCredentials ¶
func (UserCredentials) IsSet ¶
func (c UserCredentials) IsSet() bool
func (UserCredentials) Validate ¶
func (c UserCredentials) Validate() error
type YAMLMigrationReader ¶
type YAMLMigrationReader struct {
// contains filtered or unexported fields
}
func NewMigrationReader ¶
func NewMigrationReader(cfg *Config) (*YAMLMigrationReader, error)
func ReadFromDir ¶
func ReadFromDir(path string) (*YAMLMigrationReader, error)
func (*YAMLMigrationReader) GetMigration ¶
func (r *YAMLMigrationReader) GetMigration() (*Migration, error)
func (*YAMLMigrationReader) GetString ¶
func (r *YAMLMigrationReader) GetString() (string, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.