Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
9c0e2223d4
@ -16,6 +16,7 @@ type LdapGroup struct {
|
|||||||
Metadata *[]byte `gorm:"default:'';" json:"metadata"` //
|
Metadata *[]byte `gorm:"default:'';" json:"metadata"` //
|
||||||
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
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"` //
|
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
||||||
|
Type *string `gorm:"default:'';" json:"type"` // 类型:people=个人
|
||||||
}
|
}
|
||||||
type LdapGroupModel struct {
|
type LdapGroupModel struct {
|
||||||
db *gorm.DB
|
db *gorm.DB
|
||||||
|
@ -7,10 +7,11 @@ import (
|
|||||||
|
|
||||||
// ldap_user ldap_用户id递增表
|
// ldap_user ldap_用户id递增表
|
||||||
type LdapUser struct {
|
type LdapUser struct {
|
||||||
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
||||||
UserDn *string `gorm:"index;default:'';" json:"user_dn"` //
|
GroupId *int64 `gorm:"default:0;" json:"group_id"` // 权限组
|
||||||
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
UserDn *string `gorm:"index;default:'';" json:"user_dn"` //
|
||||||
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
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 {
|
type LdapUserModel struct {
|
||||||
db *gorm.DB
|
db *gorm.DB
|
||||||
|
@ -149,7 +149,7 @@ func (l *ResourceBackupLogic) ResourceBackup(req *types.ResourceBackupReq, useri
|
|||||||
|
|
||||||
func regexStr(unquotedStr string, urls *map[string]string) error {
|
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)
|
matches := regex.FindAllString(unquotedStr, -1)
|
||||||
var urlsData = *urls
|
var urlsData = *urls
|
||||||
@ -162,7 +162,7 @@ func regexStr(unquotedStr string, urls *map[string]string) error {
|
|||||||
urlsData[s3url_to_s3id.GetS3ResourceIdFormUrl(matchStr)] = matchStr
|
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)
|
matches02 := regex02.FindAllString(unquotedStr, -1)
|
||||||
// 打印匹配到的字符串
|
// 打印匹配到的字符串
|
||||||
|
Loading…
x
Reference in New Issue
Block a user