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

Method Scan

coderd/database/types.go:85–96  ·  view source on GitHub ↗
(src interface{})

Source from the content-addressed store, hash-verified

83type ChatACL map[string]ChatACLEntry
84
85func (c *ChatACL) Scan(src interface{}) error {
86 switch v := src.(type) {
87 case string:
88 return json.Unmarshal([]byte(v), &c)
89 case []byte:
90 return json.Unmarshal(v, &c)
91 case json.RawMessage:
92 return json.Unmarshal(v, &c)
93 }
94
95 return xerrors.Errorf("unexpected type %T", src)
96}
97
98//nolint:revive
99func (c ChatACL) RBACACL() map[string][]policy.Action {

Callers 1

chatFromAutoArchiveRowFunction · 0.95

Calls 2

UnmarshalMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected