Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
laodaming 2023-11-22 18:02:13 +08:00
commit 9c0e2223d4
3 changed files with 8 additions and 6 deletions

View File

@ -16,6 +16,7 @@ type LdapGroup struct {
Metadata *[]byte `gorm:"default:'';" json:"metadata"` //
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
Type *string `gorm:"default:'';" json:"type"` // 类型people=个人
}
type LdapGroupModel struct {
db *gorm.DB

View File

@ -7,10 +7,11 @@ import (
// ldap_user ldap_用户id递增表
type LdapUser struct {
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
UserDn *string `gorm:"index;default:'';" json:"user_dn"` //
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
GroupId *int64 `gorm:"default:0;" json:"group_id"` // 权限组
UserDn *string `gorm:"index;default:'';" json:"user_dn"` //
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
}
type LdapUserModel struct {
db *gorm.DB

View File

@ -149,7 +149,7 @@ func (l *ResourceBackupLogic) ResourceBackup(req *types.ResourceBackupReq, useri
func regexStr(unquotedStr string, urls *map[string]string) error {
// 创建一个正则表达式
regex := regexp.MustCompile(`"https:\\/\\/s3\.(.*?)"`)
regex := regexp.MustCompile(`"https:\\/\\/s3|https://s3\.(.*?)"`)
// 查找符合正则表达式的字符串
matches := regex.FindAllString(unquotedStr, -1)
var urlsData = *urls
@ -162,7 +162,7 @@ func regexStr(unquotedStr string, urls *map[string]string) error {
urlsData[s3url_to_s3id.GetS3ResourceIdFormUrl(matchStr)] = matchStr
}
regex02 := regexp.MustCompile(`"https:\\/\\/fusenstorage\.s3\.(.*?)"`)
regex02 := regexp.MustCompile(`"https:\\/\\/fusenstorage\.s3|https://fusenstorage.s3\.(.*?)"`)
// 查找符合正则表达式的字符串
matches02 := regex02.FindAllString(unquotedStr, -1)
// 打印匹配到的字符串