Documentation ¶
Index ¶
- Constants
- type UserAndAppService
- func (s UserAndAppService) AutoCreateOrganizationalUnit(ctx context.Context, name string) error
- func (s UserAndAppService) AutoMigrate(ctx context.Context) error
- func (s UserAndAppService) CreateApp(ctx context.Context, app *models.App) (err error)
- func (s UserAndAppService) CreateUser(ctx context.Context, user *models.User) (err error)
- func (s UserAndAppService) DeepDeleteEntry(ctx context.Context, dn string) (err error)
- func (s UserAndAppService) DeleteApp(ctx context.Context, id string) (err error)
- func (s UserAndAppService) DeleteApps(ctx context.Context, ids ...string) (total int64, err error)
- func (s UserAndAppService) DeleteUser(ctx context.Context, id string) error
- func (s UserAndAppService) DeleteUsers(ctx context.Context, ids []string) (count int64, err error)
- func (s UserAndAppService) GetAppClass() []string
- func (s UserAndAppService) GetAppInfo(ctx context.Context, o ...opts.WithGetAppOptions) (appDetail *models.App, err error)
- func (s UserAndAppService) GetAppSearchFilter(appName ...string) string
- func (s UserAndAppService) GetApps(ctx context.Context, keywords string, filters map[string]interface{}, ...) (total int64, apps []*models.App, err error)
- func (s UserAndAppService) GetMemberAttr() string
- func (s UserAndAppService) GetUser(ctx context.Context, o *opts.GetUserOptions) (*models.User, error)
- func (s UserAndAppService) GetUserClass() sets.Set[string]
- func (s UserAndAppService) GetUserInfo(ctx context.Context, id string, username string) (*models.User, error)
- func (s UserAndAppService) GetUserInfoById(ctx context.Context, id string, o *opts.GetUserOptions) (*models.User, error)
- func (s UserAndAppService) GetUserInfoByUsernameAndEmail(ctx context.Context, username, email string) (*models.User, error)
- func (s UserAndAppService) GetUsers(ctx context.Context, keywords string, status models.UserMeta_UserStatus, ...) (total int64, users []*models.User, err error)
- func (s UserAndAppService) GetUsersById(ctx context.Context, ids []string) (users models.Users, err error)
- func (s UserAndAppService) Name() string
- func (s UserAndAppService) PatchApp(ctx context.Context, fields map[string]interface{}) (err error)
- func (s UserAndAppService) PatchApps(ctx context.Context, patch []map[string]interface{}) (total int64, err error)
- func (s UserAndAppService) PatchUser(ctx context.Context, user map[string]interface{}) (err error)
- func (s UserAndAppService) PatchUsers(ctx context.Context, patch []map[string]interface{}) (count int64, err error)
- func (s UserAndAppService) ResetPassword(ctx context.Context, id string, password string) error
- func (s UserAndAppService) UpdateApp(ctx context.Context, app *models.App, updateColumns ...string) (err error)
- func (s UserAndAppService) UpdateLoginTime(_ context.Context, _ string) error
- func (s UserAndAppService) UpdateUser(ctx context.Context, user *models.User, updateColumns ...string) (err error)
- func (s UserAndAppService) VerifyPassword(ctx context.Context, username string, password string) *models.User
- func (s UserAndAppService) VerifyPasswordById(ctx context.Context, id, password string) (user *models.User)
Constants ¶
View Source
const ( ClassIdasCore = "idasCore" ClassIdasApp = "idasApp" ClassExtensibleObject = "extensibleObject" )
View Source
const GroupStatusName = "status"
View Source
const UserStatusName = "status"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserAndAppService ¶
func NewUserAndAppService ¶
func (UserAndAppService) AutoCreateOrganizationalUnit ¶
func (s UserAndAppService) AutoCreateOrganizationalUnit(ctx context.Context, name string) error
func (UserAndAppService) AutoMigrate ¶
func (s UserAndAppService) AutoMigrate(ctx context.Context) error
func (UserAndAppService) CreateApp ¶
CreateApp
@Description[en-US]: Create an app. @Description[zh-CN]: 创建应用 @param ctx context.Context @param app *models.App @return error
func (UserAndAppService) CreateUser ¶
CreateUser
@Description[en-US]: Create a user. @Description[zh-CN]: 创建用户。 @param ctx context.Context @param user *models.User @return err error
func (UserAndAppService) DeepDeleteEntry ¶
func (s UserAndAppService) DeepDeleteEntry(ctx context.Context, dn string) (err error)
func (UserAndAppService) DeleteApp ¶
func (s UserAndAppService) DeleteApp(ctx context.Context, id string) (err error)
DeleteApp
@Description[en-US]: Delete an app. @Description[zh-CN]: 删除应用。 @param ctx context.Context @param id string @return err error
func (UserAndAppService) DeleteApps ¶
DeleteApps
@Description[en-US]: Delete apps in batch. @Description[zh-CN]: 批量删除应用。 @param ctx context.Context @param ids []string : ID List @return total int64 : The quantity has been deleted. Since go ldap does not support transactions temporarily, an error may be reported after deleting a part. @return err error
func (UserAndAppService) DeleteUser ¶
func (s UserAndAppService) DeleteUser(ctx context.Context, id string) error
DeleteUser
@Description[en-US]: Delete a user. @Description[zh-CN]: 删除用户。 @param ctx context.Context @param id string @return error
func (UserAndAppService) DeleteUsers ¶
DeleteUsers
@Description[en-US]: Delete users in batch. @Description[zh-CN]: 批量删除用户。 @param ctx context.Context @param ids []string @return count int64 @return err error
func (UserAndAppService) GetAppClass ¶
func (s UserAndAppService) GetAppClass() []string
func (UserAndAppService) GetAppInfo ¶
func (s UserAndAppService) GetAppInfo(ctx context.Context, o ...opts.WithGetAppOptions) (appDetail *models.App, err error)
GetAppInfo
@Description[en-US]: Use the ID or application name to search for application information from the LDAP directory specified by "app_search_base". The directory level of the search is 1. @Description[zh-CN]: 使用ID或应用名称从 app_search_base 指定的LDAP目录内搜索应用信息, 搜索的目录层级为1 @param ctx context.Context @param id string : App ID @param name string : App Name @return app *models.App : App Details @return err error
func (UserAndAppService) GetAppSearchFilter ¶
func (s UserAndAppService) GetAppSearchFilter(appName ...string) string
func (UserAndAppService) GetApps ¶
func (s UserAndAppService) GetApps(ctx context.Context, keywords string, filters map[string]interface{}, current, pageSize int64) (total int64, apps []*models.App, err error)
GetApps
@Description[en-US]: Get the application list. The application information does not include agent, role, user and other information. @Description[zh-CN]: 获取应用列表,应用信息中不包含代理、角色、用户等信息。 @param ctx context.Context @param keywords string @param current int64 @param pageSize int64 @return total int64 @return apps []*models.App @return err error
func (UserAndAppService) GetMemberAttr ¶
func (s UserAndAppService) GetMemberAttr() string
func (UserAndAppService) GetUser ¶
func (s UserAndAppService) GetUser(ctx context.Context, o *opts.GetUserOptions) (*models.User, error)
GetUser
@Description[en-US]: Get user info. @Description[zh-CN]: 获取用户信息 @param ctx context.Context @param options opts.GetUserOptions @return userDetail *models.User @return err error
func (UserAndAppService) GetUserClass ¶
func (s UserAndAppService) GetUserClass() sets.Set[string]
func (UserAndAppService) GetUserInfo ¶
func (s UserAndAppService) GetUserInfo(ctx context.Context, id string, username string) (*models.User, error)
GetUserInfo
@Description[en-US]: Obtain user information through ID or username. @Description[zh-CN]: 通过ID或用户名获取用户信息。 @param ctx context.Context @param id string @param username string @return userDetail *models.User @return err error
func (UserAndAppService) GetUserInfoById ¶
func (s UserAndAppService) GetUserInfoById(ctx context.Context, id string, o *opts.GetUserOptions) (*models.User, error)
GetUserInfoById
@Description[en-US]: Obtain user information through ID. @Description[zh-CN]: 通过ID获取用户信息。 @param ctx context.Context @param id string @return userDetail *models.User @return err error
func (UserAndAppService) GetUserInfoByUsernameAndEmail ¶
func (s UserAndAppService) GetUserInfoByUsernameAndEmail(ctx context.Context, username, email string) (*models.User, error)
GetUserInfoByUsernameAndEmail
@Description[en-US]: Use username or email to obtain user information. @Description[zh-CN]: 使用用户名或email获取用户信息。 @param ctx context.Context @param username string @param email string @return userDetail *models.User @return err error
func (UserAndAppService) GetUsers ¶
func (s UserAndAppService) GetUsers(ctx context.Context, keywords string, status models.UserMeta_UserStatus, appId string, current, pageSize int64) (total int64, users []*models.User, err error)
GetUsers
@Description[en-US]: Get user list. @Description[zh-CN]: 获取用户列表。 @param ctx context.Context @param keywords string @param status models.UserMeta_UserStatus @param appId string @param current int64 @param pageSize int64 @return total int64 @return users []*models.User @return err error
func (UserAndAppService) GetUsersById ¶
func (UserAndAppService) Name ¶
func (s UserAndAppService) Name() string
func (UserAndAppService) PatchApp ¶
func (s UserAndAppService) PatchApp(ctx context.Context, fields map[string]interface{}) (err error)
PatchApp
@Description[en-US]: Incremental update application. @Description[zh-CN]: 增量更新应用。 @param ctx context.Context @param fields map[string]interface{} @return err error
func (UserAndAppService) PatchApps ¶
func (s UserAndAppService) PatchApps(ctx context.Context, patch []map[string]interface{}) (total int64, err error)
PatchApps
@Description[en-US]: Incrementally update information of multiple applications. @Description[zh-CN]: 增量更新多个应用的信息。 @param ctx context.Context @param patch []map[string]interface{} @return total int64 @return err error
func (UserAndAppService) PatchUser ¶
func (s UserAndAppService) PatchUser(ctx context.Context, user map[string]interface{}) (err error)
PatchUser
@Description[en-US]: Incremental update user. @Description[zh-CN]: 增量更新用户。 @param ctx context.Context @param user map[string]interface{} @return err error
func (UserAndAppService) PatchUsers ¶
func (s UserAndAppService) PatchUsers(ctx context.Context, patch []map[string]interface{}) (count int64, err error)
PatchUsers
@Description[en-US]: Incrementally update information of multiple users. @Description[zh-CN]: 增量更新多个用户的信息。 @param ctx context.Context @param patch []map[string]interface{} @return count int64 @return err error
func (UserAndAppService) ResetPassword ¶
ResetPassword
@Description[en-US]: Reset User Password. @Description[zh-CN]: 重置用户密码。 @param ctx context.Context @param id string @param password string : New password. @return err error
func (UserAndAppService) UpdateApp ¶
func (s UserAndAppService) UpdateApp(ctx context.Context, app *models.App, updateColumns ...string) (err error)
UpdateApp
@Description[en-US]: Update applies the value of the specified column. If no column is specified, all column information is updated. @Description[zh-CN]: 更新应用指定列的值,如果未指定列,则表示更新所有列信息。 @param ctx context.Context @param app *models.App @param updateColumns ...string @return err error
func (UserAndAppService) UpdateLoginTime ¶
func (s UserAndAppService) UpdateLoginTime(_ context.Context, _ string) error
UpdateLoginTime [Not Supported]
@Description[en-US]: Update the user's last login time. @Description[zh-CN]: 更新用户最后一次登陆时间。 @param _ @param _ @return error
func (UserAndAppService) UpdateUser ¶
func (s UserAndAppService) UpdateUser(ctx context.Context, user *models.User, updateColumns ...string) (err error)
UpdateUser
@Description[en-US]: Update user information. @Description[zh-CN]: 更新用户信息. @param ctx context.Context @param user *models.User @param updateColumns ...string @return err error
func (UserAndAppService) VerifyPassword ¶
func (s UserAndAppService) VerifyPassword(ctx context.Context, username string, password string) *models.User
VerifyPassword
@Description[en-US]: Verify password for user. @Description[zh-CN]: 验证用户密码。 @param ctx context.Context @param username string @param password string @return users []*models.User
func (UserAndAppService) VerifyPasswordById ¶
func (s UserAndAppService) VerifyPasswordById(ctx context.Context, id, password string) (user *models.User)
VerifyPasswordById
@Description[en-US]: Verify the user's password through ID. @Description[zh-CN]: 通过ID验证用户密码。 @param ctx context.Context @param id string @param password string @return users []*models.User
Click to show internal directories.
Click to hide internal directories.