diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-03-22 23:12:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 11:12:55 -0400 |
commit | c61b902538e8e4b2bb83136f190e044a6bbcdd9b (patch) | |
tree | bc08142f5ced69721ab14793b8dc62aa83314268 /models/login_source.go | |
parent | dcaa5643d70cd1be72e53e82a30d2bc6e5f8de92 (diff) | |
download | gitea-c61b902538e8e4b2bb83136f190e044a6bbcdd9b.tar.gz gitea-c61b902538e8e4b2bb83136f190e044a6bbcdd9b.zip |
Upgrade xorm to v1.0.0 (#10646)
* Upgrade xorm to v1.0.0
* small nit
* Fix tests
* Update xorm
* Update xorm
* fix go.sum
* fix test
* Fix bug when dump
* Fix bug
* update xorm to latest
* Fix migration test
* update xorm to latest
* Fix import order
* Use xorm tag
Diffstat (limited to 'models/login_source.go')
-rw-r--r-- | models/login_source.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/models/login_source.go b/models/login_source.go index 88028283e8..5350446233 100644 --- a/models/login_source.go +++ b/models/login_source.go @@ -22,8 +22,8 @@ import ( "code.gitea.io/gitea/modules/timeutil" "github.com/unknwon/com" - "xorm.io/core" "xorm.io/xorm" + "xorm.io/xorm/convert" ) // LoginType represents an login type. @@ -60,11 +60,11 @@ var SecurityProtocolNames = map[ldap.SecurityProtocol]string{ // Ensure structs implemented interface. var ( - _ core.Conversion = &LDAPConfig{} - _ core.Conversion = &SMTPConfig{} - _ core.Conversion = &PAMConfig{} - _ core.Conversion = &OAuth2Config{} - _ core.Conversion = &SSPIConfig{} + _ convert.Conversion = &LDAPConfig{} + _ convert.Conversion = &SMTPConfig{} + _ convert.Conversion = &PAMConfig{} + _ convert.Conversion = &OAuth2Config{} + _ convert.Conversion = &SSPIConfig{} ) // LDAPConfig holds configuration for LDAP login source. @@ -165,10 +165,10 @@ func (cfg *SSPIConfig) ToDB() ([]byte, error) { type LoginSource struct { ID int64 `xorm:"pk autoincr"` Type LoginType - Name string `xorm:"UNIQUE"` - IsActived bool `xorm:"INDEX NOT NULL DEFAULT false"` - IsSyncEnabled bool `xorm:"INDEX NOT NULL DEFAULT false"` - Cfg core.Conversion `xorm:"TEXT"` + Name string `xorm:"UNIQUE"` + IsActived bool `xorm:"INDEX NOT NULL DEFAULT false"` + IsSyncEnabled bool `xorm:"INDEX NOT NULL DEFAULT false"` + Cfg convert.Conversion `xorm:"TEXT"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` |