Documentation ¶
Index ¶
- Constants
- Variables
- type DomainManager
- type GroupManager
- type IdentityProviderManager
- type ProjectManagerV3
- func (this *ProjectManagerV3) AddTags(session *mcclient.ClientSession, id string, tags []string) error
- func (this *ProjectManagerV3) DoCreateProject(s *mcclient.ClientSession, p jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ProjectManagerV3) DoJoinProject(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ProjectManagerV3) DoLeaveProject(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ProjectManagerV3) DoProjectBatchDeleteUserGroup(s *mcclient.ClientSession, pid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ProjectManagerV3) DoProjectBatchJoin(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *ProjectManagerV3) FetchId(s *mcclient.ClientSession, project string, domain string) (string, error)
- func (this *ProjectManagerV3) JoinProject(s *mcclient.ClientSession, rid, pid, uid string) error
- type RegionManager
- type RoleAssignmentManagerV3
- type RolesManager
- func (this *RolesManager) BatchDelete(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject) []modulebase.SubmitResult
- func (this *RolesManager) BatchDeleteInContexts(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject, ...) []modulebase.SubmitResult
- func (this *RolesManager) Delete(session *mcclient.ClientSession, id string, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *RolesManager) DeleteInContexts(session *mcclient.ClientSession, id string, body jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- type SAccessKeySecret
- type SCredentialManager
- func (manager *SCredentialManager) CreateAccessKeySecret(s *mcclient.ClientSession, uid string, pid string, expireAt time.Time) (SAccessKeySecret, error)
- func (manager *SCredentialManager) CreateEncryptKey(s *mcclient.ClientSession, uid string, name string, algName string) (SEncryptKeySecret, error)
- func (manager *SCredentialManager) CreateOIDCSecret(s *mcclient.ClientSession, uid string, pid string, redirectUri string) (SOpenIDConnectCredential, error)
- func (manager *SCredentialManager) CreateTotpSecret(s *mcclient.ClientSession, uid string) (string, error)
- func (manager *SCredentialManager) DoCreateAccessKeySecret(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (manager *SCredentialManager) DoCreateEncryptKey(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (manager *SCredentialManager) DoCreateOidcSecret(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (manager *SCredentialManager) EncryptKeyDecrypt(s *mcclient.ClientSession, keyId string, secret []byte) ([]byte, error)
- func (manager *SCredentialManager) EncryptKeyDecryptBase64(s *mcclient.ClientSession, keyId string, secret string) ([]byte, error)
- func (manager *SCredentialManager) EncryptKeyEncrypt(s *mcclient.ClientSession, keyId string, secret []byte) ([]byte, error)
- func (manager *SCredentialManager) EncryptKeyEncryptBase64(s *mcclient.ClientSession, keyId string, secret []byte) (string, error)
- func (manager *SCredentialManager) FetchAccessKeySecrets(s *mcclient.ClientSession, uid string, pid string) ([]jsonutils.JSONObject, error)
- func (manager *SCredentialManager) FetchEncryptionKeys(s *mcclient.ClientSession, uid string) ([]jsonutils.JSONObject, error)
- func (manager *SCredentialManager) FetchOIDCSecrets(s *mcclient.ClientSession, uid string, pid string) ([]jsonutils.JSONObject, error)
- func (manager *SCredentialManager) FetchRecoverySecrets(s *mcclient.ClientSession, uid string) ([]jsonutils.JSONObject, error)
- func (manager *SCredentialManager) FetchTotpSecrets(s *mcclient.ClientSession, uid string) ([]jsonutils.JSONObject, error)
- func (manager *SCredentialManager) GetAccessKeySecrets(s *mcclient.ClientSession, uid string, pid string) ([]SAccessKeySecret, error)
- func (manager *SCredentialManager) GetEncryptKey(s *mcclient.ClientSession, kid string) (SEncryptKeySecret, error)
- func (manager *SCredentialManager) GetEncryptKeys(s *mcclient.ClientSession, uid string) ([]SEncryptKeySecret, error)
- func (manager *SCredentialManager) GetEncryptKeysRpc(s *mcclient.ClientSession, params jsonutils.JSONObject) (..., error)
- func (manager *SCredentialManager) GetOIDCSecret(s *mcclient.ClientSession, uid string, pid string) ([]SOpenIDConnectCredential, error)
- func (manager *SCredentialManager) GetRecoverySecrets(s *mcclient.ClientSession, uid string) ([]SRecoverySecret, error)
- func (manager *SCredentialManager) GetTotpSecret(s *mcclient.ClientSession, uid string) (string, error)
- func (manager *SCredentialManager) RemoveAccessKeySecrets(s *mcclient.ClientSession, uid string, pid string) error
- func (manager *SCredentialManager) RemoveEncryptKeys(s *mcclient.ClientSession, uid string) error
- func (manager *SCredentialManager) RemoveOIDCSecrets(s *mcclient.ClientSession, uid string, pid string) error
- func (manager *SCredentialManager) RemoveRecoverySecrets(s *mcclient.ClientSession, uid string) error
- func (manager *SCredentialManager) RemoveTotpSecrets(s *mcclient.ClientSession, uid string) error
- func (manager *SCredentialManager) SaveRecoverySecrets(s *mcclient.ClientSession, uid string, questions []SRecoverySecret) error
- type SEncryptKeySecret
- func (key SEncryptKeySecret) Decrypt(secret []byte) ([]byte, error)
- func (key SEncryptKeySecret) DecryptBase64(secret string) ([]byte, error)
- func (key SEncryptKeySecret) Encrypt(secret []byte) ([]byte, error)
- func (key SEncryptKeySecret) EncryptBase64(secret []byte) (string, error)
- func (key SEncryptKeySecret) Marshal() jsonutils.JSONObject
- type SIdentityUsageManager
- type SOpenIDConnectCredential
- type SPolicyManager
- type SRecoverySecret
- type SRecoverySecretSet
- type SRolePolicyManager
- type STotpSecret
- type ScopeResourceManager
- type UserManager
- type UserManagerV3
- func (this *UserManagerV3) DoCreateUser(s *mcclient.ClientSession, p jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *UserManagerV3) DoJoinGroups(s *mcclient.ClientSession, uid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (this *UserManagerV3) FetchId(s *mcclient.ClientSession, user string, domain string) (string, error)
- func (this *UserManagerV3) GetGroups(session *mcclient.ClientSession, uid string) (*modulebase.ListResult, error)
- func (this *UserManagerV3) GetProjects(session *mcclient.ClientSession, uid string) (*modulebase.ListResult, error)
- func (this *UserManagerV3) GetProjectsRPC(s *mcclient.ClientSession, uid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
Constants ¶
View Source
const ( DEFAULT_PROJECT = api.DEFAULT_PROJECT ACCESS_SECRET_TYPE = api.ACCESS_SECRET_TYPE TOTP_TYPE = api.TOTP_TYPE RECOVERY_SECRETS_TYPE = api.RECOVERY_SECRETS_TYPE OIDC_CREDENTIAL_TYPE = api.OIDC_CREDENTIAL_TYPE ENCRYPT_KEY_TYPE = api.ENCRYPT_KEY_TYPE )
Variables ¶
View Source
var ( Endpoints modulebase.ResourceManager EndpointsV3 modulebase.ResourceManager )
View Source
var ( Services modulebase.ResourceManager ServicesV3 modulebase.ResourceManager )
View Source
var ( Users UserManager UsersV3 UserManagerV3 )
View Source
var (
ServiceCertificatesV3 modulebase.ResourceManager
)
View Source
var (
Tenants modulebase.ResourceManager
)
Functions ¶
This section is empty.
Types ¶
type DomainManager ¶
type DomainManager struct {
modulebase.ResourceManager
}
var (
Domains DomainManager
)
type GroupManager ¶
type GroupManager struct {
modulebase.ResourceManager
}
var (
Groups GroupManager
)
func (*GroupManager) GetProjects ¶
func (this *GroupManager) GetProjects(session *mcclient.ClientSession, uid string) (*modulebase.ListResult, error)
func (*GroupManager) GetUsers ¶
func (this *GroupManager) GetUsers(s *mcclient.ClientSession, gid string, query jsonutils.JSONObject) (*modulebase.ListResult, error)
type IdentityProviderManager ¶
type IdentityProviderManager struct {
modulebase.ResourceManager
}
var (
IdentityProviders IdentityProviderManager
)
type ProjectManagerV3 ¶
type ProjectManagerV3 struct {
modulebase.ResourceManager
}
var (
Projects ProjectManagerV3
)
func (*ProjectManagerV3) AddTags ¶
func (this *ProjectManagerV3) AddTags(session *mcclient.ClientSession, id string, tags []string) error
func (*ProjectManagerV3) DoCreateProject ¶
func (this *ProjectManagerV3) DoCreateProject(s *mcclient.ClientSession, p jsonutils.JSONObject) (jsonutils.JSONObject, error)
create project and attach users & roles
func (*ProjectManagerV3) DoJoinProject ¶
func (this *ProjectManagerV3) DoJoinProject(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
Add one user to Many Projects
func (*ProjectManagerV3) DoLeaveProject ¶
func (this *ProjectManagerV3) DoLeaveProject(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*ProjectManagerV3) DoProjectBatchDeleteUserGroup ¶
func (this *ProjectManagerV3) DoProjectBatchDeleteUserGroup(s *mcclient.ClientSession, pid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
Remove Many user[uids] to project(pid) with role(rid)
func (*ProjectManagerV3) DoProjectBatchJoin ¶
func (this *ProjectManagerV3) DoProjectBatchJoin(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
Add Many user[uids] to project(pid) with role(rid)
func (*ProjectManagerV3) FetchId ¶
func (this *ProjectManagerV3) FetchId(s *mcclient.ClientSession, project string, domain string) (string, error)
func (*ProjectManagerV3) JoinProject ¶
func (this *ProjectManagerV3) JoinProject(s *mcclient.ClientSession, rid, pid, uid string) error
type RegionManager ¶
type RegionManager struct {
modulebase.ResourceManager
}
var (
Regions RegionManager
)
type RoleAssignmentManagerV3 ¶
type RoleAssignmentManagerV3 struct {
modulebase.ResourceManager
}
var (
RoleAssignments RoleAssignmentManagerV3
)
func (*RoleAssignmentManagerV3) GetProjectRole ¶
func (this *RoleAssignmentManagerV3) GetProjectRole(s *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
get projects-roles for given resource, like domain, project, user, group, role
func (*RoleAssignmentManagerV3) GetProjectUsers ¶
func (this *RoleAssignmentManagerV3) GetProjectUsers(s *mcclient.ClientSession, id string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
get users for given project
type RolesManager ¶
type RolesManager struct {
modulebase.ResourceManager
}
var ( Roles RolesManager RolesV3 RolesManager )
func (*RolesManager) BatchDelete ¶
func (this *RolesManager) BatchDelete(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject) []modulebase.SubmitResult
func (*RolesManager) BatchDeleteInContexts ¶
func (this *RolesManager) BatchDeleteInContexts(session *mcclient.ClientSession, idlist []string, body jsonutils.JSONObject, ctxs []modulebase.ManagerContext) []modulebase.SubmitResult
func (*RolesManager) Delete ¶
func (this *RolesManager) Delete(session *mcclient.ClientSession, id string, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*RolesManager) DeleteInContexts ¶
func (this *RolesManager) DeleteInContexts(session *mcclient.ClientSession, id string, body jsonutils.JSONObject, ctxs []modulebase.ManagerContext) (jsonutils.JSONObject, error)
type SAccessKeySecret ¶
type SAccessKeySecret struct { KeyId string `json:"-"` ProjectId string `json:"-"` TimeStamp time.Time `json:"-"` api.SAccessKeySecretBlob }
func DecodeAccessKeySecret ¶
func DecodeAccessKeySecret(secret jsonutils.JSONObject) (SAccessKeySecret, error)
type SCredentialManager ¶
type SCredentialManager struct {
modulebase.ResourceManager
}
var (
Credentials SCredentialManager
)
func (*SCredentialManager) CreateAccessKeySecret ¶
func (manager *SCredentialManager) CreateAccessKeySecret(s *mcclient.ClientSession, uid string, pid string, expireAt time.Time) (SAccessKeySecret, error)
func (*SCredentialManager) CreateEncryptKey ¶
func (manager *SCredentialManager) CreateEncryptKey(s *mcclient.ClientSession, uid string, name string, algName string) (SEncryptKeySecret, error)
func (*SCredentialManager) CreateOIDCSecret ¶
func (manager *SCredentialManager) CreateOIDCSecret(s *mcclient.ClientSession, uid string, pid string, redirectUri string) (SOpenIDConnectCredential, error)
func (*SCredentialManager) CreateTotpSecret ¶
func (manager *SCredentialManager) CreateTotpSecret(s *mcclient.ClientSession, uid string) (string, error)
func (*SCredentialManager) DoCreateAccessKeySecret ¶
func (manager *SCredentialManager) DoCreateAccessKeySecret(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCredentialManager) DoCreateEncryptKey ¶
func (manager *SCredentialManager) DoCreateEncryptKey(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCredentialManager) DoCreateOidcSecret ¶
func (manager *SCredentialManager) DoCreateOidcSecret(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SCredentialManager) EncryptKeyDecrypt ¶
func (manager *SCredentialManager) EncryptKeyDecrypt(s *mcclient.ClientSession, keyId string, secret []byte) ([]byte, error)
func (*SCredentialManager) EncryptKeyDecryptBase64 ¶
func (manager *SCredentialManager) EncryptKeyDecryptBase64(s *mcclient.ClientSession, keyId string, secret string) ([]byte, error)
func (*SCredentialManager) EncryptKeyEncrypt ¶
func (manager *SCredentialManager) EncryptKeyEncrypt(s *mcclient.ClientSession, keyId string, secret []byte) ([]byte, error)
func (*SCredentialManager) EncryptKeyEncryptBase64 ¶
func (manager *SCredentialManager) EncryptKeyEncryptBase64(s *mcclient.ClientSession, keyId string, secret []byte) (string, error)
func (*SCredentialManager) FetchAccessKeySecrets ¶
func (manager *SCredentialManager) FetchAccessKeySecrets(s *mcclient.ClientSession, uid string, pid string) ([]jsonutils.JSONObject, error)
func (*SCredentialManager) FetchEncryptionKeys ¶
func (manager *SCredentialManager) FetchEncryptionKeys(s *mcclient.ClientSession, uid string) ([]jsonutils.JSONObject, error)
func (*SCredentialManager) FetchOIDCSecrets ¶
func (manager *SCredentialManager) FetchOIDCSecrets(s *mcclient.ClientSession, uid string, pid string) ([]jsonutils.JSONObject, error)
func (*SCredentialManager) FetchRecoverySecrets ¶
func (manager *SCredentialManager) FetchRecoverySecrets(s *mcclient.ClientSession, uid string) ([]jsonutils.JSONObject, error)
func (*SCredentialManager) FetchTotpSecrets ¶
func (manager *SCredentialManager) FetchTotpSecrets(s *mcclient.ClientSession, uid string) ([]jsonutils.JSONObject, error)
func (*SCredentialManager) GetAccessKeySecrets ¶
func (manager *SCredentialManager) GetAccessKeySecrets(s *mcclient.ClientSession, uid string, pid string) ([]SAccessKeySecret, error)
func (*SCredentialManager) GetEncryptKey ¶
func (manager *SCredentialManager) GetEncryptKey(s *mcclient.ClientSession, kid string) (SEncryptKeySecret, error)
func (*SCredentialManager) GetEncryptKeys ¶
func (manager *SCredentialManager) GetEncryptKeys(s *mcclient.ClientSession, uid string) ([]SEncryptKeySecret, error)
func (*SCredentialManager) GetEncryptKeysRpc ¶
func (manager *SCredentialManager) GetEncryptKeysRpc(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils. JSONObject, error)
func (*SCredentialManager) GetOIDCSecret ¶
func (manager *SCredentialManager) GetOIDCSecret(s *mcclient.ClientSession, uid string, pid string) ([]SOpenIDConnectCredential, error)
func (*SCredentialManager) GetRecoverySecrets ¶
func (manager *SCredentialManager) GetRecoverySecrets(s *mcclient.ClientSession, uid string) ([]SRecoverySecret, error)
func (*SCredentialManager) GetTotpSecret ¶
func (manager *SCredentialManager) GetTotpSecret(s *mcclient.ClientSession, uid string) (string, error)
func (*SCredentialManager) RemoveAccessKeySecrets ¶
func (manager *SCredentialManager) RemoveAccessKeySecrets(s *mcclient.ClientSession, uid string, pid string) error
func (*SCredentialManager) RemoveEncryptKeys ¶
func (manager *SCredentialManager) RemoveEncryptKeys(s *mcclient.ClientSession, uid string) error
func (*SCredentialManager) RemoveOIDCSecrets ¶
func (manager *SCredentialManager) RemoveOIDCSecrets(s *mcclient.ClientSession, uid string, pid string) error
func (*SCredentialManager) RemoveRecoverySecrets ¶
func (manager *SCredentialManager) RemoveRecoverySecrets(s *mcclient.ClientSession, uid string) error
func (*SCredentialManager) RemoveTotpSecrets ¶
func (manager *SCredentialManager) RemoveTotpSecrets(s *mcclient.ClientSession, uid string) error
func (*SCredentialManager) SaveRecoverySecrets ¶
func (manager *SCredentialManager) SaveRecoverySecrets(s *mcclient.ClientSession, uid string, questions []SRecoverySecret) error
type SEncryptKeySecret ¶
type SEncryptKeySecret struct { KeyId string `json:"-"` KeyName string `json:"-"` Alg seclib2.TSymEncAlg `json:"alg"` Key string `json:"key"` TimeStamp time.Time `json:"-"` UserId string `json:"user_id"` User string `json:"user"` Domain string `json:"domain"` DomainId string `json:"domain_id"` }
func DecodeEncryptKey ¶
func DecodeEncryptKey(secret jsonutils.JSONObject) (SEncryptKeySecret, error)
func (SEncryptKeySecret) Decrypt ¶
func (key SEncryptKeySecret) Decrypt(secret []byte) ([]byte, error)
func (SEncryptKeySecret) DecryptBase64 ¶
func (key SEncryptKeySecret) DecryptBase64(secret string) ([]byte, error)
func (SEncryptKeySecret) Encrypt ¶
func (key SEncryptKeySecret) Encrypt(secret []byte) ([]byte, error)
func (SEncryptKeySecret) EncryptBase64 ¶
func (key SEncryptKeySecret) EncryptBase64(secret []byte) (string, error)
func (SEncryptKeySecret) Marshal ¶
func (key SEncryptKeySecret) Marshal() jsonutils.JSONObject
type SIdentityUsageManager ¶
type SIdentityUsageManager struct {
modulebase.ResourceManager
}
var (
IdentityUsages SIdentityUsageManager
)
func (*SIdentityUsageManager) GetUsage ¶
func (this *SIdentityUsageManager) GetUsage(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
type SOpenIDConnectCredential ¶
type SOpenIDConnectCredential struct { ClientId string `json:"client_id"` // Secret string `json:"secret"` RedirectUri string `json:"redirect_uri"` api.SAccessKeySecretBlob }
func DecodeOIDCSecret ¶
func DecodeOIDCSecret(secret jsonutils.JSONObject) (SOpenIDConnectCredential, error)
type SPolicyManager ¶
type SPolicyManager struct {
modulebase.ResourceManager
}
var Policies SPolicyManager
type SRecoverySecret ¶
type SRecoverySecretSet ¶
type SRecoverySecretSet struct { Questions []SRecoverySecret Timestamp int64 }
type SRolePolicyManager ¶
type SRolePolicyManager struct {
modulebase.ResourceManager
}
var RolePolicies SRolePolicyManager
func (*SRolePolicyManager) FetchMatchedPolicies ¶
func (manager *SRolePolicyManager) FetchMatchedPolicies(s *mcclient.ClientSession, roleIds []string, projectId string, loginIp string) (map[string][]string, error)
type STotpSecret ¶
type ScopeResourceManager ¶
type ScopeResourceManager struct {
modulebase.ResourceManager
}
var (
ScopeResource ScopeResourceManager
)
type UserManager ¶
type UserManager struct {
modulebase.ResourceManager
}
func (*UserManager) GetTenantRoleList ¶
func (this *UserManager) GetTenantRoleList(session *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*UserManager) GetTenantRoles ¶
func (this *UserManager) GetTenantRoles(session *mcclient.ClientSession, uid string, tenantId string) (*modulebase.ListResult, error)
type UserManagerV3 ¶
type UserManagerV3 struct {
modulebase.ResourceManager
}
func (*UserManagerV3) DoCreateUser ¶
func (this *UserManagerV3) DoCreateUser(s *mcclient.ClientSession, p jsonutils.JSONObject) (jsonutils.JSONObject, error)
create user && assgin user with project_domain、project、role
func (*UserManagerV3) DoJoinGroups ¶
func (this *UserManagerV3) DoJoinGroups(s *mcclient.ClientSession, uid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*UserManagerV3) FetchId ¶
func (this *UserManagerV3) FetchId(s *mcclient.ClientSession, user string, domain string) (string, error)
func (*UserManagerV3) GetGroups ¶
func (this *UserManagerV3) GetGroups(session *mcclient.ClientSession, uid string) (*modulebase.ListResult, error)
func (*UserManagerV3) GetProjects ¶
func (this *UserManagerV3) GetProjects(session *mcclient.ClientSession, uid string) (*modulebase.ListResult, error)
func (*UserManagerV3) GetProjectsRPC ¶
func (this *UserManagerV3) GetProjectsRPC(s *mcclient.ClientSession, uid string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
Source Files ¶
- doc.go
- mod_credentials.go
- mod_domains.go
- mod_endpoints.go
- mod_groups.go
- mod_identity.go
- mod_identityproviders.go
- mod_policies.go
- mod_projects.go
- mod_regions.go
- mod_roleassignments.go
- mod_rolepolicies.go
- mod_roles.go
- mod_scope_resource.go
- mod_service_certficates.go
- mod_services.go
- mod_tenants.go
- mod_users.go
Click to show internal directories.
Click to hide internal directories.