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

Method Scan

coderd/database/types.go:224–235  ·  view source on GitHub ↗
(src any)

Source from the content-addressed store, hash-verified

222type CustomRolePermissions []CustomRolePermission
223
224func (s *APIKeyScopes) Scan(src any) error {
225 var arr []string
226 if err := pq.Array(&arr).Scan(src); err != nil {
227 return err
228 }
229 out := make(APIKeyScopes, len(arr))
230 for i, v := range arr {
231 out[i] = APIKeyScope(v)
232 }
233 *s = out
234 return nil
235}
236
237func (s APIKeyScopes) Value() (driver.Value, error) {
238 arr := make([]string, len(s))

Callers

nothing calls this directly

Calls 2

APIKeyScopeTypeAlias · 0.70
ScanMethod · 0.45

Tested by

no test coverage detected