MCPcopy Create free account
hub / github.com/compozy/agh / ValidatePeerID

Function ValidatePeerID

internal/network/validate.go:136–141  ·  view source on GitHub ↗

ValidatePeerID reports whether the peer identifier matches the RFC grammar.

(peerID string)

Source from the content-addressed store, hash-verified

134
135// ValidatePeerID reports whether the peer identifier matches the RFC grammar.
136func ValidatePeerID(peerID string) error {
137 if !peerIDPattern.MatchString(peerID) {
138 return fmt.Errorf("%w: peer_id=%q", ErrInvalidField, peerID)
139 }
140 return nil
141}
142
143// ValidateConversationID reports whether a container identifier matches its field grammar.
144func ValidateConversationID(id string, field string) error {

Callers 9

networkDirectResolveMethod · 0.92
ValidateMethod · 0.85
ValidateMethod · 0.85
NormalizeDirectRoomPeersFunction · 0.85
RouteTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected