MCPcopy Index your code
hub / github.com/coder/coder / AsJSON

Method AsJSON

coderd/entitlements/entitlements.go:124–130  ·  view source on GitHub ↗

AsJSON is used to return this to the api without exposing the entitlements for mutation.

()

Source from the content-addressed store, hash-verified

122// AsJSON is used to return this to the api without exposing the entitlements for
123// mutation.
124func (l *Set) AsJSON() json.RawMessage {
125 l.entitlementsMu.RLock()
126 defer l.entitlementsMu.RUnlock()
127
128 b, _ := json.Marshal(l.entitlements)
129 return b
130}
131
132func (l *Set) Modify(do func(entitlements *codersdk.Entitlements)) {
133 l.entitlementsMu.Lock()

Callers 2

serveEntitlementsMethod · 0.80
populateHTMLStateMethod · 0.80

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected