github.com/jfrog/jfrog-cli-core/v2@v2.52.0/artifactory/commands/repository/create.go (about)

     1  package repository
     2  
     3  import (
     4  	"github.com/jfrog/jfrog-cli-core/v2/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) SetServerDetails(serverDetails *config.ServerDetails) *RepoCreateCommand {
    26  	rcc.serverDetails = serverDetails
    27  	return rcc
    28  }
    29  
    30  func (rcc *RepoCreateCommand) ServerDetails() (*config.ServerDetails, error) {
    31  	return rcc.serverDetails, 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  }