models

package
v0.0.0-...-c82c622 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(username, passwd string) string

func EntrySha1

func EntrySha1(passwd string) string

func EntrySha512

func EntrySha512(passwd string) string

func Mail

func Mail(content, to string) (err error)

Types

type Client

type Client struct {
	Address string
	Conn    *ldap.Conn

	BaseDn string
	// contains filtered or unexported fields
}
var (
	ClientInstance *Client
)

func (*Client) Close

func (client *Client) Close()

func (*Client) Connet

func (client *Client) Connet() error

func (*Client) GetMailAndPasswd

func (client *Client) GetMailAndPasswd(username string) (passwd string, mail string, err error)

func (*Client) ModifyPasswd

func (client *Client) ModifyPasswd(user, oldPasswd, newPasswd string) error

func (*Client) SearchByCN

func (client *Client) SearchByCN(username string) (*ldap.SearchResult, error)

func (*Client) SetPasswd

func (client *Client) SetPasswd(user, newPasswd string) error

func (*Client) VerfiyAuth

func (client *Client) VerfiyAuth(username, passwd string) bool

Jump to

Keyboard shortcuts

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