feat: provider v0.1.9 — namespace removed from resources, moved to provider block
This commit is contained in:
@@ -23,14 +23,16 @@ type Client struct {
|
||||
httpClient *http.Client
|
||||
endpoint string
|
||||
token string
|
||||
Namespace string // берётся из provider {}, пользователь не касается
|
||||
}
|
||||
|
||||
// New создаёт клиент. endpoint — базовый URL оператора (без trailing slash).
|
||||
func New(endpoint, token string) *Client {
|
||||
func New(endpoint, token, namespace string) *Client {
|
||||
return &Client{
|
||||
httpClient: &http.Client{Timeout: 30 * time.Second},
|
||||
endpoint: endpoint,
|
||||
token: token,
|
||||
Namespace: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user