* 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>
Этот коммит содержится в:
Agniva De Sarker
2020-06-03 14:16:15 +05:30
коммит произвёл GitHub
родитель fc028e703a
Коммит e3255879ba
51 изменённых файлов: 12514 добавлений и 6755 удалений

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.