Documentation ¶
Index ¶
- func GetActiveProfilePath() (string, error)
- func GetCoPilotHomePath() (string, error)
- func GetProfilesPath() (string, error)
- func GetProfilesPathFor(profile string) (string, error)
- func InstallOrMigrateToProfiles() error
- func ProjectConfigPath(targetDir string) string
- func SetLogger(logger logrus.FieldLogger)
- func SwitchProfile(newProfile string) error
- type Artifact
- type CloudConfig
- type CloudDeprecated
- type CloudDeprecatedDependency
- type CloudProjectDefaults
- type CloudService
- type CloudServices
- type CloudTemplate
- type Context
- type DirConfig
- type Directory
- type Git
- type GitCloudConfig
- func (gitCfg GitCloudConfig) DefaultServiceEnvironmentUrl(service CloudService, key string) (url string, err error)
- func (gitCfg GitCloudConfig) Deprecated() (CloudDeprecated, error)
- func (gitCfg GitCloudConfig) Examples() (templates []string, err error)
- func (gitCfg GitCloudConfig) GitHookFiles(path string) ([]string, error)
- func (gitCfg GitCloudConfig) HasTemplate(name string) bool
- func (gitCfg GitCloudConfig) Implementation() Directory
- func (gitCfg GitCloudConfig) LinkFromService(services func() (CloudServices, error), groupId string, artifactId string, ...) (url string, err error)
- func (gitCfg GitCloudConfig) ListDeprecated() error
- func (gitCfg GitCloudConfig) ProjectDefaults() (CloudProjectDefaults, error)
- func (gitCfg GitCloudConfig) Refresh(localConfig LocalConfigFile) error
- func (gitCfg GitCloudConfig) Services() func() (CloudServices, error)
- func (gitCfg GitCloudConfig) Template(name string) (CloudTemplate, error)
- func (gitCfg GitCloudConfig) Templates() (templates []CloudTemplate, err error)
- func (gitCfg GitCloudConfig) ValidTemplatesFrom(list []string) (templates []CloudTemplate, err error)
- type GitInfo
- type Links
- type LocalConfig
- func (localCfg LocalConfig) CheckOrCreateConfigDir() error
- func (localCfg LocalConfig) Config() (LocalConfiguration, error)
- func (localCfg LocalConfig) Exists() bool
- func (localCfg LocalConfig) FilePath() string
- func (localCfg LocalConfig) Implementation() DirConfig
- func (localCfg LocalConfig) Print() error
- func (localCfg LocalConfig) TouchFile() error
- type LocalConfigFile
- type LocalConfiguration
- type LocalGitConfig
- type MavenProject
- type MavenProjectConfiguration
- type MaxArtifact
- type Project
- func (project Project) GitCommit(message string) error
- func (project Project) GitInit(msg string) error
- func (project *Project) InitProjectConfiguration() (err error)
- func (project Project) IsDirtyGitRepo() bool
- func (project Project) IsGitRepo() bool
- func (project Project) IsMavenProject() bool
- func (project Project) IsMultiModule() bool
- func (project Project) SortAndWritePom() error
- type ProjectConfig
- type ProjectConfiguration
- func (config ProjectConfiguration) Empty() bool
- func (config *ProjectConfiguration) FindApplicationName(targetDir string) (err error)
- func (config *ProjectConfiguration) GetLanguage() string
- func (config *ProjectConfiguration) Populate(targetDir string) error
- func (config ProjectConfiguration) SourceMainPath() string
- func (config ProjectConfiguration) SourceTestPath() string
- func (config ProjectConfiguration) Validate() error
- func (config ProjectConfiguration) WriteTo(targetFile string) error
- type ProjectSettings
- type ProjectType
- type SourceProvider
- type ValidProjectType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetActiveProfilePath ¶ added in v0.5.0
func GetCoPilotHomePath ¶ added in v0.5.0
func GetProfilesPath ¶ added in v0.5.0
func GetProfilesPathFor ¶ added in v0.5.1
func InstallOrMigrateToProfiles ¶ added in v0.5.4
func InstallOrMigrateToProfiles() error
func ProjectConfigPath ¶
func SetLogger ¶
func SetLogger(logger logrus.FieldLogger)
func SwitchProfile ¶ added in v0.5.0
Types ¶
type CloudConfig ¶
type CloudConfig interface { Implementation() Directory Refresh(localConfig LocalConfigFile) error Services() func() (CloudServices, error) LinkFromService(services func() (CloudServices, error), groupId string, artifactId string, linkKey string) (url string, err error) DefaultServiceEnvironmentUrl(service CloudService, key string) (url string, err error) Deprecated() (CloudDeprecated, error) ProjectDefaults() (CloudProjectDefaults, error) GitHookFiles(folderName string) ([]string, error) ListDeprecated() error HasTemplate(name string) bool ValidTemplatesFrom(list []string) (templates []CloudTemplate, err error) Templates() (templates []CloudTemplate, err error) Template(name string) (CloudTemplate, error) Examples() (templates []string, err error) }
type CloudDeprecated ¶
type CloudDeprecated struct { Type string `json:"type"` Data struct { Dependencies []CloudDeprecatedDependency `json:"dependencies"` } `json:"data"` }
type CloudDeprecatedDependency ¶
type CloudDeprecatedDependency struct { GroupId string `json:"groupId"` ArtifactId string `json:"artifactId"` Files []string `json:"files"` Associated struct { Files []string `json:"files"` Dependencies []CloudDeprecatedDependency `json:"dependencies"` } `json:"associated"` ReplacementTemplates []string `json:"replacement_templates"` }
type CloudProjectDefaults ¶ added in v0.4.4
type CloudProjectDefaults struct { Type string `json:"type"` Settings ProjectSettings `json:"settings"` }
type CloudService ¶
type CloudService struct { GroupID string `json:"groupId"` ArtifactID string `json:"artifactId"` BuildInfo string `json:"build-info"` DefaultEnvironment string `json:"defaultEnvironment"` Environments []struct { Name string `json:"name"` Links map[string]Links `json:"_links"` } `json:"environments"` }
type CloudServices ¶
type CloudServices struct { Type string `json:"type"` Data []CloudService `json:"data"` }
type CloudTemplate ¶
type Context ¶
type Context struct { Recursive bool DryRun bool TargetDirectory string DisableGit bool ForceCloudSync bool OpenInBrowser bool Projects []Project Err error ProfilesPath string LocalConfig LocalConfig CloudConfig CloudConfig }
func (*Context) FindAndPopulateMavenProjects ¶
func (*Context) LoadProfile ¶ added in v0.6.0
func (Context) OnEachProject ¶
type GitCloudConfig ¶
type GitCloudConfig struct {
Impl DirConfig
}
func OpenGitCloudConfig ¶ added in v0.5.0
func OpenGitCloudConfig(localConfigPath string) (cfg GitCloudConfig)
func (GitCloudConfig) DefaultServiceEnvironmentUrl ¶
func (gitCfg GitCloudConfig) DefaultServiceEnvironmentUrl(service CloudService, key string) (url string, err error)
func (GitCloudConfig) Deprecated ¶
func (gitCfg GitCloudConfig) Deprecated() (CloudDeprecated, error)
func (GitCloudConfig) Examples ¶ added in v0.6.0
func (gitCfg GitCloudConfig) Examples() (templates []string, err error)
func (GitCloudConfig) GitHookFiles ¶ added in v0.4.6
func (gitCfg GitCloudConfig) GitHookFiles(path string) ([]string, error)
func (GitCloudConfig) HasTemplate ¶
func (gitCfg GitCloudConfig) HasTemplate(name string) bool
func (GitCloudConfig) Implementation ¶
func (gitCfg GitCloudConfig) Implementation() Directory
func (GitCloudConfig) LinkFromService ¶
func (gitCfg GitCloudConfig) LinkFromService(services func() (CloudServices, error), groupId string, artifactId string, linkKey string) (url string, err error)
func (GitCloudConfig) ListDeprecated ¶
func (gitCfg GitCloudConfig) ListDeprecated() error
func (GitCloudConfig) ProjectDefaults ¶ added in v0.4.4
func (gitCfg GitCloudConfig) ProjectDefaults() (CloudProjectDefaults, error)
func (GitCloudConfig) Refresh ¶
func (gitCfg GitCloudConfig) Refresh(localConfig LocalConfigFile) error
func (GitCloudConfig) Services ¶
func (gitCfg GitCloudConfig) Services() func() (CloudServices, error)
func (GitCloudConfig) Template ¶
func (gitCfg GitCloudConfig) Template(name string) (CloudTemplate, error)
func (GitCloudConfig) Templates ¶
func (gitCfg GitCloudConfig) Templates() (templates []CloudTemplate, err error)
func (GitCloudConfig) ValidTemplatesFrom ¶
func (gitCfg GitCloudConfig) ValidTemplatesFrom(list []string) (templates []CloudTemplate, err error)
type GitInfo ¶
func GetGitInfoFromPath ¶
type LocalConfig ¶
type LocalConfig struct {
// contains filtered or unexported fields
}
func NewLocalConfig ¶
func NewLocalConfig(absConfigDir string) (cfg LocalConfig)
func (LocalConfig) CheckOrCreateConfigDir ¶
func (localCfg LocalConfig) CheckOrCreateConfigDir() error
func (LocalConfig) Config ¶
func (localCfg LocalConfig) Config() (LocalConfiguration, error)
func (LocalConfig) Exists ¶
func (localCfg LocalConfig) Exists() bool
func (LocalConfig) FilePath ¶
func (localCfg LocalConfig) FilePath() string
func (LocalConfig) Implementation ¶
func (localCfg LocalConfig) Implementation() DirConfig
func (LocalConfig) Print ¶
func (localCfg LocalConfig) Print() error
func (LocalConfig) TouchFile ¶
func (localCfg LocalConfig) TouchFile() error
type LocalConfigFile ¶
type LocalConfiguration ¶
type LocalConfiguration struct { CloudConfig LocalGitConfig `yaml:"cloudConfig"` SourceProvider SourceProvider `yaml:"sourceProvider"` }
type LocalGitConfig ¶
type LocalGitConfig struct {
Git Git `yaml:"git"`
}
type MavenProject ¶
func (MavenProject) FilePath ¶
func (mvnProject MavenProject) FilePath() string
func (MavenProject) Model ¶
func (mvnProject MavenProject) Model() *pom.Model
func (MavenProject) Type ¶
func (mvnProject MavenProject) Type() ValidProjectType
type MaxArtifact ¶ added in v0.4.4
type Project ¶
type Project struct { Path string GitInfo GitInfo ConfigFile string Config ProjectConfiguration Type ProjectType CloudConfig CloudConfig }
func InitProjectFromPomFile ¶
func (*Project) InitProjectConfiguration ¶
func (Project) IsDirtyGitRepo ¶
func (Project) IsMavenProject ¶
func (Project) IsMultiModule ¶ added in v0.6.0
func (Project) SortAndWritePom ¶
type ProjectConfig ¶
type ProjectConfiguration ¶
type ProjectConfiguration struct { MavenProjectConfiguration Profile string `json:"profile,omitempty"` Name string `json:"name"` Description string `json:"description"` Team struct { Name string `json:"name"` Email string `json:"email"` } `json:"team"` Dependencies []string `json:"dependencies"` Templates []string `json:"templates"` Settings ProjectSettings `json:"settings"` Render map[string]string `json:"render"` }
func InitProjectConfigurationFromDir ¶
func InitProjectConfigurationFromDir(targetDir string) (ProjectConfiguration, error)
func InitProjectConfigurationFromFile ¶
func InitProjectConfigurationFromFile(filePath string) (ProjectConfiguration, error)
func (ProjectConfiguration) Empty ¶
func (config ProjectConfiguration) Empty() bool
func (*ProjectConfiguration) FindApplicationName ¶
func (config *ProjectConfiguration) FindApplicationName(targetDir string) (err error)
func (*ProjectConfiguration) GetLanguage ¶
func (config *ProjectConfiguration) GetLanguage() string
func (*ProjectConfiguration) Populate ¶
func (config *ProjectConfiguration) Populate(targetDir string) error
func (ProjectConfiguration) SourceMainPath ¶
func (config ProjectConfiguration) SourceMainPath() string
func (ProjectConfiguration) SourceTestPath ¶
func (config ProjectConfiguration) SourceTestPath() string
func (ProjectConfiguration) Validate ¶ added in v0.3.11
func (config ProjectConfiguration) Validate() error
func (ProjectConfiguration) WriteTo ¶
func (config ProjectConfiguration) WriteTo(targetFile string) error
type ProjectSettings ¶
type ProjectSettings struct { DisableDependencySort bool `json:"disableDependencySort"` DisableSpringBootUpgrade bool `json:"disableSpringBootUpgrade"` DisableKotlinUpgrade bool `json:"disableKotlinUpgrade"` DisableUpgradesFor []Artifact `json:"disableUpgradesFor"` MaxVersionForDependencies []MaxArtifact `json:"maxVersionForDependencies"` }
func (ProjectSettings) DependencyIsIgnored ¶
func (projectSettings ProjectSettings) DependencyIsIgnored(dep pom.Dependency) bool
func (ProjectSettings) MaxVersionFor ¶ added in v0.4.4
func (projectSettings ProjectSettings) MaxVersionFor(dep pom.Dependency) string
func (ProjectSettings) PluginIsIgnored ¶
func (projectSettings ProjectSettings) PluginIsIgnored(plugin pom.Plugin) bool
type ProjectType ¶
type ProjectType interface { Type() ValidProjectType FilePath() string Model() *pom.Model }
type SourceProvider ¶
Click to show internal directories.
Click to hide internal directories.