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

Method Scan

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

Source from the content-addressed store, hash-verified

47type Actions []policy.Action
48
49func (a *Actions) Scan(src interface{}) error {
50 switch v := src.(type) {
51 case string:
52 return json.Unmarshal([]byte(v), &a)
53 case []byte:
54 return json.Unmarshal(v, &a)
55 }
56 return xerrors.Errorf("unexpected type %T", src)
57}
58
59func (a *Actions) Value() (driver.Value, error) {
60 return json.Marshal(a)

Callers 15

ConvertWorkspaceRowsFunction · 0.45
TestUsageEventsTriggerFunction · 0.45
ScanMethod · 0.45
ScanMethod · 0.45
GetAIProviderKeyByIDMethod · 0.45
GetAIProviderKeysMethod · 0.45

Calls 2

UnmarshalMethod · 0.45
ErrorfMethod · 0.45