github.com/osievert/jfrog-cli-core@v1.2.7/artifactory/commands/repository/create.go (about)

     1  package repository
     2  
     3  import (
     4  	"github.com/jfrog/jfrog-cli-core/utils/config"
     5  )
     6  
     7  type RepoCreateCommand struct {
     8  	RepoCommand
     9  }
    10  
    11  func NewRepoCreateCommand() *RepoCreateCommand {
    12  	return &RepoCreateCommand{}
    13  }
    14  
    15  func (rcc *RepoCreateCommand) SetTemplatePath(path string) *RepoCreateCommand {
    16  	rcc.templatePath = path
    17  	return rcc
    18  }
    19  
    20  func (rcc *RepoCreateCommand) SetVars(vars string) *RepoCreateCommand {
    21  	rcc.vars = vars
    22  	return rcc
    23  }
    24  
    25  func (rcc *RepoCreateCommand) SetRtDetails(rtDetails *config.ArtifactoryDetails) *RepoCreateCommand {
    26  	rcc.rtDetails = rtDetails
    27  	return rcc
    28  }
    29  
    30  func (rcc *RepoCreateCommand) RtDetails() (*config.ArtifactoryDetails, error) {
    31  	return rcc.rtDetails, nil
    32  }
    33  
    34  func (rcc *RepoCreateCommand) CommandName() string {
    35  	return "rt_repo_create"
    36  }
    37  
    38  func (rcc *RepoCreateCommand) Run() (err error) {
    39  	return rcc.PerformRepoCmd(false)
    40  }