README中添加其他优秀项目友链 (#58)
Co-authored-by: eryajf <eryajf@users.noreply.github.com>
This commit is contained in:
parent
00b3ec3600
commit
38a70bc263
|
@ -37,6 +37,7 @@
|
|||
- [⚡ 加群](#-%E5%8A%A0%E7%BE%A4)
|
||||
- [🤑 捐赠](#-%E6%8D%90%E8%B5%A0)
|
||||
- [📝 使用登记](#-%E4%BD%BF%E7%94%A8%E7%99%BB%E8%AE%B0)
|
||||
- [💎 优秀软件推荐](#-%E4%BC%98%E7%A7%80%E8%BD%AF%E4%BB%B6%E6%8E%A8%E8%8D%90)
|
||||
- [🤝 贡献者](#-%E8%B4%A1%E7%8C%AE%E8%80%85)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
@ -136,6 +137,10 @@
|
|||
|
||||
如果你所在公司使用了该项目,烦请在这里留下脚印,感谢支持🥳 [点我](https://github.com/eryajf/go-ldap-admin/issues/18)
|
||||
|
||||
## 💎 优秀软件推荐
|
||||
|
||||
- [🦄ConsulManager:高效易用的Consul Web运维平台](https://github.com/starsliao/ConsulManager)
|
||||
|
||||
## 🤝 贡献者
|
||||
|
||||
<!-- readme: collaborators,contributors -start -->
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package controller
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"regexp"
|
||||
|
||||
"github.com/eryajf/go-ldap-admin/config"
|
||||
"github.com/eryajf/go-ldap-admin/public/tools"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
@ -73,37 +71,4 @@ func Demo(c *gin.Context) {
|
|||
}
|
||||
|
||||
func CodeDebug() {
|
||||
// pass := "SI8HqZxBLGDTU5ZsL8fQyyFLKYSF3bI1KIMZ9yBqo6xWFQDk0HH7AvZUFqbiWNSPNWWNjS9TNsgS1ubTg5Lh7bV+AeSuW3cEuLN9wJI/9tg50eS94O3NETWf3RoZ2jBrd/huwcDRrNk5+cqLffUXI5Da68i1QEiQ3X1w/DW6VH4="
|
||||
// fmt.Printf("秘钥为:%s\n", config.Conf.System.RSAPrivateBytes)
|
||||
// // 密码通过RSA解密
|
||||
// decodeData, err := tools.RSADecrypt([]byte(pass), config.Conf.System.RSAPrivateBytes)
|
||||
// if err != nil {
|
||||
// fmt.Printf("密码解密失败:%s\n", err)
|
||||
// }
|
||||
// fmt.Printf("密码解密后为:%s\n", string(decodeData))
|
||||
// users, err := isql.User.GetUserByIds([]uint{1, 2, 3})
|
||||
// if err != nil {
|
||||
// fmt.Printf("获取用户失败:%s\n", err)
|
||||
// }
|
||||
// for _, user := range users {
|
||||
// fmt.Println("===============", user.Username)
|
||||
// }
|
||||
|
||||
// user, _ := isql.User.GetUserById(1)
|
||||
// fmt.Println(user)
|
||||
// user1 := new(model.User)
|
||||
// _ = isql.User.Find(tools.H{"id": 1}, user1)
|
||||
// fmt.Println(user1)
|
||||
|
||||
// user2, _ := isql.User.GetCurrentUser(c)
|
||||
// fmt.Println("========", user2)
|
||||
data := []byte("hello world")
|
||||
m, _ := tools.RSAEncrypt(data, config.Conf.System.RSAPublicBytes)
|
||||
fmt.Println(base64.StdEncoding.EncodeToString(m))
|
||||
s, _ := tools.RSADecrypt(m, config.Conf.System.RSAPrivateBytes)
|
||||
fmt.Println(string(s))
|
||||
new := tools.NewGenPasswd("hello world")
|
||||
fmt.Println("==========", new)
|
||||
s1 := tools.NewParPasswd(new)
|
||||
fmt.Println(string(s1))
|
||||
}
|
||||
|
|
|
@ -76,8 +76,8 @@ services:
|
|||
WAIT_HOSTS: mysql:3306, openldap:389
|
||||
ports:
|
||||
- 8888:8888
|
||||
volumes:
|
||||
- ./config/config.yml:/app/config.yml
|
||||
# volumes: # 可按需打开此配置,将配置文件挂载到本地,如果挂载,需要注意修改本地配置中MySQL与ldap的连接信息
|
||||
# - ./config/config.yml:/app/config.yml
|
||||
depends_on:
|
||||
- mysql
|
||||
- openldap
|
||||
|
|
Loading…
Reference in New Issue