-
Notifications
You must be signed in to change notification settings - Fork 53
/
create.go
40 lines (31 loc) · 1.06 KB
/
create.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package permissiontarget
import (
"github.com/jfrog/jfrog-cli-core/v2/utils/config"
)
type PermissionTargetCreateCommand struct {
PermissionTargetCommand
}
func NewPermissionTargetCreateCommand() *PermissionTargetCreateCommand {
return &PermissionTargetCreateCommand{}
}
func (ptcc *PermissionTargetCreateCommand) SetTemplatePath(path string) *PermissionTargetCreateCommand {
ptcc.templatePath = path
return ptcc
}
func (ptcc *PermissionTargetCreateCommand) SetVars(vars string) *PermissionTargetCreateCommand {
ptcc.vars = vars
return ptcc
}
func (ptcc *PermissionTargetCreateCommand) SetServerDetails(serverDetails *config.ServerDetails) *PermissionTargetCreateCommand {
ptcc.serverDetails = serverDetails
return ptcc
}
func (ptcc *PermissionTargetCreateCommand) ServerDetails() (*config.ServerDetails, error) {
return ptcc.serverDetails, nil
}
func (ptcc *PermissionTargetCreateCommand) CommandName() string {
return "rt_permission_target_create"
}
func (ptcc *PermissionTargetCreateCommand) Run() (err error) {
return ptcc.PerformPermissionTargetCmd(false)
}