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

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