tlogin

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppId  = "101827468"
	AppKey = "0d2d856e48e0ebf6b98e0d0c879fe74d"
)

Variables

This section is empty.

Functions

func AddUser

func AddUser(conn *ldap.Conn, userName string, password string) error

必须管理员才能添加

func DeleteUser

func DeleteUser(conn *ldap.Conn, username string) error

func GetAuthCode

func GetAuthCode(w http.ResponseWriter, r *http.Request)

func GetOpenId

func GetOpenId(info *PrivateInfo, w http.ResponseWriter)

func GetToken

func GetToken(w http.ResponseWriter, r *http.Request)

func GetUserInfo

func GetUserInfo(info *PrivateInfo, w http.ResponseWriter)

func ListUser

func ListUser(conn *ldap.Conn) ([]string, error)

func LoginBind

func LoginBind(ldapUser, ldapPassword string) (*ldap.Conn, error)

登录

func StartServer

func StartServer()

Types

type AliOssClient

type AliOssClient struct {
	*oss.Client
}

func NewAliOSSClient

func NewAliOSSClient(bucketName, endpoint, accessKeyID, accessKeySecret string, bucketExpireTime int) (*AliOssClient, error)

NewAliOSSClient : 创建oss client对象

func (*AliOssClient) BuildLifecycleRule

func (client *AliOssClient) BuildLifecycleRule(bucketName string)

BuildLifecycleRule set lifecycle rule for the specified bucket

func (*AliOssClient) DeleteObject

func (client *AliOssClient) DeleteObject(key string)

DeleteObject delete the object, actually use the nil replace the object

func (*AliOssClient) GetBucket

func (client *AliOssClient) GetBucket(bucketNames ...string) *oss.Bucket

GetBucket 获取bucket存储空间

func (*AliOssClient) GetDownloadURL

func (client *AliOssClient) GetDownloadURL(objName string) (string, error)

GetDownloadURL get the down url

func (*AliOssClient) Put

func (client *AliOssClient) Put(key string, reader io.Reader) error

Put put the object to the oss

type PrivateInfo

type PrivateInfo struct {
	AccessToken  string `json:"access_token"`
	ExpiresIn    string `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	OpenId       string `json:"openid"`
}

Jump to

Keyboard shortcuts

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