Documentation ¶
Index ¶
- Constants
- Variables
- func GetProjectConfFilePath(projectType ProjectType) (confFilePath string, exists bool, err error)
- func ReadConfigFile(configPath string, configType ConfigType) (config *viper.Viper, err error)
- type ConfigType
- type MissingResolverErr
- type ProjectType
- type Repository
- type RepositoryConfig
- func (repo *RepositoryConfig) IsServerDetailsEmpty() bool
- func (repo *RepositoryConfig) ServerDetails() (*config.ServerDetails, error)
- func (repo *RepositoryConfig) SetServerDetails(rtDetails *config.ServerDetails) *RepositoryConfig
- func (repo *RepositoryConfig) SetTargetRepo(targetRepo string) *RepositoryConfig
- func (repo *RepositoryConfig) TargetRepo() string
Constants ¶
View Source
const ( ProjectConfigResolverPrefix = "resolver" ProjectConfigDeployerPrefix = "deployer" ProjectConfigRepo = "repo" ProjectConfigReleaseRepo = "releaseRepo" ProjectConfigServerId = "serverId" )
Variables ¶
View Source
var ProjectTypes = []string{
"go",
"pip",
"pipenv",
"poetry",
"npm",
"yarn",
"nuget",
"maven",
"gradle",
"dotnet",
"build",
"terraform",
}
Functions ¶
func GetProjectConfFilePath ¶
func GetProjectConfFilePath(projectType ProjectType) (confFilePath string, exists bool, err error)
If configuration file exists in the working dir or in one of its parent dirs return its path, otherwise return the global configuration file path
func ReadConfigFile ¶
func ReadConfigFile(configPath string, configType ConfigType) (config *viper.Viper, err error)
Types ¶
type ConfigType ¶
type ConfigType string
const ( YAML ConfigType = "yaml" PROPERTIES ConfigType = "properties" )
type MissingResolverErr ¶
type MissingResolverErr struct {
// contains filtered or unexported fields
}
func (*MissingResolverErr) Error ¶
func (mre *MissingResolverErr) Error() string
type ProjectType ¶
type ProjectType int
const ( Go ProjectType = iota Pip Pipenv Poetry Npm Yarn Nuget Maven Gradle Dotnet Build Terraform )
func (ProjectType) String ¶
func (projectType ProjectType) String() string
type Repository ¶
type Repository struct { Repo string `yaml:"repo,omitempty"` ServerId string `yaml:"serverId,omitempty"` SnapshotRepo string `yaml:"snapshotRepo,omitempty"` ReleaseRepo string `yaml:"releaseRepo,omitempty"` DeployMavenDesc bool `yaml:"deployMavenDescriptors,omitempty"` DeployIvyDesc bool `yaml:"deployIvyDescriptors,omitempty"` IvyPattern string `yaml:"ivyPattern,omitempty"` ArtifactsPattern string `yaml:"artifactPattern,omitempty"` NugetV2 bool `yaml:"nugetV2,omitempty"` IncludePatterns string `yaml:"includePatterns,omitempty"` ExcludePatterns string `yaml:"excludePatterns,omitempty"` }
type RepositoryConfig ¶
type RepositoryConfig struct {
// contains filtered or unexported fields
}
func GetRepoConfigByPrefix ¶
func GetRepoConfigByPrefix(configFilePath, prefix string, vConfig *viper.Viper) (repoConfig *RepositoryConfig, err error)
func GetResolutionOnlyConfiguration ¶
func GetResolutionOnlyConfiguration(projectType ProjectType) (*RepositoryConfig, error)
func ReadResolutionOnlyConfiguration ¶
func ReadResolutionOnlyConfiguration(confFilePath string) (*RepositoryConfig, error)
func (*RepositoryConfig) IsServerDetailsEmpty ¶
func (repo *RepositoryConfig) IsServerDetailsEmpty() bool
func (*RepositoryConfig) ServerDetails ¶
func (repo *RepositoryConfig) ServerDetails() (*config.ServerDetails, error)
func (*RepositoryConfig) SetServerDetails ¶
func (repo *RepositoryConfig) SetServerDetails(rtDetails *config.ServerDetails) *RepositoryConfig
func (*RepositoryConfig) SetTargetRepo ¶
func (repo *RepositoryConfig) SetTargetRepo(targetRepo string) *RepositoryConfig
func (*RepositoryConfig) TargetRepo ¶
func (repo *RepositoryConfig) TargetRepo() string
Click to show internal directories.
Click to hide internal directories.