Initial commit.

This commit is contained in:
2026-08-05 12:06:46 +05:00
commit f37a1422e2
21 changed files with 1026 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package configuration
import (
"errors"
"fmt"
)
var errRequestTimeoutTooLow = errors.New("request timeout is too low")
// HTTPClient is an HTTP client configuration.
type HTTPClient struct {
RequestTimeoutSeconds int64 `json:"request_timeout_seconds"`
}
// Validate validates configuration for HTTP clients.
func (h *HTTPClient) Validate() error {
if h.RequestTimeoutSeconds < 1 {
return fmt.Errorf("validate HTTP client configuration: %w", errRequestTimeoutTooLow)
}
return nil
}