Enable gossip encryption (#14640)
* Enable gossip encryption * Fix order * Auto-generate key * Update gorp fork to include BeginTx * Add a test for InsertIfExists And point gorp to a custom branch for now Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fc028e703a
Коммит
e3255879ba
13
vendor/github.com/mattermost/gorp/db.go
сгенерированный
поставляемый
13
vendor/github.com/mattermost/gorp/db.go
сгенерированный
поставляемый
@@ -666,6 +666,19 @@ func (m *DbMap) Begin() (*Transaction, error) {
|
||||
return &Transaction{m, tx, false}, nil
|
||||
}
|
||||
|
||||
// Begin starts a gorp Transaction with a given context and opts.
|
||||
func (m *DbMap) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Transaction, error) {
|
||||
if m.logger != nil {
|
||||
now := time.Now()
|
||||
defer m.trace(now, "begin;")
|
||||
}
|
||||
tx, err := m.Db.BeginTx(ctx, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &Transaction{m, tx, false}, nil
|
||||
}
|
||||
|
||||
// TableFor returns the *TableMap corresponding to the given Go Type
|
||||
// If no table is mapped to that type an error is returned.
|
||||
// If checkPK is true and the mapped table has no registered PKs, an error is returned.
|
||||
|
||||
Ссылка в новой задаче
Block a user