Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// Do sends the HTTP request after signing it with authentication headers.
Do(*http.Request) (*http.Response, error)
}
func NewClient ¶
NewClient creates a new HMAC-authenticated HTTP client.
Parameters:
- endpoint: Base API endpoint (e.g., "https://api.example.com")
- apiKey: API key identifier
- secret: Secret key for HMAC signing
- allowInsecure: If true, disables TLS certificate verification (for testing)
Returns:
- Client: Secure HTTP client that signs all requests
- error: If endpoint is invalid
Click to show internal directories.
Click to hide internal directories.