rename Config.APIKey to AdminKey, add search to project storage list
CI / build (push) Successful in 1m2s
CI / build (push) Successful in 1m2s
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user