use teams api client interface instead of pointer
This commit is contained in:
parent
4f36e447c3
commit
dbfee26d47
|
|
@ -39,7 +39,7 @@ type Config struct {
|
|||
KubeClient *kubernetes.Clientset //TODO: move clients to the better place?
|
||||
RestClient *rest.RESTClient
|
||||
RestConfig *rest.Config
|
||||
TeamsAPIClient *teams.API
|
||||
TeamsAPIClient teams.Client
|
||||
OpConfig config.Config
|
||||
InfrastructureRoles map[string]spec.PgUser // inherited from the controller
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ import (
|
|||
type Config struct {
|
||||
RestConfig *rest.Config
|
||||
KubeClient *kubernetes.Clientset
|
||||
RestClient *rest.RESTClient
|
||||
TeamsAPIClient *teams.API
|
||||
RestClient rest.Interface
|
||||
TeamsAPIClient teams.Client
|
||||
InfrastructureRoles map[string]spec.PgUser
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ type team struct {
|
|||
InfrastructureAccounts []infrastructureAccount `json:"infrastructure-accounts"`
|
||||
}
|
||||
|
||||
type Client interface {
|
||||
TeamInfo(string, string) (*team, error)
|
||||
}
|
||||
|
||||
type httpClient interface {
|
||||
Do(req *http.Request) (*http.Response, error)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue