github.com/jfrog/jfrog-cli-core@v1.12.1/artifactory/commands/permissiontarget/update.go (about) 1 package permissiontarget 2 3 import ( 4 "github.com/jfrog/jfrog-cli-core/utils/config" 5 ) 6 7 type PermissionTargetUpdateCommand struct { 8 PermissionTargetCommand 9 } 10 11 func NewPermissionTargetUpdateCommand() *PermissionTargetUpdateCommand { 12 return &PermissionTargetUpdateCommand{} 13 } 14 15 func (ptuc *PermissionTargetUpdateCommand) SetTemplatePath(path string) *PermissionTargetUpdateCommand { 16 ptuc.templatePath = path 17 return ptuc 18 } 19 20 func (ptuc *PermissionTargetUpdateCommand) SetVars(vars string) *PermissionTargetUpdateCommand { 21 ptuc.vars = vars 22 return ptuc 23 } 24 25 func (ptuc *PermissionTargetUpdateCommand) SetServerDetails(serverDetails *config.ServerDetails) *PermissionTargetUpdateCommand { 26 ptuc.serverDetails = serverDetails 27 return ptuc 28 } 29 30 func (ptuc *PermissionTargetUpdateCommand) ServerDetails() (*config.ServerDetails, error) { 31 return ptuc.serverDetails, nil 32 } 33 34 func (ptuc *PermissionTargetUpdateCommand) CommandName() string { 35 return "rt_permission_target_update" 36 } 37 38 func (ptuc *PermissionTargetUpdateCommand) Run() (err error) { 39 return ptuc.PerformPermissionTargetCmd(true) 40 }