MCPcopy Create free account
hub / github.com/ethereum/node-crawler / validateKey

Function validateKey

pkg/api/api.go:306–324  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

304}
305
306func validateKey(key string) bool {
307 validKeys := map[string]struct{}{
308 "id": {},
309 "name": {},
310 "version_major": {},
311 "version_minor": {},
312 "version_patch": {},
313 "version_tag": {},
314 "version_build": {},
315 "version_date": {},
316 "os_name": {},
317 "os_architecture": {},
318 "language_name": {},
319 "language_version": {},
320 "country": {},
321 }
322 _, ok := validKeys[key]
323 return ok
324}

Callers 1

addFilterArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected