project

package
v2.55.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

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",
	"pnpm",
	"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
	Pnpm
	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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL