()
| 188 | } |
| 189 | |
| 190 | func (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 | |
| 203 | func bridgeEndpoint(ep Endpoint) internalbridge.Endpoint { |
| 204 | return internalbridge.Endpoint{ |
nothing calls this directly
no test coverage detected