Documentation
¶
Index ¶
- Constants
- func BackupFile(filePath, prefix string) (string, error)
- func NewConfigureCmd(f *cmdutils.Factory) *cobra.Command
- func NewConfigureMavenCmd(f *cmdutils.Factory) *cobra.Command
- func NewConfigureNpmCmd(f *cmdutils.Factory) *cobra.Command
- func NewConfigureNugetCmd(f *cmdutils.Factory) *cobra.Command
- func NewConfigurePipCmd(f *cmdutils.Factory) *cobra.Command
- func NewCreateRegistryCmd(c *cmdutils.Factory) *cobra.Command
- func NewDeleteRegistryCmd(c *cmdutils.Factory) *cobra.Command
- func NewFirewallAuditCmd(f *cmdutils.Factory) *cobra.Command
- func NewFirewallCmd(f *cmdutils.Factory) *cobra.Command
- func NewFirewallExplainCmd(f *cmdutils.Factory) *cobra.Command
- func NewGetRegistryCmd(f *cmdutils.Factory) *cobra.Command
- func NewListRegistryCmd(f *cmdutils.Factory) *cobra.Command
- func NewMetadataCmd(f *cmdutils.Factory) *cobra.Command
- func NewMetadataDeleteCmd(f *cmdutils.Factory) *cobra.Command
- func NewMetadataGetCmd(f *cmdutils.Factory) *cobra.Command
- func NewMetadataSetCmd(f *cmdutils.Factory) *cobra.Command
- func RestoreFromBackup(backupPath, targetPath string) error
- func RestoreMavenSettings() error
- func RestoreNpmrc() error
- func RestoreNugetConfig() error
- func RestorePipConf() error
- func SaveMavenRegistryConfig(cfg MavenRegistryConfig) error
- func SaveNugetRegistryConfig(cfg NugetRegistryConfig) error
- func SavePipRegistryConfig(cfg PipRegistryConfig) error
- type Dependency
- type MavenRegistryConfig
- type NpmRegistryConfig
- type NugetRegistryConfig
- type PipRegistryConfig
- type ScanResult
Constants ¶
const ( HarnessConfigDir = ".harness" MavenConfigFile = "maven-config.json" PipConfigFile = "pip-config.json" NugetConfigFile = "nuget-config.json" )
Variables ¶
This section is empty.
Functions ¶
func BackupFile ¶ added in v1.3.18
BackupFile backs up a file to ~/.harness/<prefix>-backup-<timestamp>. Returns empty string if the file doesn't exist or is empty.
func NewConfigureMavenCmd ¶ added in v1.3.18
func NewConfigureNpmCmd ¶ added in v1.3.4
func NewConfigureNugetCmd ¶ added in v1.3.18
func NewConfigurePipCmd ¶ added in v1.3.18
func NewFirewallAuditCmd ¶ added in v1.3.4
func NewFirewallExplainCmd ¶ added in v1.3.4
func NewMetadataDeleteCmd ¶ added in v1.3.0
func RestoreFromBackup ¶ added in v1.3.18
RestoreFromBackup copies backup file contents back to the target path.
func RestoreMavenSettings ¶ added in v1.3.18
func RestoreMavenSettings() error
RestoreMavenSettings restores the backed-up settings.xml file if a backup exists.
func RestoreNpmrc ¶ added in v1.3.18
func RestoreNpmrc() error
RestoreNpmrc restores the backed-up .npmrc file if a backup exists.
func RestoreNugetConfig ¶ added in v1.3.18
func RestoreNugetConfig() error
RestoreNugetConfig restores the backed-up NuGet.Config file if a backup exists.
func RestorePipConf ¶ added in v1.3.18
func RestorePipConf() error
RestorePipConf restores the backed-up pip.conf file if a backup exists.
func SaveMavenRegistryConfig ¶ added in v1.3.18
func SaveMavenRegistryConfig(cfg MavenRegistryConfig) error
func SaveNugetRegistryConfig ¶ added in v1.3.18
func SaveNugetRegistryConfig(cfg NugetRegistryConfig) error
func SavePipRegistryConfig ¶ added in v1.3.18
func SavePipRegistryConfig(cfg PipRegistryConfig) error
Types ¶
type Dependency ¶ added in v1.3.4
type Dependency struct {
Name string `json:"name"`
Version string `json:"version"`
Source string `json:"source"`
Parent string `json:"parent,omitempty"`
}
func ParseLockFile ¶ added in v1.3.18
func ParseLockFile(filePath string) ([]Dependency, error)
type MavenRegistryConfig ¶ added in v1.3.18
type MavenRegistryConfig struct {
RegistryIdentifier string `json:"registryIdentifier"`
RegistryURL string `json:"registryUrl"`
OrgID string `json:"orgId,omitempty"`
ProjectID string `json:"projectId,omitempty"`
SettingsBackupPath string `json:"settingsBackupPath,omitempty"`
SettingsPath string `json:"settingsPath"`
}
MavenRegistryConfig stores maven registry configuration in ~/.harness/maven-config.json.
func LoadMavenRegistryConfig ¶ added in v1.3.18
func LoadMavenRegistryConfig() (*MavenRegistryConfig, error)
type NpmRegistryConfig ¶ added in v1.3.18
type NpmRegistryConfig struct {
RegistryIdentifier string `json:"registryIdentifier"`
RegistryURL string `json:"registryUrl"`
Scope string `json:"scope,omitempty"`
OrgID string `json:"orgId,omitempty"`
ProjectID string `json:"projectId,omitempty"`
NpmrcBackupPath string `json:"npmrcBackupPath,omitempty"`
NpmrcPath string `json:"npmrcPath"`
}
NpmRegistryConfig stores npm registry configuration in ~/.harness/npm-config.json. Used by the install wrapper to detect the HAR registry without re-parsing .npmrc.
func LoadNpmRegistryConfig ¶ added in v1.3.18
func LoadNpmRegistryConfig() (*NpmRegistryConfig, error)
LoadNpmRegistryConfig loads the saved npm registry config from ~/.harness/npm-config.json.
type NugetRegistryConfig ¶ added in v1.3.18
type NugetRegistryConfig struct {
RegistryIdentifier string `json:"registryIdentifier"`
RegistryURL string `json:"registryUrl"`
OrgID string `json:"orgId,omitempty"`
ProjectID string `json:"projectId,omitempty"`
NugetConfigBackupPath string `json:"nugetConfigBackupPath,omitempty"`
NugetConfigPath string `json:"nugetConfigPath"`
}
func LoadNugetRegistryConfig ¶ added in v1.3.18
func LoadNugetRegistryConfig() (*NugetRegistryConfig, error)
type PipRegistryConfig ¶ added in v1.3.18
type PipRegistryConfig struct {
RegistryIdentifier string `json:"registryIdentifier"`
RegistryURL string `json:"registryUrl"`
OrgID string `json:"orgId,omitempty"`
ProjectID string `json:"projectId,omitempty"`
PipConfBackupPath string `json:"pipConfBackupPath,omitempty"`
PipConfPath string `json:"pipConfPath"`
}
func LoadPipRegistryConfig ¶ added in v1.3.18
func LoadPipRegistryConfig() (*PipRegistryConfig, error)