(ctx context.Context, endpoint Endpoint, role EndpointRole)
| 133 | } |
| 134 | |
| 135 | func (c *Client) authFor(ctx context.Context, endpoint Endpoint, role EndpointRole) (EndpointAuth, error) { |
| 136 | if c.auth == nil { |
| 137 | return EndpointAuth{}, nil |
| 138 | } |
| 139 | auth, err := c.auth.AuthFor(ctx, endpoint, role) |
| 140 | if err != nil { |
| 141 | return EndpointAuth{}, fmt.Errorf("resolve auth for %s: %w", role, err) |
| 142 | } |
| 143 | return auth, nil |
| 144 | } |
| 145 | |
| 146 | func (r SyncRequest) Validate() error { |
| 147 | if r.Source.URL == "" { |
no test coverage detected