MCPcopy Create free account
hub / github.com/Permify/permify / invoke

Method invoke

internal/engines/check.go:101–105  ·  view source on GitHub ↗

run is a helper function that takes a context and a PermissionCheckRequest, and returns a CheckFunction. The returned CheckFunction, when called with a context, executes the Run method of the CheckEngine with the given request, and returns the resulting PermissionCheckResponse and error.

(request *base.PermissionCheckRequest)

Source from the content-addressed store, hash-verified

99// a context, executes the Run method of the CheckEngine with the given
100// request, and returns the resulting PermissionCheckResponse and error.
101func (engine *CheckEngine) invoke(request *base.PermissionCheckRequest) CheckFunction {
102 return func(ctx context.Context) (*base.PermissionCheckResponse, error) {
103 return engine.invoker.Check(ctx, request)
104 }
105}
106
107// check constructs a CheckFunction that performs permission checks based on the type of reference in the entity definition.
108func (engine *CheckEngine) check(

Callers 4

checkDirectRelationMethod · 0.95
checkComputedUserSetMethod · 0.95
checkCallMethod · 0.95

Calls 1

CheckMethod · 0.65

Tested by

no test coverage detected