feat: Credential library mapping API/SDK/CLI on create path
* feat(sdk): Add fields to credential library proto Adds CredentialType and CredentialMappingOverrides to credential library SDK. * feat(api): Add fields to credenttial library service Adds support for CredentialType and CredentialMappingOverrides to the credential library service (API) * feat(cli): Add feilds for credential library cmd Adds support for CredentialType and CredentialMappingOverrides to the credential library cmd command.
This commit is contained in:
1 parent
c317901db4
commit
1cc35fb0df
11 files changed
+489
-69
No files matched your search
@@ -13,17 +13,19 @@ import (
|
||||
)
|
||||
|
||||
type CredentialLibrary struct {
|
||||
Id string `json:"id,omitempty"`
|
||||
CredentialStoreId string `json:"credential_store_id,omitempty"`
|
||||
Scope *scopes.ScopeInfo `json:"scope,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
CreatedTime time.Time `json:"created_time,omitempty"`
|
||||
UpdatedTime time.Time `json:"updated_time,omitempty"`
|
||||
Version uint32 `json:"version,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Attributes map[string]interface{} `json:"attributes,omitempty"`
|
||||
AuthorizedActions []string `json:"authorized_actions,omitempty"`
|
||||
Id string `json:"id,omitempty"`
|
||||
CredentialStoreId string `json:"credential_store_id,omitempty"`
|
||||
Scope *scopes.ScopeInfo `json:"scope,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
CreatedTime time.Time `json:"created_time,omitempty"`
|
||||
UpdatedTime time.Time `json:"updated_time,omitempty"`
|
||||
Version uint32 `json:"version,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Attributes map[string]interface{} `json:"attributes,omitempty"`
|
||||
AuthorizedActions []string `json:"authorized_actions,omitempty"`
|
||||
CredentialType string `json:"credential_type,omitempty"`
|
||||
CredentialMappingOverrides map[string]interface{} `json:"credential_mapping_overrides,omitempty"`
|
||||
|
||||
response *api.Response
|
||||
}
|
||||
|
||||
@@ -86,6 +86,30 @@ func DefaultAttributes() Option {
|
||||
}
|
||||
}
|
||||
|
||||
func WithCredentialMappingOverrides(inCredentialMappingOverrides map[string]interface{}) Option {
|
||||
return func(o *options) {
|
||||
o.postMap["credential_mapping_overrides"] = inCredentialMappingOverrides
|
||||
}
|
||||
}
|
||||
|
||||
func DefaultCredentialMappingOverrides() Option {
|
||||
return func(o *options) {
|
||||
o.postMap["credential_mapping_overrides"] = nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithCredentialType(inCredentialType string) Option {
|
||||
return func(o *options) {
|
||||
o.postMap["credential_type"] = inCredentialType
|
||||
}
|
||||
}
|
||||
|
||||
func DefaultCredentialType() Option {
|
||||
return func(o *options) {
|
||||
o.postMap["credential_type"] = nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithDescription(inDescription string) Option {
|
||||
return func(o *options) {
|
||||
o.postMap["description"] = inDescription
|
||||
|
||||
Reference in new issue
Block a user