mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 19:02:52 +02:00
use teams api client interface instead of pointer
This commit is contained in:
@@ -39,7 +39,7 @@ type Config struct {
|
|||||||
KubeClient *kubernetes.Clientset //TODO: move clients to the better place?
|
KubeClient *kubernetes.Clientset //TODO: move clients to the better place?
|
||||||
RestClient *rest.RESTClient
|
RestClient *rest.RESTClient
|
||||||
RestConfig *rest.Config
|
RestConfig *rest.Config
|
||||||
TeamsAPIClient *teams.API
|
TeamsAPIClient teams.Client
|
||||||
OpConfig config.Config
|
OpConfig config.Config
|
||||||
InfrastructureRoles map[string]spec.PgUser // inherited from the controller
|
InfrastructureRoles map[string]spec.PgUser // inherited from the controller
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import (
|
|||||||
type Config struct {
|
type Config struct {
|
||||||
RestConfig *rest.Config
|
RestConfig *rest.Config
|
||||||
KubeClient *kubernetes.Clientset
|
KubeClient *kubernetes.Clientset
|
||||||
RestClient *rest.RESTClient
|
RestClient rest.Interface
|
||||||
TeamsAPIClient *teams.API
|
TeamsAPIClient teams.Client
|
||||||
InfrastructureRoles map[string]spec.PgUser
|
InfrastructureRoles map[string]spec.PgUser
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ type team struct {
|
|||||||
InfrastructureAccounts []infrastructureAccount `json:"infrastructure-accounts"`
|
InfrastructureAccounts []infrastructureAccount `json:"infrastructure-accounts"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Client interface {
|
||||||
|
TeamInfo(string, string) (*team, error)
|
||||||
|
}
|
||||||
|
|
||||||
type httpClient interface {
|
type httpClient interface {
|
||||||
Do(req *http.Request) (*http.Response, error)
|
Do(req *http.Request) (*http.Response, error)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user