Documentation
¶
Index ¶
- func ConfigPoetryRepo(url, username, password, configRepoName string) error
- func ConfigurePypirc(repoURL, repoName, username, password string) error
- func CreateAqlQueryForSearch(repo, fileInitial string) string
- func CreatePipConfigManually(customPipConfigPath, repoWithCredsUrl string) error
- func GetPypiRemoteRegistryFlag(tool pythonutils.PythonTool) string
- func GetPypiRepoUrl(serverDetails *config.ServerDetails, repository string, isCurationCmd bool) (string, error)
- func GetPypiRepoUrlWithCredentials(serverDetails *config.ServerDetails, repository string, isCurationCmd bool) (*url.URL, string, string, error)
- func RunConfigCommand(buildTool project.ProjectType, args []string) error
- func RunPoetryConfig(url, username, password, configRepoName string) error
- type PipCommand
- func (pc *PipCommand) CommandName() string
- func (pc *PipCommand) GetCmd() *exec.Cmd
- func (pc *PipCommand) GetEnv() map[string]string
- func (pc *PipCommand) GetErrWriter() io.WriteCloser
- func (pc *PipCommand) GetStdWriter() io.WriteCloser
- func (pc *PipCommand) Run() (err error)
- func (pc *PipCommand) ServerDetails() (*config.ServerDetails, error)
- func (pc *PipCommand) SetArgs(arguments []string) *PipCommand
- func (pc *PipCommand) SetCommandName(commandName string) *PipCommand
- func (pc *PipCommand) SetRepo(repo string) *PipCommand
- func (pc *PipCommand) SetServerDetails(serverDetails *config.ServerDetails) *PipCommand
- func (pc *PipCommand) UpdateDepsChecksumInfoFunc(dependenciesMap map[string]entities.Dependency, srcPath string) error
- type PipenvCommand
- func (pc *PipenvCommand) CommandName() string
- func (pc *PipenvCommand) GetCmd() *exec.Cmd
- func (pc *PipenvCommand) GetEnv() map[string]string
- func (pc *PipenvCommand) GetErrWriter() io.WriteCloser
- func (pc *PipenvCommand) GetStdWriter() io.WriteCloser
- func (pc *PipenvCommand) Run() (err error)
- func (pc *PipenvCommand) ServerDetails() (*config.ServerDetails, error)
- func (pc *PipenvCommand) SetArgs(arguments []string) *PipenvCommand
- func (pc *PipenvCommand) SetCommandName(commandName string) *PipenvCommand
- func (pc *PipenvCommand) SetRepo(repo string) *PipenvCommand
- func (pc *PipenvCommand) SetServerDetails(serverDetails *config.ServerDetails) *PipenvCommand
- func (pc *PipenvCommand) UpdateDepsChecksumInfoFunc(dependenciesMap map[string]entities.Dependency, srcPath string) error
- type PoetryCommand
- func (pc *PoetryCommand) CommandName() string
- func (pc *PoetryCommand) GetCmd() *exec.Cmd
- func (pc *PoetryCommand) GetEnv() map[string]string
- func (pc *PoetryCommand) GetErrWriter() io.WriteCloser
- func (pc *PoetryCommand) GetStdWriter() io.WriteCloser
- func (pc *PoetryCommand) Run() (err error)
- func (pc *PoetryCommand) ServerDetails() (*config.ServerDetails, error)
- func (pc *PoetryCommand) SetArgs(arguments []string) *PoetryCommand
- func (pc *PoetryCommand) SetCommandName(commandName string) *PoetryCommand
- func (pc *PoetryCommand) SetPypiRepoUrlWithCredentials() error
- func (pc *PoetryCommand) SetRepo(repo string) *PoetryCommand
- func (pc *PoetryCommand) SetServerDetails(serverDetails *config.ServerDetails) *PoetryCommand
- func (pc *PoetryCommand) UpdateDepsChecksumInfoFunc(dependenciesMap map[string]entities.Dependency, srcPath string) error
- type PythonCommand
- func (pc *PythonCommand) GetCmd() *exec.Cmd
- func (pc *PythonCommand) GetEnv() map[string]string
- func (pc *PythonCommand) GetErrWriter() io.WriteCloser
- func (pc *PythonCommand) GetStdWriter() io.WriteCloser
- func (pc *PythonCommand) Run() (err error)
- func (pc *PythonCommand) ServerDetails() (*config.ServerDetails, error)
- func (pc *PythonCommand) SetArgs(arguments []string) *PythonCommand
- func (pc *PythonCommand) SetCommandName(commandName string) *PythonCommand
- func (pc *PythonCommand) SetPypiRepoUrlWithCredentials() error
- func (pc *PythonCommand) SetRepo(repo string) *PythonCommand
- func (pc *PythonCommand) SetServerDetails(serverDetails *config.ServerDetails) *PythonCommand
- func (pc *PythonCommand) UpdateDepsChecksumInfoFunc(dependenciesMap map[string]entities.Dependency, srcPath string) error
- type TwineCommand
- func (tc *TwineCommand) CommandName() string
- func (tc *TwineCommand) Run() (err error)
- func (tc *TwineCommand) ServerDetails() (*config.ServerDetails, error)
- func (tc *TwineCommand) SetArgs(args []string) *TwineCommand
- func (tc *TwineCommand) SetServerDetails(serverDetails *config.ServerDetails) *TwineCommand
- func (tc *TwineCommand) SetTargetRepo(targetRepo string) *TwineCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigPoetryRepo ¶
func ConfigurePypirc ¶ added in v0.3.0
ConfigurePypirc creates or updates the .pypirc file for Twine The function creates a .pypirc file in the user's home directory with the following structure:
[distutils] index-servers =
pypi
[pypi] repository = https://<your-artifactory-url>/artifactory/api/pypi/<repo-name>/ username = <user> password = <token-or-password>
Using the name "pypi" as the repository section makes it the default for Twine, allowing users to run `twine upload` without specifying a repository.
func CreateAqlQueryForSearch ¶ added in v0.4.0
func CreatePipConfigManually ¶
func GetPypiRemoteRegistryFlag ¶
func GetPypiRemoteRegistryFlag(tool pythonutils.PythonTool) string
func GetPypiRepoUrl ¶
func GetPypiRepoUrl(serverDetails *config.ServerDetails, repository string, isCurationCmd bool) (string, error)
Get the pypi repository embedded credentials URL (https://<user>:<password/token>@<your-artifactory-url>/artifactory/api/pypi/<repo-name>/simple)
func GetPypiRepoUrlWithCredentials ¶
func GetPypiRepoUrlWithCredentials(serverDetails *config.ServerDetails, repository string, isCurationCmd bool) (*url.URL, string, string, error)
Get the pypi repository url and the credentials.
func RunConfigCommand ¶
func RunConfigCommand(buildTool project.ProjectType, args []string) error
func RunPoetryConfig ¶
Types ¶
type PipCommand ¶
type PipCommand struct {
PythonCommand
}
func NewPipCommand ¶
func NewPipCommand() *PipCommand
func (*PipCommand) CommandName ¶
func (pc *PipCommand) CommandName() string
func (*PipCommand) GetCmd ¶
func (pc *PipCommand) GetCmd() *exec.Cmd
func (*PipCommand) GetEnv ¶
func (pc *PipCommand) GetEnv() map[string]string
func (*PipCommand) GetErrWriter ¶
func (pc *PipCommand) GetErrWriter() io.WriteCloser
func (*PipCommand) GetStdWriter ¶
func (pc *PipCommand) GetStdWriter() io.WriteCloser
func (*PipCommand) Run ¶
func (pc *PipCommand) Run() (err error)
func (*PipCommand) ServerDetails ¶
func (pc *PipCommand) ServerDetails() (*config.ServerDetails, error)
func (*PipCommand) SetArgs ¶
func (pc *PipCommand) SetArgs(arguments []string) *PipCommand
func (*PipCommand) SetCommandName ¶
func (pc *PipCommand) SetCommandName(commandName string) *PipCommand
func (*PipCommand) SetRepo ¶
func (pc *PipCommand) SetRepo(repo string) *PipCommand
func (*PipCommand) SetServerDetails ¶
func (pc *PipCommand) SetServerDetails(serverDetails *config.ServerDetails) *PipCommand
func (*PipCommand) UpdateDepsChecksumInfoFunc ¶
func (pc *PipCommand) UpdateDepsChecksumInfoFunc(dependenciesMap map[string]entities.Dependency, srcPath string) error
type PipenvCommand ¶
type PipenvCommand struct {
PythonCommand
}
func NewPipenvCommand ¶
func NewPipenvCommand() *PipenvCommand
func (*PipenvCommand) CommandName ¶
func (pc *PipenvCommand) CommandName() string
func (*PipenvCommand) GetCmd ¶
func (pc *PipenvCommand) GetCmd() *exec.Cmd
func (*PipenvCommand) GetEnv ¶
func (pc *PipenvCommand) GetEnv() map[string]string
func (*PipenvCommand) GetErrWriter ¶
func (pc *PipenvCommand) GetErrWriter() io.WriteCloser
func (*PipenvCommand) GetStdWriter ¶
func (pc *PipenvCommand) GetStdWriter() io.WriteCloser
func (*PipenvCommand) Run ¶
func (pc *PipenvCommand) Run() (err error)
func (*PipenvCommand) ServerDetails ¶
func (pc *PipenvCommand) ServerDetails() (*config.ServerDetails, error)
func (*PipenvCommand) SetArgs ¶
func (pc *PipenvCommand) SetArgs(arguments []string) *PipenvCommand
func (*PipenvCommand) SetCommandName ¶
func (pc *PipenvCommand) SetCommandName(commandName string) *PipenvCommand
func (*PipenvCommand) SetRepo ¶
func (pc *PipenvCommand) SetRepo(repo string) *PipenvCommand
func (*PipenvCommand) SetServerDetails ¶
func (pc *PipenvCommand) SetServerDetails(serverDetails *config.ServerDetails) *PipenvCommand
func (*PipenvCommand) UpdateDepsChecksumInfoFunc ¶
func (pc *PipenvCommand) UpdateDepsChecksumInfoFunc(dependenciesMap map[string]entities.Dependency, srcPath string) error
type PoetryCommand ¶
type PoetryCommand struct {
PythonCommand
}
func NewPoetryCommand ¶
func NewPoetryCommand() *PoetryCommand
func (*PoetryCommand) CommandName ¶
func (pc *PoetryCommand) CommandName() string
func (*PoetryCommand) GetCmd ¶
func (pc *PoetryCommand) GetCmd() *exec.Cmd
func (*PoetryCommand) GetEnv ¶
func (pc *PoetryCommand) GetEnv() map[string]string
func (*PoetryCommand) GetErrWriter ¶
func (pc *PoetryCommand) GetErrWriter() io.WriteCloser
func (*PoetryCommand) GetStdWriter ¶
func (pc *PoetryCommand) GetStdWriter() io.WriteCloser
func (*PoetryCommand) Run ¶
func (pc *PoetryCommand) Run() (err error)
func (*PoetryCommand) ServerDetails ¶
func (pc *PoetryCommand) ServerDetails() (*config.ServerDetails, error)
func (*PoetryCommand) SetArgs ¶
func (pc *PoetryCommand) SetArgs(arguments []string) *PoetryCommand
func (*PoetryCommand) SetCommandName ¶
func (pc *PoetryCommand) SetCommandName(commandName string) *PoetryCommand
func (*PoetryCommand) SetPypiRepoUrlWithCredentials ¶
func (pc *PoetryCommand) SetPypiRepoUrlWithCredentials() error
func (*PoetryCommand) SetRepo ¶
func (pc *PoetryCommand) SetRepo(repo string) *PoetryCommand
func (*PoetryCommand) SetServerDetails ¶
func (pc *PoetryCommand) SetServerDetails(serverDetails *config.ServerDetails) *PoetryCommand
func (*PoetryCommand) UpdateDepsChecksumInfoFunc ¶
func (pc *PoetryCommand) UpdateDepsChecksumInfoFunc(dependenciesMap map[string]entities.Dependency, srcPath string) error
type PythonCommand ¶
type PythonCommand struct {
// contains filtered or unexported fields
}
func NewPythonCommand ¶
func NewPythonCommand(pythonTool pythonutils.PythonTool) *PythonCommand
func (*PythonCommand) GetCmd ¶
func (pc *PythonCommand) GetCmd() *exec.Cmd
func (*PythonCommand) GetEnv ¶
func (pc *PythonCommand) GetEnv() map[string]string
func (*PythonCommand) GetErrWriter ¶
func (pc *PythonCommand) GetErrWriter() io.WriteCloser
func (*PythonCommand) GetStdWriter ¶
func (pc *PythonCommand) GetStdWriter() io.WriteCloser
func (*PythonCommand) Run ¶
func (pc *PythonCommand) Run() (err error)
func (*PythonCommand) ServerDetails ¶
func (pc *PythonCommand) ServerDetails() (*config.ServerDetails, error)
func (*PythonCommand) SetArgs ¶
func (pc *PythonCommand) SetArgs(arguments []string) *PythonCommand
func (*PythonCommand) SetCommandName ¶
func (pc *PythonCommand) SetCommandName(commandName string) *PythonCommand
func (*PythonCommand) SetPypiRepoUrlWithCredentials ¶
func (pc *PythonCommand) SetPypiRepoUrlWithCredentials() error
func (*PythonCommand) SetRepo ¶
func (pc *PythonCommand) SetRepo(repo string) *PythonCommand
func (*PythonCommand) SetServerDetails ¶
func (pc *PythonCommand) SetServerDetails(serverDetails *config.ServerDetails) *PythonCommand
func (*PythonCommand) UpdateDepsChecksumInfoFunc ¶
func (pc *PythonCommand) UpdateDepsChecksumInfoFunc(dependenciesMap map[string]entities.Dependency, srcPath string) error
type TwineCommand ¶
type TwineCommand struct {
// contains filtered or unexported fields
}
func NewTwineCommand ¶
func NewTwineCommand(commandName string) *TwineCommand
func (*TwineCommand) CommandName ¶
func (tc *TwineCommand) CommandName() string
func (*TwineCommand) Run ¶
func (tc *TwineCommand) Run() (err error)
func (*TwineCommand) ServerDetails ¶
func (tc *TwineCommand) ServerDetails() (*config.ServerDetails, error)
func (*TwineCommand) SetArgs ¶
func (tc *TwineCommand) SetArgs(args []string) *TwineCommand
func (*TwineCommand) SetServerDetails ¶
func (tc *TwineCommand) SetServerDetails(serverDetails *config.ServerDetails) *TwineCommand
func (*TwineCommand) SetTargetRepo ¶
func (tc *TwineCommand) SetTargetRepo(targetRepo string) *TwineCommand