-
Notifications
You must be signed in to change notification settings - Fork 0
/
zz_generated_ldap_config.go
153 lines (139 loc) · 8.55 KB
/
zz_generated_ldap_config.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
package client
import (
"github.com/rancher/norman/types"
)
const (
LdapConfigType = "ldapConfig"
LdapConfigFieldAccessMode = "accessMode"
LdapConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds"
LdapConfigFieldAnnotations = "annotations"
LdapConfigFieldCertificate = "certificate"
LdapConfigFieldConnectionTimeout = "connectionTimeout"
LdapConfigFieldCreated = "created"
LdapConfigFieldCreatorID = "creatorId"
LdapConfigFieldEnabled = "enabled"
LdapConfigFieldGroupDNAttribute = "groupDNAttribute"
LdapConfigFieldGroupMemberMappingAttribute = "groupMemberMappingAttribute"
LdapConfigFieldGroupMemberUserAttribute = "groupMemberUserAttribute"
LdapConfigFieldGroupNameAttribute = "groupNameAttribute"
LdapConfigFieldGroupObjectClass = "groupObjectClass"
LdapConfigFieldGroupSearchAttribute = "groupSearchAttribute"
LdapConfigFieldGroupSearchBase = "groupSearchBase"
LdapConfigFieldLabels = "labels"
LdapConfigFieldName = "name"
LdapConfigFieldNestedGroupMembershipEnabled = "nestedGroupMembershipEnabled"
LdapConfigFieldOwnerReferences = "ownerReferences"
LdapConfigFieldPort = "port"
LdapConfigFieldRemoved = "removed"
LdapConfigFieldServers = "servers"
LdapConfigFieldServiceAccountDistinguishedName = "serviceAccountDistinguishedName"
LdapConfigFieldServiceAccountPassword = "serviceAccountPassword"
LdapConfigFieldTLS = "tls"
LdapConfigFieldType = "type"
LdapConfigFieldUUID = "uuid"
LdapConfigFieldUserDisabledBitMask = "userDisabledBitMask"
LdapConfigFieldUserEnabledAttribute = "userEnabledAttribute"
LdapConfigFieldUserLoginAttribute = "userLoginAttribute"
LdapConfigFieldUserMemberAttribute = "userMemberAttribute"
LdapConfigFieldUserNameAttribute = "userNameAttribute"
LdapConfigFieldUserObjectClass = "userObjectClass"
LdapConfigFieldUserSearchAttribute = "userSearchAttribute"
LdapConfigFieldUserSearchBase = "userSearchBase"
)
type LdapConfig struct {
types.Resource
AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"`
AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"`
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
Certificate string `json:"certificate,omitempty" yaml:"certificate,omitempty"`
ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connectionTimeout,omitempty"`
Created string `json:"created,omitempty" yaml:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
GroupDNAttribute string `json:"groupDNAttribute,omitempty" yaml:"groupDNAttribute,omitempty"`
GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"groupMemberMappingAttribute,omitempty"`
GroupMemberUserAttribute string `json:"groupMemberUserAttribute,omitempty" yaml:"groupMemberUserAttribute,omitempty"`
GroupNameAttribute string `json:"groupNameAttribute,omitempty" yaml:"groupNameAttribute,omitempty"`
GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"groupObjectClass,omitempty"`
GroupSearchAttribute string `json:"groupSearchAttribute,omitempty" yaml:"groupSearchAttribute,omitempty"`
GroupSearchBase string `json:"groupSearchBase,omitempty" yaml:"groupSearchBase,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
NestedGroupMembershipEnabled bool `json:"nestedGroupMembershipEnabled,omitempty" yaml:"nestedGroupMembershipEnabled,omitempty"`
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
Servers []string `json:"servers,omitempty" yaml:"servers,omitempty"`
ServiceAccountDistinguishedName string `json:"serviceAccountDistinguishedName,omitempty" yaml:"serviceAccountDistinguishedName,omitempty"`
ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"serviceAccountPassword,omitempty"`
TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"userDisabledBitMask,omitempty"`
UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"userEnabledAttribute,omitempty"`
UserLoginAttribute string `json:"userLoginAttribute,omitempty" yaml:"userLoginAttribute,omitempty"`
UserMemberAttribute string `json:"userMemberAttribute,omitempty" yaml:"userMemberAttribute,omitempty"`
UserNameAttribute string `json:"userNameAttribute,omitempty" yaml:"userNameAttribute,omitempty"`
UserObjectClass string `json:"userObjectClass,omitempty" yaml:"userObjectClass,omitempty"`
UserSearchAttribute string `json:"userSearchAttribute,omitempty" yaml:"userSearchAttribute,omitempty"`
UserSearchBase string `json:"userSearchBase,omitempty" yaml:"userSearchBase,omitempty"`
}
type LdapConfigCollection struct {
types.Collection
Data []LdapConfig `json:"data,omitempty"`
client *LdapConfigClient
}
type LdapConfigClient struct {
apiClient *Client
}
type LdapConfigOperations interface {
List(opts *types.ListOpts) (*LdapConfigCollection, error)
Create(opts *LdapConfig) (*LdapConfig, error)
Update(existing *LdapConfig, updates interface{}) (*LdapConfig, error)
Replace(existing *LdapConfig) (*LdapConfig, error)
ByID(id string) (*LdapConfig, error)
Delete(container *LdapConfig) error
}
func newLdapConfigClient(apiClient *Client) *LdapConfigClient {
return &LdapConfigClient{
apiClient: apiClient,
}
}
func (c *LdapConfigClient) Create(container *LdapConfig) (*LdapConfig, error) {
resp := &LdapConfig{}
err := c.apiClient.Ops.DoCreate(LdapConfigType, container, resp)
return resp, err
}
func (c *LdapConfigClient) Update(existing *LdapConfig, updates interface{}) (*LdapConfig, error) {
resp := &LdapConfig{}
err := c.apiClient.Ops.DoUpdate(LdapConfigType, &existing.Resource, updates, resp)
return resp, err
}
func (c *LdapConfigClient) Replace(obj *LdapConfig) (*LdapConfig, error) {
resp := &LdapConfig{}
err := c.apiClient.Ops.DoReplace(LdapConfigType, &obj.Resource, obj, resp)
return resp, err
}
func (c *LdapConfigClient) List(opts *types.ListOpts) (*LdapConfigCollection, error) {
resp := &LdapConfigCollection{}
err := c.apiClient.Ops.DoList(LdapConfigType, opts, resp)
resp.client = c
return resp, err
}
func (cc *LdapConfigCollection) Next() (*LdapConfigCollection, error) {
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
resp := &LdapConfigCollection{}
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
resp.client = cc.client
return resp, err
}
return nil, nil
}
func (c *LdapConfigClient) ByID(id string) (*LdapConfig, error) {
resp := &LdapConfig{}
err := c.apiClient.Ops.DoByID(LdapConfigType, id, resp)
return resp, err
}
func (c *LdapConfigClient) Delete(container *LdapConfig) error {
return c.apiClient.Ops.DoResourceDelete(LdapConfigType, &container.Resource)
}