github.com/jfrog/jfrog-cli-go@v1.22.1-0.20200318093948-4826ef344ffd/artifactory/commands/pip/pip.go (about)

     1  package pip
     2  
     3  import (
     4  	"github.com/jfrog/jfrog-cli-go/utils/config"
     5  )
     6  
     7  type PipCommand struct {
     8  	rtDetails  *config.ArtifactoryDetails
     9  	args       []string
    10  	repository string
    11  }
    12  
    13  func (pc *PipCommand) SetRtDetails(rtDetails *config.ArtifactoryDetails) *PipCommand {
    14  	pc.rtDetails = rtDetails
    15  	return pc
    16  }
    17  
    18  func (pc *PipCommand) SetRepo(repo string) *PipCommand {
    19  	pc.repository = repo
    20  	return pc
    21  }
    22  
    23  func (pc *PipCommand) SetArgs(arguments []string) *PipCommand {
    24  	pc.args = arguments
    25  	return pc
    26  }
    27  
    28  type PipCommandInterface interface {
    29  	SetRtDetails(rtDetails *config.ArtifactoryDetails) *PipCommand
    30  	SetRepo(repo string) *PipCommand
    31  	SetArgs(arguments []string) *PipCommand
    32  	RtDetails() (*config.ArtifactoryDetails, error)
    33  	CommandName() string
    34  	Run() error
    35  }