MCPcopy Create free account
hub / github.com/entireio/git-sync / Validate

Method Validate

client.go:190–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

188}
189
190func (r ProbeRequest) Validate() error {
191 if r.Source.URL == "" {
192 return errors.New("source URL is required")
193 }
194 if r.Target != nil && r.Target.URL == "" {
195 return errors.New("target URL is required when target endpoint is provided")
196 }
197 if _, err := validation.NormalizeProtocolMode(string(r.Protocol)); err != nil {
198 return fmt.Errorf("normalize protocol: %w", err)
199 }
200 return nil
201}
202
203func bridgeEndpoint(ep Endpoint) internalbridge.Endpoint {
204 return internalbridge.Endpoint{

Callers

nothing calls this directly

Calls 1

NormalizeProtocolModeFunction · 0.92

Tested by

no test coverage detected