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

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