Two fixes in our Go API code: (#5066)

* Replace `interface{}` with `any`
* For options that are bools, don't always set true; set to the actual
  value passed in (some options already behaved this way, but they all
  should)
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2024-09-04 11:40:43 -04:00
1 parent 4e8e069c9c
commit 35d1df7388
72 files changed
+510 -475

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ type AccountDeleteResult struct {
}
// GetItem will always be nil for AccountDeleteResult
func (n AccountDeleteResult) GetItem() interface{} {
func (n AccountDeleteResult) GetItem() any {
return nil
}
+1 -1
View File
@@ -18,7 +18,7 @@ type LdapAccountAttributes struct {
MemberOfGroups []string `json:"member_of_groups,omitempty"`
}
func AttributesMapToLdapAccountAttributes(in map[string]interface{}) (*LdapAccountAttributes, error) {
func AttributesMapToLdapAccountAttributes(in map[string]any) (*LdapAccountAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+1 -1
View File
@@ -19,7 +19,7 @@ type OidcAccountAttributes struct {
UserinfoClaims map[string]interface{} `json:"userinfo_claims,omitempty"`
}
func AttributesMapToOidcAccountAttributes(in map[string]interface{}) (*OidcAccountAttributes, error) {
func AttributesMapToOidcAccountAttributes(in map[string]any) (*OidcAccountAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+23 -23
View File
@@ -20,7 +20,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -30,7 +30,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -69,7 +69,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -118,9 +118,9 @@ func WithOidcAccountIssuer(inIssuer string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["issuer"] = inIssuer
o.postMap["attributes"] = val
}
@@ -130,9 +130,9 @@ func DefaultOidcAccountIssuer() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["issuer"] = nil
o.postMap["attributes"] = val
}
@@ -142,9 +142,9 @@ func WithLdapAccountLoginName(inLoginName string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["login_name"] = inLoginName
o.postMap["attributes"] = val
}
@@ -154,9 +154,9 @@ func DefaultLdapAccountLoginName() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["login_name"] = nil
o.postMap["attributes"] = val
}
@@ -166,9 +166,9 @@ func WithPasswordAccountLoginName(inLoginName string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["login_name"] = inLoginName
o.postMap["attributes"] = val
}
@@ -178,9 +178,9 @@ func DefaultPasswordAccountLoginName() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["login_name"] = nil
o.postMap["attributes"] = val
}
@@ -202,9 +202,9 @@ func WithPasswordAccountPassword(inPassword string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["password"] = inPassword
o.postMap["attributes"] = val
}
@@ -214,9 +214,9 @@ func DefaultPasswordAccountPassword() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["password"] = nil
o.postMap["attributes"] = val
}
@@ -226,9 +226,9 @@ func WithOidcAccountSubject(inSubject string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["subject"] = inSubject
o.postMap["attributes"] = val
}
@@ -238,9 +238,9 @@ func DefaultOidcAccountSubject() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["subject"] = nil
o.postMap["attributes"] = val
}
@@ -15,7 +15,7 @@ type PasswordAccountAttributes struct {
Password string `json:"password,omitempty"`
}
func AttributesMapToPasswordAccountAttributes(in map[string]interface{}) (*PasswordAccountAttributes, error) {
func AttributesMapToPasswordAccountAttributes(in map[string]any) (*PasswordAccountAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+1 -1
View File
@@ -54,7 +54,7 @@ type AliasDeleteResult struct {
}
// GetItem will always be nil for AliasDeleteResult
func (n AliasDeleteResult) GetItem() interface{} {
func (n AliasDeleteResult) GetItem() any {
return nil
}
+4 -4
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -32,7 +32,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -74,7 +74,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -99,7 +99,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ type TargetAliasAttributes struct {
AuthorizeSessionArguments *AuthorizeSessionArguments `json:"authorize_session_arguments,omitempty"`
}
func AttributesMapToTargetAliasAttributes(in map[string]interface{}) (*TargetAliasAttributes, error) {
func AttributesMapToTargetAliasAttributes(in map[string]any) (*TargetAliasAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+1 -1
View File
@@ -54,7 +54,7 @@ type AuthMethodDeleteResult struct {
}
// GetItem will always be nil for AuthMethodDeleteResult
func (n AuthMethodDeleteResult) GetItem() interface{} {
func (n AuthMethodDeleteResult) GetItem() any {
return nil
}
@@ -38,7 +38,7 @@ type LdapAuthMethodAttributes struct {
DereferenceAliases string `json:"dereference_aliases,omitempty"`
}
func AttributesMapToLdapAuthMethodAttributes(in map[string]interface{}) (*LdapAuthMethodAttributes, error) {
func AttributesMapToLdapAuthMethodAttributes(in map[string]any) (*LdapAuthMethodAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
@@ -29,7 +29,7 @@ type OidcAuthMethodAttributes struct {
Prompts []string `json:"prompts,omitempty"`
}
func AttributesMapToOidcAuthMethodAttributes(in map[string]interface{}) (*OidcAuthMethodAttributes, error) {
func AttributesMapToOidcAuthMethodAttributes(in map[string]any) (*OidcAuthMethodAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+156 -156
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -32,7 +32,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -74,7 +74,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -99,7 +99,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
@@ -107,9 +107,9 @@ func WithLdapAuthMethodAccountAttributeMaps(inAccountAttributeMaps []string) Opt
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["account_attribute_maps"] = inAccountAttributeMaps
o.postMap["attributes"] = val
}
@@ -119,9 +119,9 @@ func DefaultLdapAuthMethodAccountAttributeMaps() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["account_attribute_maps"] = nil
o.postMap["attributes"] = val
}
@@ -131,9 +131,9 @@ func WithOidcAuthMethodAccountClaimMaps(inAccountClaimMaps []string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["account_claim_maps"] = inAccountClaimMaps
o.postMap["attributes"] = val
}
@@ -143,9 +143,9 @@ func DefaultOidcAuthMethodAccountClaimMaps() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["account_claim_maps"] = nil
o.postMap["attributes"] = val
}
@@ -155,9 +155,9 @@ func WithOidcAuthMethodAllowedAudiences(inAllowedAudiences []string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["allowed_audiences"] = inAllowedAudiences
o.postMap["attributes"] = val
}
@@ -167,9 +167,9 @@ func DefaultOidcAuthMethodAllowedAudiences() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["allowed_audiences"] = nil
o.postMap["attributes"] = val
}
@@ -179,9 +179,9 @@ func WithLdapAuthMethodAnonGroupSearch(inAnonGroupSearch bool) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["anon_group_search"] = inAnonGroupSearch
o.postMap["attributes"] = val
}
@@ -191,9 +191,9 @@ func DefaultLdapAuthMethodAnonGroupSearch() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["anon_group_search"] = nil
o.postMap["attributes"] = val
}
@@ -203,9 +203,9 @@ func WithOidcAuthMethodApiUrlPrefix(inApiUrlPrefix string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["api_url_prefix"] = inApiUrlPrefix
o.postMap["attributes"] = val
}
@@ -215,9 +215,9 @@ func DefaultOidcAuthMethodApiUrlPrefix() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["api_url_prefix"] = nil
o.postMap["attributes"] = val
}
@@ -239,9 +239,9 @@ func WithLdapAuthMethodBindDn(inBindDn string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["bind_dn"] = inBindDn
o.postMap["attributes"] = val
}
@@ -251,9 +251,9 @@ func DefaultLdapAuthMethodBindDn() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["bind_dn"] = nil
o.postMap["attributes"] = val
}
@@ -263,9 +263,9 @@ func WithLdapAuthMethodBindPassword(inBindPassword string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["bind_password"] = inBindPassword
o.postMap["attributes"] = val
}
@@ -275,9 +275,9 @@ func DefaultLdapAuthMethodBindPassword() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["bind_password"] = nil
o.postMap["attributes"] = val
}
@@ -287,9 +287,9 @@ func WithLdapAuthMethodCertificates(inCertificates []string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["certificates"] = inCertificates
o.postMap["attributes"] = val
}
@@ -299,9 +299,9 @@ func DefaultLdapAuthMethodCertificates() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["certificates"] = nil
o.postMap["attributes"] = val
}
@@ -311,9 +311,9 @@ func WithOidcAuthMethodClaimsScopes(inClaimsScopes []string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["claims_scopes"] = inClaimsScopes
o.postMap["attributes"] = val
}
@@ -323,9 +323,9 @@ func DefaultOidcAuthMethodClaimsScopes() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["claims_scopes"] = nil
o.postMap["attributes"] = val
}
@@ -335,9 +335,9 @@ func WithLdapAuthMethodClientCertificate(inClientCertificate string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_certificate"] = inClientCertificate
o.postMap["attributes"] = val
}
@@ -347,9 +347,9 @@ func DefaultLdapAuthMethodClientCertificate() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_certificate"] = nil
o.postMap["attributes"] = val
}
@@ -359,9 +359,9 @@ func WithLdapAuthMethodClientCertificateKey(inClientCertificateKey string) Optio
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_certificate_key"] = inClientCertificateKey
o.postMap["attributes"] = val
}
@@ -371,9 +371,9 @@ func DefaultLdapAuthMethodClientCertificateKey() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_certificate_key"] = nil
o.postMap["attributes"] = val
}
@@ -383,9 +383,9 @@ func WithOidcAuthMethodClientId(inClientId string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_id"] = inClientId
o.postMap["attributes"] = val
}
@@ -395,9 +395,9 @@ func DefaultOidcAuthMethodClientId() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_id"] = nil
o.postMap["attributes"] = val
}
@@ -407,9 +407,9 @@ func WithOidcAuthMethodClientSecret(inClientSecret string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_secret"] = inClientSecret
o.postMap["attributes"] = val
}
@@ -419,9 +419,9 @@ func DefaultOidcAuthMethodClientSecret() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_secret"] = nil
o.postMap["attributes"] = val
}
@@ -431,9 +431,9 @@ func WithLdapAuthMethodDereferenceAliases(inDereferenceAliases string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["dereference_aliases"] = inDereferenceAliases
o.postMap["attributes"] = val
}
@@ -443,9 +443,9 @@ func DefaultLdapAuthMethodDereferenceAliases() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["dereference_aliases"] = nil
o.postMap["attributes"] = val
}
@@ -467,9 +467,9 @@ func WithOidcAuthMethodDisableDiscoveredConfigValidation(inDisableDiscoveredConf
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["disable_discovered_config_validation"] = inDisableDiscoveredConfigValidation
o.postMap["attributes"] = val
}
@@ -479,9 +479,9 @@ func DefaultOidcAuthMethodDisableDiscoveredConfigValidation() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["disable_discovered_config_validation"] = nil
o.postMap["attributes"] = val
}
@@ -491,9 +491,9 @@ func WithLdapAuthMethodDiscoverDn(inDiscoverDn bool) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["discover_dn"] = inDiscoverDn
o.postMap["attributes"] = val
}
@@ -503,9 +503,9 @@ func DefaultLdapAuthMethodDiscoverDn() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["discover_dn"] = nil
o.postMap["attributes"] = val
}
@@ -515,9 +515,9 @@ func WithOidcAuthMethodDryRun(inDryRun bool) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["dry_run"] = inDryRun
o.postMap["attributes"] = val
}
@@ -527,9 +527,9 @@ func DefaultOidcAuthMethodDryRun() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["dry_run"] = nil
o.postMap["attributes"] = val
}
@@ -539,9 +539,9 @@ func WithLdapAuthMethodEnableGroups(inEnableGroups bool) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["enable_groups"] = inEnableGroups
o.postMap["attributes"] = val
}
@@ -551,9 +551,9 @@ func DefaultLdapAuthMethodEnableGroups() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["enable_groups"] = nil
o.postMap["attributes"] = val
}
@@ -563,9 +563,9 @@ func WithLdapAuthMethodGroupAttr(inGroupAttr string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["group_attr"] = inGroupAttr
o.postMap["attributes"] = val
}
@@ -575,9 +575,9 @@ func DefaultLdapAuthMethodGroupAttr() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["group_attr"] = nil
o.postMap["attributes"] = val
}
@@ -587,9 +587,9 @@ func WithLdapAuthMethodGroupDn(inGroupDn string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["group_dn"] = inGroupDn
o.postMap["attributes"] = val
}
@@ -599,9 +599,9 @@ func DefaultLdapAuthMethodGroupDn() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["group_dn"] = nil
o.postMap["attributes"] = val
}
@@ -611,9 +611,9 @@ func WithLdapAuthMethodGroupFilter(inGroupFilter string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["group_filter"] = inGroupFilter
o.postMap["attributes"] = val
}
@@ -623,9 +623,9 @@ func DefaultLdapAuthMethodGroupFilter() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["group_filter"] = nil
o.postMap["attributes"] = val
}
@@ -635,9 +635,9 @@ func WithOidcAuthMethodIdpCaCerts(inIdpCaCerts []string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["idp_ca_certs"] = inIdpCaCerts
o.postMap["attributes"] = val
}
@@ -647,9 +647,9 @@ func DefaultOidcAuthMethodIdpCaCerts() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["idp_ca_certs"] = nil
o.postMap["attributes"] = val
}
@@ -659,9 +659,9 @@ func WithLdapAuthMethodInsecureTls(inInsecureTls bool) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["insecure_tls"] = inInsecureTls
o.postMap["attributes"] = val
}
@@ -671,9 +671,9 @@ func DefaultLdapAuthMethodInsecureTls() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["insecure_tls"] = nil
o.postMap["attributes"] = val
}
@@ -683,9 +683,9 @@ func WithOidcAuthMethodIssuer(inIssuer string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["issuer"] = inIssuer
o.postMap["attributes"] = val
}
@@ -695,9 +695,9 @@ func DefaultOidcAuthMethodIssuer() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["issuer"] = nil
o.postMap["attributes"] = val
}
@@ -707,9 +707,9 @@ func WithOidcAuthMethodMaxAge(inMaxAge uint32) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["max_age"] = inMaxAge
o.postMap["attributes"] = val
}
@@ -719,9 +719,9 @@ func DefaultOidcAuthMethodMaxAge() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["max_age"] = nil
o.postMap["attributes"] = val
}
@@ -731,9 +731,9 @@ func WithLdapAuthMethodMaximumPageSize(inMaximumPageSize uint32) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["maximum_page_size"] = inMaximumPageSize
o.postMap["attributes"] = val
}
@@ -743,9 +743,9 @@ func DefaultLdapAuthMethodMaximumPageSize() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["maximum_page_size"] = nil
o.postMap["attributes"] = val
}
@@ -755,9 +755,9 @@ func WithPasswordAuthMethodMinLoginNameLength(inMinLoginNameLength uint32) Optio
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["min_login_name_length"] = inMinLoginNameLength
o.postMap["attributes"] = val
}
@@ -767,9 +767,9 @@ func DefaultPasswordAuthMethodMinLoginNameLength() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["min_login_name_length"] = nil
o.postMap["attributes"] = val
}
@@ -779,9 +779,9 @@ func WithPasswordAuthMethodMinPasswordLength(inMinPasswordLength uint32) Option
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["min_password_length"] = inMinPasswordLength
o.postMap["attributes"] = val
}
@@ -791,9 +791,9 @@ func DefaultPasswordAuthMethodMinPasswordLength() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["min_password_length"] = nil
o.postMap["attributes"] = val
}
@@ -815,9 +815,9 @@ func WithOidcAuthMethodPrompts(inPrompts []string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["prompts"] = inPrompts
o.postMap["attributes"] = val
}
@@ -827,9 +827,9 @@ func DefaultOidcAuthMethodPrompts() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["prompts"] = nil
o.postMap["attributes"] = val
}
@@ -839,9 +839,9 @@ func WithOidcAuthMethodSigningAlgorithms(inSigningAlgorithms []string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["signing_algorithms"] = inSigningAlgorithms
o.postMap["attributes"] = val
}
@@ -851,9 +851,9 @@ func DefaultOidcAuthMethodSigningAlgorithms() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["signing_algorithms"] = nil
o.postMap["attributes"] = val
}
@@ -863,9 +863,9 @@ func WithLdapAuthMethodStartTls(inStartTls bool) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["start_tls"] = inStartTls
o.postMap["attributes"] = val
}
@@ -875,9 +875,9 @@ func DefaultLdapAuthMethodStartTls() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["start_tls"] = nil
o.postMap["attributes"] = val
}
@@ -887,9 +887,9 @@ func WithLdapAuthMethodState(inState string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["state"] = inState
o.postMap["attributes"] = val
}
@@ -899,9 +899,9 @@ func DefaultLdapAuthMethodState() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["state"] = nil
o.postMap["attributes"] = val
}
@@ -911,9 +911,9 @@ func WithLdapAuthMethodUpnDomain(inUpnDomain string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["upn_domain"] = inUpnDomain
o.postMap["attributes"] = val
}
@@ -923,9 +923,9 @@ func DefaultLdapAuthMethodUpnDomain() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["upn_domain"] = nil
o.postMap["attributes"] = val
}
@@ -935,9 +935,9 @@ func WithLdapAuthMethodUrls(inUrls []string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["urls"] = inUrls
o.postMap["attributes"] = val
}
@@ -947,9 +947,9 @@ func DefaultLdapAuthMethodUrls() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["urls"] = nil
o.postMap["attributes"] = val
}
@@ -959,9 +959,9 @@ func WithLdapAuthMethodUseTokenGroups(inUseTokenGroups bool) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["use_token_groups"] = inUseTokenGroups
o.postMap["attributes"] = val
}
@@ -971,9 +971,9 @@ func DefaultLdapAuthMethodUseTokenGroups() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["use_token_groups"] = nil
o.postMap["attributes"] = val
}
@@ -983,9 +983,9 @@ func WithLdapAuthMethodUserAttr(inUserAttr string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["user_attr"] = inUserAttr
o.postMap["attributes"] = val
}
@@ -995,9 +995,9 @@ func DefaultLdapAuthMethodUserAttr() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["user_attr"] = nil
o.postMap["attributes"] = val
}
@@ -1007,9 +1007,9 @@ func WithLdapAuthMethodUserDn(inUserDn string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["user_dn"] = inUserDn
o.postMap["attributes"] = val
}
@@ -1019,9 +1019,9 @@ func DefaultLdapAuthMethodUserDn() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["user_dn"] = nil
o.postMap["attributes"] = val
}
@@ -1031,9 +1031,9 @@ func WithLdapAuthMethodUserFilter(inUserFilter string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["user_filter"] = inUserFilter
o.postMap["attributes"] = val
}
@@ -1043,9 +1043,9 @@ func DefaultLdapAuthMethodUserFilter() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["user_filter"] = nil
o.postMap["attributes"] = val
}
@@ -15,7 +15,7 @@ type PasswordAuthMethodAttributes struct {
MinPasswordLength uint32 `json:"min_password_length,omitempty"`
}
func AttributesMapToPasswordAuthMethodAttributes(in map[string]interface{}) (*PasswordAuthMethodAttributes, error) {
func AttributesMapToPasswordAuthMethodAttributes(in map[string]any) (*PasswordAuthMethodAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+1 -1
View File
@@ -51,7 +51,7 @@ type AuthTokenDeleteResult struct {
}
// GetItem will always be nil for AuthTokenDeleteResult
func (n AuthTokenDeleteResult) GetItem() interface{} {
func (n AuthTokenDeleteResult) GetItem() any {
return nil
}
+4 -4
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -32,7 +32,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -64,7 +64,7 @@ func getOpts(opt ...Option) (options, []api.Option) {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -89,6 +89,6 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+3 -3
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -31,7 +31,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -70,7 +70,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -54,7 +54,7 @@ type CredentialLibraryDeleteResult struct {
}
// GetItem will always be nil for CredentialLibraryDeleteResult
func (n CredentialLibraryDeleteResult) GetItem() interface{} {
func (n CredentialLibraryDeleteResult) GetItem() any {
return nil
}
+45 -45
View File
@@ -20,7 +20,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -30,7 +30,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -69,7 +69,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -94,9 +94,9 @@ func WithVaultSSHCertificateCredentialLibraryAdditionalValidPrincipals(inAdditio
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["additional_valid_principals"] = inAdditionalValidPrincipals
o.postMap["attributes"] = val
}
@@ -106,9 +106,9 @@ func DefaultVaultSSHCertificateCredentialLibraryAdditionalValidPrincipals() Opti
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["additional_valid_principals"] = nil
o.postMap["attributes"] = val
}
@@ -154,9 +154,9 @@ func WithVaultSSHCertificateCredentialLibraryCriticalOptions(inCriticalOptions m
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["critical_options"] = inCriticalOptions
o.postMap["attributes"] = val
}
@@ -166,9 +166,9 @@ func DefaultVaultSSHCertificateCredentialLibraryCriticalOptions() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["critical_options"] = nil
o.postMap["attributes"] = val
}
@@ -190,9 +190,9 @@ func WithVaultSSHCertificateCredentialLibraryExtensions(inExtensions map[string]
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["extensions"] = inExtensions
o.postMap["attributes"] = val
}
@@ -202,9 +202,9 @@ func DefaultVaultSSHCertificateCredentialLibraryExtensions() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["extensions"] = nil
o.postMap["attributes"] = val
}
@@ -214,9 +214,9 @@ func WithVaultCredentialLibraryHttpMethod(inHttpMethod string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["http_method"] = inHttpMethod
o.postMap["attributes"] = val
}
@@ -226,9 +226,9 @@ func DefaultVaultCredentialLibraryHttpMethod() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["http_method"] = nil
o.postMap["attributes"] = val
}
@@ -238,9 +238,9 @@ func WithVaultCredentialLibraryHttpRequestBody(inHttpRequestBody string) Option
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["http_request_body"] = inHttpRequestBody
o.postMap["attributes"] = val
}
@@ -250,9 +250,9 @@ func DefaultVaultCredentialLibraryHttpRequestBody() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["http_request_body"] = nil
o.postMap["attributes"] = val
}
@@ -262,9 +262,9 @@ func WithVaultSSHCertificateCredentialLibraryKeyBits(inKeyBits uint32) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["key_bits"] = inKeyBits
o.postMap["attributes"] = val
}
@@ -274,9 +274,9 @@ func DefaultVaultSSHCertificateCredentialLibraryKeyBits() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["key_bits"] = nil
o.postMap["attributes"] = val
}
@@ -286,9 +286,9 @@ func WithVaultSSHCertificateCredentialLibraryKeyId(inKeyId string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["key_id"] = inKeyId
o.postMap["attributes"] = val
}
@@ -298,9 +298,9 @@ func DefaultVaultSSHCertificateCredentialLibraryKeyId() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["key_id"] = nil
o.postMap["attributes"] = val
}
@@ -310,9 +310,9 @@ func WithVaultSSHCertificateCredentialLibraryKeyType(inKeyType string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["key_type"] = inKeyType
o.postMap["attributes"] = val
}
@@ -322,9 +322,9 @@ func DefaultVaultSSHCertificateCredentialLibraryKeyType() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["key_type"] = nil
o.postMap["attributes"] = val
}
@@ -346,9 +346,9 @@ func WithVaultCredentialLibraryPath(inPath string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["path"] = inPath
o.postMap["attributes"] = val
}
@@ -358,9 +358,9 @@ func WithVaultSSHCertificateCredentialLibraryPath(inPath string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["path"] = inPath
o.postMap["attributes"] = val
}
@@ -370,9 +370,9 @@ func WithVaultSSHCertificateCredentialLibraryTtl(inTtl string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["ttl"] = inTtl
o.postMap["attributes"] = val
}
@@ -382,9 +382,9 @@ func DefaultVaultSSHCertificateCredentialLibraryTtl() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["ttl"] = nil
o.postMap["attributes"] = val
}
@@ -394,9 +394,9 @@ func WithVaultSSHCertificateCredentialLibraryUsername(inUsername string) Option
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["username"] = inUsername
o.postMap["attributes"] = val
}
@@ -16,7 +16,7 @@ type VaultCredentialLibraryAttributes struct {
HttpRequestBody string `json:"http_request_body,omitempty"`
}
func AttributesMapToVaultCredentialLibraryAttributes(in map[string]interface{}) (*VaultCredentialLibraryAttributes, error) {
func AttributesMapToVaultCredentialLibraryAttributes(in map[string]any) (*VaultCredentialLibraryAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
@@ -22,7 +22,7 @@ type VaultSSHCertificateCredentialLibraryAttributes struct {
AdditionalValidPrincipals []string `json:"additional_valid_principals,omitempty"`
}
func AttributesMapToVaultSSHCertificateCredentialLibraryAttributes(in map[string]interface{}) (*VaultSSHCertificateCredentialLibraryAttributes, error) {
func AttributesMapToVaultSSHCertificateCredentialLibraryAttributes(in map[string]any) (*VaultSSHCertificateCredentialLibraryAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+1 -1
View File
@@ -52,7 +52,7 @@ type CredentialDeleteResult struct {
}
// GetItem will always be nil for CredentialDeleteResult
func (n CredentialDeleteResult) GetItem() interface{} {
func (n CredentialDeleteResult) GetItem() any {
return nil
}
+1 -1
View File
@@ -15,7 +15,7 @@ type JsonAttributes struct {
ObjectHmac string `json:"object_hmac,omitempty"`
}
func AttributesMapToJsonAttributes(in map[string]interface{}) (*JsonAttributes, error) {
func AttributesMapToJsonAttributes(in map[string]any) (*JsonAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+17 -17
View File
@@ -20,7 +20,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -30,7 +30,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -69,7 +69,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -130,9 +130,9 @@ func WithJsonCredentialObject(inObject map[string]interface{}) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["object"] = inObject
o.postMap["attributes"] = val
}
@@ -142,9 +142,9 @@ func WithUsernamePasswordCredentialPassword(inPassword string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["password"] = inPassword
o.postMap["attributes"] = val
}
@@ -154,9 +154,9 @@ func WithSshPrivateKeyCredentialPrivateKey(inPrivateKey string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["private_key"] = inPrivateKey
o.postMap["attributes"] = val
}
@@ -166,9 +166,9 @@ func WithSshPrivateKeyCredentialPrivateKeyPassphrase(inPrivateKeyPassphrase stri
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["private_key_passphrase"] = inPrivateKeyPassphrase
o.postMap["attributes"] = val
}
@@ -178,9 +178,9 @@ func DefaultSshPrivateKeyCredentialPrivateKeyPassphrase() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["private_key_passphrase"] = nil
o.postMap["attributes"] = val
}
@@ -190,9 +190,9 @@ func WithSshPrivateKeyCredentialUsername(inUsername string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["username"] = inUsername
o.postMap["attributes"] = val
}
@@ -202,9 +202,9 @@ func WithUsernamePasswordCredentialUsername(inUsername string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["username"] = inUsername
o.postMap["attributes"] = val
}
@@ -18,7 +18,7 @@ type SshPrivateKeyAttributes struct {
PrivateKeyPassphraseHmac string `json:"private_key_passphrase_hmac,omitempty"`
}
func AttributesMapToSshPrivateKeyAttributes(in map[string]interface{}) (*SshPrivateKeyAttributes, error) {
func AttributesMapToSshPrivateKeyAttributes(in map[string]any) (*SshPrivateKeyAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
@@ -16,7 +16,7 @@ type UsernamePasswordAttributes struct {
PasswordHmac string `json:"password_hmac,omitempty"`
}
func AttributesMapToUsernamePasswordAttributes(in map[string]interface{}) (*UsernamePasswordAttributes, error) {
func AttributesMapToUsernamePasswordAttributes(in map[string]any) (*UsernamePasswordAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+1 -1
View File
@@ -53,7 +53,7 @@ type CredentialStoreDeleteResult struct {
}
// GetItem will always be nil for CredentialStoreDeleteResult
func (n CredentialStoreDeleteResult) GetItem() interface{} {
func (n CredentialStoreDeleteResult) GetItem() any {
return nil
}
+36 -36
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -32,7 +32,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -74,7 +74,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -99,7 +99,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
@@ -107,9 +107,9 @@ func WithVaultCredentialStoreAddress(inAddress string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["address"] = inAddress
o.postMap["attributes"] = val
}
@@ -131,9 +131,9 @@ func WithVaultCredentialStoreCaCert(inCaCert string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["ca_cert"] = inCaCert
o.postMap["attributes"] = val
}
@@ -143,9 +143,9 @@ func DefaultVaultCredentialStoreCaCert() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["ca_cert"] = nil
o.postMap["attributes"] = val
}
@@ -155,9 +155,9 @@ func WithVaultCredentialStoreClientCertificate(inClientCertificate string) Optio
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_certificate"] = inClientCertificate
o.postMap["attributes"] = val
}
@@ -167,9 +167,9 @@ func DefaultVaultCredentialStoreClientCertificate() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_certificate"] = nil
o.postMap["attributes"] = val
}
@@ -179,9 +179,9 @@ func WithVaultCredentialStoreClientCertificateKey(inClientCertificateKey string)
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_certificate_key"] = inClientCertificateKey
o.postMap["attributes"] = val
}
@@ -191,9 +191,9 @@ func DefaultVaultCredentialStoreClientCertificateKey() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["client_certificate_key"] = nil
o.postMap["attributes"] = val
}
@@ -227,9 +227,9 @@ func WithVaultCredentialStoreNamespace(inNamespace string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["namespace"] = inNamespace
o.postMap["attributes"] = val
}
@@ -239,9 +239,9 @@ func DefaultVaultCredentialStoreNamespace() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["namespace"] = nil
o.postMap["attributes"] = val
}
@@ -251,9 +251,9 @@ func WithVaultCredentialStoreTlsServerName(inTlsServerName string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["tls_server_name"] = inTlsServerName
o.postMap["attributes"] = val
}
@@ -263,9 +263,9 @@ func DefaultVaultCredentialStoreTlsServerName() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["tls_server_name"] = nil
o.postMap["attributes"] = val
}
@@ -275,9 +275,9 @@ func WithVaultCredentialStoreTlsSkipVerify(inTlsSkipVerify bool) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["tls_skip_verify"] = inTlsSkipVerify
o.postMap["attributes"] = val
}
@@ -287,9 +287,9 @@ func DefaultVaultCredentialStoreTlsSkipVerify() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["tls_skip_verify"] = nil
o.postMap["attributes"] = val
}
@@ -299,9 +299,9 @@ func WithVaultCredentialStoreToken(inToken string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["token"] = inToken
o.postMap["attributes"] = val
}
@@ -311,9 +311,9 @@ func WithVaultCredentialStoreWorkerFilter(inWorkerFilter string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["worker_filter"] = inWorkerFilter
o.postMap["attributes"] = val
}
@@ -323,9 +323,9 @@ func DefaultVaultCredentialStoreWorkerFilter() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["worker_filter"] = nil
o.postMap["attributes"] = val
}
@@ -25,7 +25,7 @@ type VaultCredentialStoreAttributes struct {
TokenStatus string `json:"token_status,omitempty"`
}
func AttributesMapToVaultCredentialStoreAttributes(in map[string]interface{}) (*VaultCredentialStoreAttributes, error) {
func AttributesMapToVaultCredentialStoreAttributes(in map[string]any) (*VaultCredentialStoreAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+1 -1
View File
@@ -52,7 +52,7 @@ type GroupDeleteResult struct {
}
// GetItem will always be nil for GroupDeleteResult
func (n GroupDeleteResult) GetItem() interface{} {
func (n GroupDeleteResult) GetItem() any {
return nil
}
+4 -4
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -32,7 +32,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -74,7 +74,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -99,7 +99,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+1 -1
View File
@@ -58,7 +58,7 @@ type HostCatalogDeleteResult struct {
}
// GetItem will always be nil for HostCatalogDeleteResult
func (n HostCatalogDeleteResult) GetItem() interface{} {
func (n HostCatalogDeleteResult) GetItem() any {
return nil
}
+4 -4
View File
@@ -22,7 +22,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -33,7 +33,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -75,7 +75,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -100,7 +100,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+1 -1
View File
@@ -59,7 +59,7 @@ type HostDeleteResult struct {
}
// GetItem will always be nil for HostDeleteResult
func (n HostDeleteResult) GetItem() interface{} {
func (n HostDeleteResult) GetItem() any {
return nil
}
+7 -7
View File
@@ -20,7 +20,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -30,7 +30,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -69,7 +69,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -94,9 +94,9 @@ func WithStaticHostAddress(inAddress string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["address"] = inAddress
o.postMap["attributes"] = val
}
@@ -106,9 +106,9 @@ func DefaultStaticHostAddress() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["address"] = nil
o.postMap["attributes"] = val
}
+1 -1
View File
@@ -14,7 +14,7 @@ type StaticHostAttributes struct {
Address string `json:"address,omitempty"`
}
func AttributesMapToStaticHostAttributes(in map[string]interface{}) (*StaticHostAttributes, error) {
func AttributesMapToStaticHostAttributes(in map[string]any) (*StaticHostAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+1 -1
View File
@@ -57,7 +57,7 @@ type HostSetDeleteResult struct {
}
// GetItem will always be nil for HostSetDeleteResult
func (n HostSetDeleteResult) GetItem() interface{} {
func (n HostSetDeleteResult) GetItem() any {
return nil
}
+3 -3
View File
@@ -20,7 +20,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -30,7 +30,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -69,7 +69,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -14,7 +14,7 @@ type LdapManagedGroupAttributes struct {
GroupNames []string `json:"group_names,omitempty"`
}
func AttributesMapToLdapManagedGroupAttributes(in map[string]interface{}) (*LdapManagedGroupAttributes, error) {
func AttributesMapToLdapManagedGroupAttributes(in map[string]any) (*LdapManagedGroupAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+1 -1
View File
@@ -53,7 +53,7 @@ type ManagedGroupDeleteResult struct {
}
// GetItem will always be nil for ManagedGroupDeleteResult
func (n ManagedGroupDeleteResult) GetItem() interface{} {
func (n ManagedGroupDeleteResult) GetItem() any {
return nil
}
@@ -14,7 +14,7 @@ type OidcManagedGroupAttributes struct {
Filter string `json:"filter,omitempty"`
}
func AttributesMapToOidcManagedGroupAttributes(in map[string]interface{}) (*OidcManagedGroupAttributes, error) {
func AttributesMapToOidcManagedGroupAttributes(in map[string]any) (*OidcManagedGroupAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+9 -9
View File
@@ -20,7 +20,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -30,7 +30,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -69,7 +69,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -118,9 +118,9 @@ func WithOidcManagedGroupFilter(inFilter string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["filter"] = inFilter
o.postMap["attributes"] = val
}
@@ -130,9 +130,9 @@ func WithLdapManagedGroupGroupNames(inGroupNames []string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["group_names"] = inGroupNames
o.postMap["attributes"] = val
}
@@ -142,9 +142,9 @@ func DefaultLdapManagedGroupGroupNames() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["group_names"] = nil
o.postMap["attributes"] = val
}
+4 -4
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -32,7 +32,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -74,7 +74,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -99,7 +99,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+1 -1
View File
@@ -52,7 +52,7 @@ type PolicyDeleteResult struct {
}
// GetItem will always be nil for PolicyDeleteResult
func (n PolicyDeleteResult) GetItem() interface{} {
func (n PolicyDeleteResult) GetItem() any {
return nil
}
@@ -15,7 +15,7 @@ type StoragePolicyAttributes struct {
DeleteAfter *StoragePolicyDeleteAfter `json:"delete_after,omitempty"`
}
func AttributesMapToStoragePolicyAttributes(in map[string]interface{}) (*StoragePolicyAttributes, error) {
func AttributesMapToStoragePolicyAttributes(in map[string]any) (*StoragePolicyAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+4 -4
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -32,7 +32,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -74,7 +74,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -99,7 +99,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+1 -1
View File
@@ -55,7 +55,7 @@ type RoleDeleteResult struct {
}
// GetItem will always be nil for RoleDeleteResult
func (n RoleDeleteResult) GetItem() interface{} {
func (n RoleDeleteResult) GetItem() any {
return nil
}
+4 -4
View File
@@ -22,7 +22,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -33,7 +33,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -75,7 +75,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -100,7 +100,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+1 -1
View File
@@ -53,7 +53,7 @@ type ScopeDeleteResult struct {
}
// GetItem will always be nil for ScopeDeleteResult
func (n ScopeDeleteResult) GetItem() interface{} {
func (n ScopeDeleteResult) GetItem() any {
return nil
}
@@ -14,7 +14,7 @@ type JsonCredentialAttributes struct {
ObjectHmac string `json:"object_hmac,omitempty"`
}
func AttributesMapToJsonCredentialAttributes(in map[string]interface{}) (*JsonCredentialAttributes, error) {
func AttributesMapToJsonCredentialAttributes(in map[string]any) (*JsonCredentialAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+4 -4
View File
@@ -20,7 +20,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -31,7 +31,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -63,7 +63,7 @@ func getOpts(opt ...Option) (options, []api.Option) {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -79,6 +79,6 @@ func WithListToken(listToken string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
@@ -58,7 +58,7 @@ type SessionRecordingDeleteResult struct {
}
// GetItem will always be nil for SessionRecordingDeleteResult
func (n SessionRecordingDeleteResult) GetItem() interface{} {
func (n SessionRecordingDeleteResult) GetItem() any {
return nil
}
@@ -16,7 +16,7 @@ type SshPrivateKeyCredentialAttributes struct {
PrivateKeyPassphraseHmac string `json:"private_key_passphrase_hmac,omitempty"`
}
func AttributesMapToSshPrivateKeyCredentialAttributes(in map[string]interface{}) (*SshPrivateKeyCredentialAttributes, error) {
func AttributesMapToSshPrivateKeyCredentialAttributes(in map[string]any) (*SshPrivateKeyCredentialAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
@@ -15,7 +15,7 @@ type SshTargetAttributes struct {
DefaultClientPort uint32 `json:"default_client_port,omitempty"`
}
func AttributesMapToSshTargetAttributes(in map[string]interface{}) (*SshTargetAttributes, error) {
func AttributesMapToSshTargetAttributes(in map[string]any) (*SshTargetAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
@@ -14,7 +14,7 @@ type StaticHostAttributes struct {
Address string `json:"address,omitempty"`
}
func AttributesMapToStaticHostAttributes(in map[string]interface{}) (*StaticHostAttributes, error) {
func AttributesMapToStaticHostAttributes(in map[string]any) (*StaticHostAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
@@ -15,7 +15,7 @@ type UsernamePasswordCredentialAttributes struct {
PasswordHmac string `json:"password_hmac,omitempty"`
}
func AttributesMapToUsernamePasswordCredentialAttributes(in map[string]interface{}) (*UsernamePasswordCredentialAttributes, error) {
func AttributesMapToUsernamePasswordCredentialAttributes(in map[string]any) (*UsernamePasswordCredentialAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
@@ -16,7 +16,7 @@ type VaultCredentialLibraryAttributes struct {
HttpRequestBody string `json:"http_request_body,omitempty"`
}
func AttributesMapToVaultCredentialLibraryAttributes(in map[string]interface{}) (*VaultCredentialLibraryAttributes, error) {
func AttributesMapToVaultCredentialLibraryAttributes(in map[string]any) (*VaultCredentialLibraryAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
@@ -18,7 +18,7 @@ type VaultCredentialStoreAttributes struct {
WorkerFilter string `json:"worker_filter,omitempty"`
}
func AttributesMapToVaultCredentialStoreAttributes(in map[string]interface{}) (*VaultCredentialStoreAttributes, error) {
func AttributesMapToVaultCredentialStoreAttributes(in map[string]any) (*VaultCredentialStoreAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
@@ -21,7 +21,7 @@ type VaultSSHCertificateCredentialLibraryAttributes struct {
AdditionalValidPrincipals []string `json:"additional_valid_principals,omitempty"`
}
func AttributesMapToVaultSSHCertificateCredentialLibraryAttributes(in map[string]interface{}) (*VaultSSHCertificateCredentialLibraryAttributes, error) {
func AttributesMapToVaultSSHCertificateCredentialLibraryAttributes(in map[string]any) (*VaultSSHCertificateCredentialLibraryAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+4 -4
View File
@@ -22,7 +22,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -33,7 +33,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -75,7 +75,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -100,7 +100,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+1 -1
View File
@@ -60,7 +60,7 @@ type SessionDeleteResult struct {
}
// GetItem will always be nil for SessionDeleteResult
func (n SessionDeleteResult) GetItem() interface{} {
func (n SessionDeleteResult) GetItem() any {
return nil
}
+4 -4
View File
@@ -22,7 +22,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -33,7 +33,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -75,7 +75,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -100,7 +100,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+1 -1
View File
@@ -61,7 +61,7 @@ type StorageBucketDeleteResult struct {
}
// GetItem will always be nil for StorageBucketDeleteResult
func (n StorageBucketDeleteResult) GetItem() interface{} {
func (n StorageBucketDeleteResult) GetItem() any {
return nil
}
+26 -26
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -32,7 +32,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -74,7 +74,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -99,7 +99,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
@@ -149,9 +149,9 @@ func WithSshTargetDefaultClientPort(inDefaultClientPort uint32) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["default_client_port"] = inDefaultClientPort
o.postMap["attributes"] = val
}
@@ -161,9 +161,9 @@ func DefaultSshTargetDefaultClientPort() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["default_client_port"] = nil
o.postMap["attributes"] = val
}
@@ -173,9 +173,9 @@ func WithTcpTargetDefaultClientPort(inDefaultClientPort uint32) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["default_client_port"] = inDefaultClientPort
o.postMap["attributes"] = val
}
@@ -185,9 +185,9 @@ func DefaultTcpTargetDefaultClientPort() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["default_client_port"] = nil
o.postMap["attributes"] = val
}
@@ -197,9 +197,9 @@ func WithSshTargetDefaultPort(inDefaultPort uint32) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["default_port"] = inDefaultPort
o.postMap["attributes"] = val
}
@@ -209,9 +209,9 @@ func DefaultSshTargetDefaultPort() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["default_port"] = nil
o.postMap["attributes"] = val
}
@@ -221,9 +221,9 @@ func WithTcpTargetDefaultPort(inDefaultPort uint32) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["default_port"] = inDefaultPort
o.postMap["attributes"] = val
}
@@ -233,9 +233,9 @@ func DefaultTcpTargetDefaultPort() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["default_port"] = nil
o.postMap["attributes"] = val
}
@@ -269,9 +269,9 @@ func WithSshTargetEnableSessionRecording(inEnableSessionRecording bool) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["enable_session_recording"] = inEnableSessionRecording
o.postMap["attributes"] = val
}
@@ -359,9 +359,9 @@ func WithSshTargetStorageBucketId(inStorageBucketId string) Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["storage_bucket_id"] = inStorageBucketId
o.postMap["attributes"] = val
}
@@ -371,9 +371,9 @@ func DefaultSshTargetStorageBucketId() Option {
return func(o *options) {
raw, ok := o.postMap["attributes"]
if !ok {
raw = interface{}(map[string]interface{}{})
raw = any(map[string]any{})
}
val := raw.(map[string]interface{})
val := raw.(map[string]any)
val["storage_bucket_id"] = nil
o.postMap["attributes"] = val
}
+1 -1
View File
@@ -17,7 +17,7 @@ type SshTargetAttributes struct {
EnableSessionRecording bool `json:"enable_session_recording,omitempty"`
}
func AttributesMapToSshTargetAttributes(in map[string]interface{}) (*SshTargetAttributes, error) {
func AttributesMapToSshTargetAttributes(in map[string]any) (*SshTargetAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+1 -1
View File
@@ -66,7 +66,7 @@ type TargetDeleteResult struct {
}
// GetItem will always be nil for TargetDeleteResult
func (n TargetDeleteResult) GetItem() interface{} {
func (n TargetDeleteResult) GetItem() any {
return nil
}
+1 -1
View File
@@ -15,7 +15,7 @@ type TcpTargetAttributes struct {
DefaultClientPort uint32 `json:"default_client_port,omitempty"`
}
func AttributesMapToTcpTargetAttributes(in map[string]interface{}) (*TcpTargetAttributes, error) {
func AttributesMapToTcpTargetAttributes(in map[string]any) (*TcpTargetAttributes, error) {
if in == nil {
return nil, fmt.Errorf("nil input map")
}
+4 -4
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -32,7 +32,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -74,7 +74,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -99,7 +99,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+1 -1
View File
@@ -56,7 +56,7 @@ type UserDeleteResult struct {
}
// GetItem will always be nil for UserDeleteResult
func (n UserDeleteResult) GetItem() interface{} {
func (n UserDeleteResult) GetItem() any {
return nil
}
+4 -4
View File
@@ -21,7 +21,7 @@ import (
type Option func(*options)
type options struct {
postMap map[string]interface{}
postMap map[string]any
queryMap map[string]string
withAutomaticVersioning bool
withSkipCurlOutput bool
@@ -32,7 +32,7 @@ type options struct {
func getDefaultOptions() options {
return options{
postMap: make(map[string]interface{}),
postMap: make(map[string]any),
queryMap: make(map[string]string),
}
}
@@ -74,7 +74,7 @@ func WithAutomaticVersioning(enable bool) Option {
// Useful for when we need to look up versions.
func WithSkipCurlOutput(skip bool) Option {
return func(o *options) {
o.withSkipCurlOutput = true
o.withSkipCurlOutput = skip
}
}
@@ -99,7 +99,7 @@ func WithFilter(filter string) Option {
// resource
func WithRecursive(recurse bool) Option {
return func(o *options) {
o.withRecursive = true
o.withRecursive = recurse
}
}
+1 -1
View File
@@ -63,7 +63,7 @@ type WorkerDeleteResult struct {
}
// GetItem will always be nil for WorkerDeleteResult
func (n WorkerDeleteResult) GetItem() interface{} {
func (n WorkerDeleteResult) GetItem() any {
return nil
}