Skip to content
Snippets Groups Projects
Commit dbfee26d authored by Murat Kabilov's avatar Murat Kabilov
Browse files

use teams api client interface instead of pointer

parent 4f36e447
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment