* 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
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| 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,
 | |
| 	}
 | |
| }
 |