refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,24 @@
package common
import (
"git.apinb.com/bsm-sdk/core/crypto/token"
"git.apinb.com/bsm-sdk/core/env"
)
// GenerateTokenAes .
func GenerateTokenAes(id uint, identity, client, role string, extend map[string]string) (string, error) {
token, err := token.New(env.Runtime.JwtSecretKey).GenerateJwt(id, identity, client, role, nil, extend)
if err != nil {
return "", err
}
return token, nil
}
func VerifyMapKeys(m map[string]string, keys []string) bool {
for _, key := range keys {
if _, ok := m[key]; !ok {
return false
}
}
return true
}