package http_client import ( "das/application/ports" "github.com/go-resty/resty/v2" "time" ) type Client struct { client *resty.Client } func New() *Client { return &Client{ client: resty.New(), } } func Destroy(client *Client) { if client == nil { return } client.client = nil } func (client *Client) NewRequest(opts ...ports.NewRequestOption) ports.HttpRequest { for _, opt := range opts { opt(client) } return &Request{request: client.client.R()} } func (client *Client) SetTimeout(timeout time.Duration) { client.client.SetTimeout(timeout) }