mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
chore: update deps
This commit is contained in:
parent
5b26763a5f
commit
61ff392c5c
39 changed files with 940 additions and 426 deletions
|
@ -170,11 +170,17 @@ func (c *cert) fillFieldMap() {
|
|||
|
||||
func (c cert) clone(db *gorm.DB) cert {
|
||||
c.certDo.ReplaceConnPool(db.Statement.ConnPool)
|
||||
c.DnsCredential.db = db.Session(&gorm.Session{Initialized: true})
|
||||
c.DnsCredential.db.Statement.ConnPool = db.Statement.ConnPool
|
||||
c.ACMEUser.db = db.Session(&gorm.Session{Initialized: true})
|
||||
c.ACMEUser.db.Statement.ConnPool = db.Statement.ConnPool
|
||||
return c
|
||||
}
|
||||
|
||||
func (c cert) replaceDB(db *gorm.DB) cert {
|
||||
c.certDo.ReplaceDB(db)
|
||||
c.DnsCredential.db = db.Session(&gorm.Session{})
|
||||
c.ACMEUser.db = db.Session(&gorm.Session{})
|
||||
return c
|
||||
}
|
||||
|
||||
|
@ -211,6 +217,11 @@ func (a certBelongsToDnsCredential) Model(m *model.Cert) *certBelongsToDnsCreden
|
|||
return &certBelongsToDnsCredentialTx{a.db.Model(m).Association(a.Name())}
|
||||
}
|
||||
|
||||
func (a certBelongsToDnsCredential) Unscoped() *certBelongsToDnsCredential {
|
||||
a.db = a.db.Unscoped()
|
||||
return &a
|
||||
}
|
||||
|
||||
type certBelongsToDnsCredentialTx struct{ tx *gorm.Association }
|
||||
|
||||
func (a certBelongsToDnsCredentialTx) Find() (result *model.DnsCredential, err error) {
|
||||
|
@ -249,6 +260,11 @@ func (a certBelongsToDnsCredentialTx) Count() int64 {
|
|||
return a.tx.Count()
|
||||
}
|
||||
|
||||
func (a certBelongsToDnsCredentialTx) Unscoped() *certBelongsToDnsCredentialTx {
|
||||
a.tx = a.tx.Unscoped()
|
||||
return &a
|
||||
}
|
||||
|
||||
type certBelongsToACMEUser struct {
|
||||
db *gorm.DB
|
||||
|
||||
|
@ -282,6 +298,11 @@ func (a certBelongsToACMEUser) Model(m *model.Cert) *certBelongsToACMEUserTx {
|
|||
return &certBelongsToACMEUserTx{a.db.Model(m).Association(a.Name())}
|
||||
}
|
||||
|
||||
func (a certBelongsToACMEUser) Unscoped() *certBelongsToACMEUser {
|
||||
a.db = a.db.Unscoped()
|
||||
return &a
|
||||
}
|
||||
|
||||
type certBelongsToACMEUserTx struct{ tx *gorm.Association }
|
||||
|
||||
func (a certBelongsToACMEUserTx) Find() (result *model.AcmeUser, err error) {
|
||||
|
@ -320,6 +341,11 @@ func (a certBelongsToACMEUserTx) Count() int64 {
|
|||
return a.tx.Count()
|
||||
}
|
||||
|
||||
func (a certBelongsToACMEUserTx) Unscoped() *certBelongsToACMEUserTx {
|
||||
a.tx = a.tx.Unscoped()
|
||||
return &a
|
||||
}
|
||||
|
||||
type certDo struct{ gen.DO }
|
||||
|
||||
// FirstByID Where("id=@id")
|
||||
|
|
|
@ -114,11 +114,14 @@ func (s *site) fillFieldMap() {
|
|||
|
||||
func (s site) clone(db *gorm.DB) site {
|
||||
s.siteDo.ReplaceConnPool(db.Statement.ConnPool)
|
||||
s.EnvGroup.db = db.Session(&gorm.Session{Initialized: true})
|
||||
s.EnvGroup.db.Statement.ConnPool = db.Statement.ConnPool
|
||||
return s
|
||||
}
|
||||
|
||||
func (s site) replaceDB(db *gorm.DB) site {
|
||||
s.siteDo.ReplaceDB(db)
|
||||
s.EnvGroup.db = db.Session(&gorm.Session{})
|
||||
return s
|
||||
}
|
||||
|
||||
|
@ -155,6 +158,11 @@ func (a siteBelongsToEnvGroup) Model(m *model.Site) *siteBelongsToEnvGroupTx {
|
|||
return &siteBelongsToEnvGroupTx{a.db.Model(m).Association(a.Name())}
|
||||
}
|
||||
|
||||
func (a siteBelongsToEnvGroup) Unscoped() *siteBelongsToEnvGroup {
|
||||
a.db = a.db.Unscoped()
|
||||
return &a
|
||||
}
|
||||
|
||||
type siteBelongsToEnvGroupTx struct{ tx *gorm.Association }
|
||||
|
||||
func (a siteBelongsToEnvGroupTx) Find() (result *model.EnvGroup, err error) {
|
||||
|
@ -193,6 +201,11 @@ func (a siteBelongsToEnvGroupTx) Count() int64 {
|
|||
return a.tx.Count()
|
||||
}
|
||||
|
||||
func (a siteBelongsToEnvGroupTx) Unscoped() *siteBelongsToEnvGroupTx {
|
||||
a.tx = a.tx.Unscoped()
|
||||
return &a
|
||||
}
|
||||
|
||||
type siteDo struct{ gen.DO }
|
||||
|
||||
// FirstByID Where("id=@id")
|
||||
|
|
|
@ -114,11 +114,14 @@ func (s *stream) fillFieldMap() {
|
|||
|
||||
func (s stream) clone(db *gorm.DB) stream {
|
||||
s.streamDo.ReplaceConnPool(db.Statement.ConnPool)
|
||||
s.EnvGroup.db = db.Session(&gorm.Session{Initialized: true})
|
||||
s.EnvGroup.db.Statement.ConnPool = db.Statement.ConnPool
|
||||
return s
|
||||
}
|
||||
|
||||
func (s stream) replaceDB(db *gorm.DB) stream {
|
||||
s.streamDo.ReplaceDB(db)
|
||||
s.EnvGroup.db = db.Session(&gorm.Session{})
|
||||
return s
|
||||
}
|
||||
|
||||
|
@ -155,6 +158,11 @@ func (a streamBelongsToEnvGroup) Model(m *model.Stream) *streamBelongsToEnvGroup
|
|||
return &streamBelongsToEnvGroupTx{a.db.Model(m).Association(a.Name())}
|
||||
}
|
||||
|
||||
func (a streamBelongsToEnvGroup) Unscoped() *streamBelongsToEnvGroup {
|
||||
a.db = a.db.Unscoped()
|
||||
return &a
|
||||
}
|
||||
|
||||
type streamBelongsToEnvGroupTx struct{ tx *gorm.Association }
|
||||
|
||||
func (a streamBelongsToEnvGroupTx) Find() (result *model.EnvGroup, err error) {
|
||||
|
@ -193,6 +201,11 @@ func (a streamBelongsToEnvGroupTx) Count() int64 {
|
|||
return a.tx.Count()
|
||||
}
|
||||
|
||||
func (a streamBelongsToEnvGroupTx) Unscoped() *streamBelongsToEnvGroupTx {
|
||||
a.tx = a.tx.Unscoped()
|
||||
return &a
|
||||
}
|
||||
|
||||
type streamDo struct{ gen.DO }
|
||||
|
||||
// FirstByID Where("id=@id")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue