Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy contains handler func for proxying HTTP requests.
func (Proxy) Redirect ¶
func (p Proxy) Redirect(w http.ResponseWriter, r *http.Request)
Redirect example @Summary Redirect an HTTP request to third-party service @ID redirect @Accept json @Produce json @Success 200 {object} model.RedirectResponse "OK" @Failure 400 {object} status.ErrorResponse "Validation error" @Failure 500 {object} status.ErrorResponse "Internal error" @Router /api/v1/redirect [post] Redirect validates request body of the request, proxies the request and returns a response.
type ProxyService ¶
type ProxyService interface {
Redirect(ctx context.Context, request model.RedirectRequest) (model.RedirectResponse, error)
}
Click to show internal directories.
Click to hide internal directories.