ildap

package
v0.5.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	User  = &UserService{}
	Group = &GroupService{}
)

Functions

This section is empty.

Types

type GroupService

type GroupService struct{}

func (GroupService) Add

func (x GroupService) Add(g *model.Group) error

Add 添加资源

func (GroupService) AddUserToGroup

func (x GroupService) AddUserToGroup(dn, udn string) error

AddUserToGroup 添加用户到分组

func (GroupService) Delete

func (x GroupService) Delete(gdn string) error

Delete 删除资源

func (GroupService) ListGroupDN added in v0.5.5

func (x GroupService) ListGroupDN() (groups []*model.Group, err error)

DelUserFromGroup 将用户从分组删除

func (GroupService) RemoveUserFromGroup

func (x GroupService) RemoveUserFromGroup(gdn, udn string) error

DelUserFromGroup 将用户从分组删除

func (GroupService) Update

func (x GroupService) Update(oldGroup, newGroup *model.Group) error

UpdateGroup 更新一个分组

type UserService

type UserService struct{}

func (UserService) Add

func (x UserService) Add(user *model.User) error

创建资源

func (UserService) ChangePwd

func (x UserService) ChangePwd(udn, oldpasswd, newpasswd string) error

ChangePwd 修改用户密码,此处旧密码也可以为空,ldap可以直接通过用户DN加上新密码来进行修改

func (UserService) Delete

func (x UserService) Delete(udn string) error

Delete 删除资源

func (UserService) Exist added in v0.5.10

func (x UserService) Exist(filter map[string]interface{}) (bool, error)

func (UserService) ListUserDN added in v0.5.5

func (x UserService) ListUserDN() (users []*model.User, err error)

func (UserService) NewPwd

func (x UserService) NewPwd(username string) (string, error)

NewPwd 新旧密码都是空,通过管理员可以修改成功并返回新的密码

func (UserService) Update

func (x UserService) Update(oldusername string, user *model.User) error

Update 更新资源

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL