forked from forgejo/forgejo
Integrate public as bindata optionally (#293)
* Dropped unused codekit config * Integrated dynamic and static bindata for public * Ignore public bindata * Add a general generate make task * Integrated flexible public assets into web command * Updated vendoring, added all missiong govendor deps * Made the linter happy with the bindata and dynamic code * Moved public bindata definition to modules directory * Ignoring the new bindata path now * Updated to the new public modules import path * Updated public bindata command and drop the new prefix
This commit is contained in:
parent
4680c349dd
commit
b6a95a8cb3
691 changed files with 305318 additions and 1272 deletions
36
vendor/github.com/pingcap/go-themis/txn_hook.go
generated
vendored
Normal file
36
vendor/github.com/pingcap/go-themis/txn_hook.go
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
package themis
|
||||
|
||||
// Hooks for debugging and testing
|
||||
type fnHook func(txn *themisTxn, ctx interface{}) (bypass bool, ret interface{}, err error)
|
||||
|
||||
var emptyHookFn = func(txn *themisTxn, ctx interface{}) (bypass bool, ret interface{}, err error) {
|
||||
return true, nil, nil
|
||||
}
|
||||
|
||||
type txnHook struct {
|
||||
afterChoosePrimaryAndSecondary fnHook
|
||||
beforePrewritePrimary fnHook
|
||||
beforePrewriteLockClean fnHook
|
||||
beforePrewriteSecondary fnHook
|
||||
beforeCommitPrimary fnHook
|
||||
beforeCommitSecondary fnHook
|
||||
onSecondaryOccursLock fnHook
|
||||
onPrewriteRow fnHook
|
||||
onTxnSuccess fnHook
|
||||
onTxnFailed fnHook
|
||||
}
|
||||
|
||||
func newHook() *txnHook {
|
||||
return &txnHook{
|
||||
afterChoosePrimaryAndSecondary: emptyHookFn,
|
||||
beforePrewritePrimary: emptyHookFn,
|
||||
beforePrewriteLockClean: emptyHookFn,
|
||||
beforePrewriteSecondary: emptyHookFn,
|
||||
beforeCommitPrimary: emptyHookFn,
|
||||
beforeCommitSecondary: emptyHookFn,
|
||||
onSecondaryOccursLock: emptyHookFn,
|
||||
onPrewriteRow: emptyHookFn,
|
||||
onTxnSuccess: emptyHookFn,
|
||||
onTxnFailed: emptyHookFn,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue