MCPcopy Create free account
hub / github.com/docker/secrets-engine / valid

Function valid

x/secrets/identifiers.go:114–122  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

112}
113
114func valid(id string) error {
115 if !validIdentifier(id) {
116 return ErrInvalidID{
117 ID: id,
118 }
119 }
120
121 return nil
122}
123
124// ID contains a secret identifier.
125// Valid secret identifiers must match the format ^[A-Za-z0-9._:-]+(?:/[A-Za-z0-9._:-]+)*$.

Callers 2

ParseIDFunction · 0.70
MustParseIDFunction · 0.70

Calls 1

validIdentifierFunction · 0.85

Tested by

no test coverage detected