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

Function NewModel

model/model.go:132–136  ·  view source on GitHub ↗

NewModel creates an empty model.

()

Source from the content-addressed store, hash-verified

130
131// NewModel creates an empty model.
132func NewModel() Model {
133 m := make(Model)
134
135 return m
136}
137
138// NewModelFromFile creates a model from a .CONF file.
139func NewModelFromFile(path string) (Model, error) {

Callers 15

TestRBACModelInMemoryFunction · 0.92
TestInitEmptyFunction · 0.92
Test_KeyMatchRbacFunction · 0.92
Test_StringRbacFunction · 0.92
NewModelFromFileFunction · 0.85
NewModelFromStringFunction · 0.85
CopyMethod · 0.85

Calls

no outgoing calls

Tested by 14

TestRBACModelInMemoryFunction · 0.74
TestInitEmptyFunction · 0.74
Test_KeyMatchRbacFunction · 0.74
Test_StringRbacFunction · 0.74
TestNewModelFunction · 0.68
TestLoadModelFromConfigFunction · 0.68
TestHasSectionFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…