MCPcopy Create free account
hub / github.com/PaperDebugger/paperdebugger / GetActor

Function GetActor

internal/libs/contextutil/contextutil.go:39–45  ·  view source on GitHub ↗

GetActor returns the actor from the context. It usually represents the user who is interacting with the system.

(ctx context.Context)

Source from the content-addressed store, hash-verified

37
38// GetActor returns the actor from the context. It usually represents the user who is interacting with the system.
39func GetActor(ctx context.Context) (*accesscontrol.Actor, error) {
40 v, ok := Get[*accesscontrol.Actor](ctx, actorKey)
41 if !ok {
42 return nil, shared.ErrInvalidActor()
43 }
44 return v, nil
45}
46
47func SetProjectID(ctx context.Context, projectId string) context.Context {
48 return Set(ctx, projectIdKey, projectId)

Callers 15

ReverseCommentsMethod · 0.92
DeletePromptMethod · 0.92
UpdatePromptMethod · 0.92
CreatePromptMethod · 0.92
GetUserInstructionsMethod · 0.92
GetUserMethod · 0.92
ResetSettingsMethod · 0.92
GetSettingsMethod · 0.92
UpdateSettingsMethod · 0.92
ListPromptsMethod · 0.92

Calls 1

GetFunction · 0.85

Tested by

no test coverage detected