MCPcopy Create free account
hub / github.com/netlify/gotrue / getInstance

Function getInstance

api/context.go:105–111  ·  view source on GitHub ↗

getInstance reads the instance id from the context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

103
104// getInstance reads the instance id from the context.
105func getInstance(ctx context.Context) *models.Instance {
106 obj := ctx.Value(instanceKey)
107 if obj == nil {
108 return nil
109 }
110 return obj.(*models.Instance)
111}
112
113// withUser adds the user id to the context.
114func withUser(ctx context.Context, u *models.User) context.Context {

Callers 3

GetInstanceMethod · 0.85
UpdateInstanceMethod · 0.85
DeleteInstanceMethod · 0.85

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…