rename Config.APIKey to AdminKey, add search to project storage list
CI / build (push) Successful in 1m2s

This commit is contained in:
edmand46
2026-08-25 13:59:30 +03:00
parent 6e7c818f75
commit cafc2bfc6a
3 changed files with 10 additions and 6 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ import (
const DefaultBaseURL = "https://api.rudder.build"
type Config struct {
APIKey string
AdminKey string
BaseURL string
Timeout time.Duration
HTTPClient *http.Client
@@ -26,8 +26,8 @@ type Client struct {
}
func New(config Config) (*Client, error) {
if config.APIKey == "" {
return nil, &APIError{Code: ErrorCodeInvalidOptions, Message: "APIKey is required"}
if config.AdminKey == "" {
return nil, &APIError{Code: ErrorCodeInvalidOptions, Message: "AdminKey is required"}
}
if config.BaseURL == "" {
@@ -42,7 +42,7 @@ func New(config Config) (*Client, error) {
transport := &transport{
baseURL: config.BaseURL,
apiKey: config.APIKey,
apiKey: config.AdminKey,
httpClient: config.HTTPClient,
}