MCPcopy Index your code
hub / github.com/apache/casbin / AddOperation

Method AddOperation

transaction_buffer.go:44–48  ·  view source on GitHub ↗

AddOperation adds a policy operation to the buffer. This operation will be applied when the transaction is committed.

(op persist.PolicyOperation)

Source from the content-addressed store, hash-verified

42// AddOperation adds a policy operation to the buffer.
43// This operation will be applied when the transaction is committed.
44func (tb *TransactionBuffer) AddOperation(op persist.PolicyOperation) {
45 tb.mutex.Lock()
46 defer tb.mutex.Unlock()
47 tb.operations = append(tb.operations, op)
48}
49
50// GetOperations returns all buffered operations.
51// Returns a copy to prevent external modifications.

Callers 7

AddNamedPolicyMethod · 0.80
AddNamedPoliciesMethod · 0.80
RemoveNamedPolicyMethod · 0.80
RemoveNamedPoliciesMethod · 0.80
UpdateNamedPolicyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected