feat(cli): Implement address flag for boundary targets create/update
This commit adds CLI support for addresses to be attached directly to a Target, for all current types of Target (ssh and tcp). It also clarifies the relevant documentation regarding the autogen of API option functionality.
This commit is contained in:
1 parent
61c90c5623
commit
c82d2efb14
12 files changed
+221
-125
No files matched your search
@@ -87,6 +87,18 @@ func WithRecursive(recurse bool) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func WithAddress(inAddress string) Option {
|
||||
return func(o *options) {
|
||||
o.postMap["address"] = inAddress
|
||||
}
|
||||
}
|
||||
|
||||
func DefaultAddress() Option {
|
||||
return func(o *options) {
|
||||
o.postMap["address"] = nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithApplicationCredentialSourceIds(inApplicationCredentialSourceIds []string) Option {
|
||||
return func(o *options) {
|
||||
o.postMap["application_credential_source_ids"] = inApplicationCredentialSourceIds
|
||||
|
||||
@@ -37,6 +37,7 @@ type Target struct {
|
||||
InjectedApplicationCredentialSources []*CredentialSource `json:"injected_application_credential_sources,omitempty"`
|
||||
Attributes map[string]interface{} `json:"attributes,omitempty"`
|
||||
AuthorizedActions []string `json:"authorized_actions,omitempty"`
|
||||
Address string `json:"address,omitempty"`
|
||||
|
||||
response *api.Response
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user