github.com/jfrog/jfrog-cli-core@v1.12.1/artifactory/commands/pip/pip.go (about)

     1  package pip
     2  
     3  import (
     4  	"github.com/jfrog/jfrog-cli-core/utils/config"
     5  )
     6  
     7  type PipCommand struct {
     8  	rtDetails  *config.ServerDetails
     9  	args       []string
    10  	repository string
    11  }
    12  
    13  func (pc *PipCommand) SetServerDetails(serverDetails *config.ServerDetails) *PipCommand {
    14  	pc.rtDetails = serverDetails
    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  	SetServerDetails(rtDetails *config.ServerDetails) *PipCommand
    30  	SetRepo(repo string) *PipCommand
    31  	SetArgs(arguments []string) *PipCommand
    32  	ServerDetails() (*config.ServerDetails, error)
    33  	CommandName() string
    34  	Run() error
    35  }