MCPcopy Create free account
hub / github.com/PostHog/duckgres / IsReservedName

Function IsReservedName

server/usersecrets/classify.go:62–73  ·  view source on GitHub ↗

IsReservedName reports whether a secret name is reserved for system use.

(name string)

Source from the content-addressed store, hash-verified

60
61// IsReservedName reports whether a secret name is reserved for system use.
62func IsReservedName(name string) bool {
63 name = strings.ToLower(name)
64 if _, ok := reservedNames[name]; ok {
65 return true
66 }
67 for _, p := range reservedPrefixes {
68 if strings.HasPrefix(name, p) {
69 return true
70 }
71 }
72 return false
73}
74
75// Classify inspects a SQL statement and reports whether it is DuckDB secret
76// DDL. It is deliberately conservative: anything it cannot confidently parse

Callers 3

execUserSecretDDLMethod · 0.92
wipeUserSecretsFunction · 0.92
TestIsReservedNameFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsReservedNameFunction · 0.68