MCPcopy
hub / github.com/apache/casbin / GetModelSnapshot

Method GetModelSnapshot

transaction_buffer.go:72–76  ·  view source on GitHub ↗

GetModelSnapshot returns the model snapshot taken at transaction start. This represents the original state before any transaction operations.

()

Source from the content-addressed store, hash-verified

70// GetModelSnapshot returns the model snapshot taken at transaction start.
71// This represents the original state before any transaction operations.
72func (tb *TransactionBuffer) GetModelSnapshot() model.Model {
73 tb.mutex.RLock()
74 defer tb.mutex.RUnlock()
75 return tb.modelSnapshot.Copy()
76}
77
78// ApplyOperationsToModel applies all buffered operations to a model and returns the result.
79// This simulates what the model would look like after all operations are applied.

Callers 10

CommitMethod · 0.80
AddNamedPolicyMethod · 0.80
AddNamedPoliciesMethod · 0.80
RemoveNamedPolicyMethod · 0.80
RemoveNamedPoliciesMethod · 0.80
UpdateNamedPolicyMethod · 0.80
GetBufferedModelMethod · 0.80

Calls 1

CopyMethod · 0.80

Tested by

no test coverage detected