-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathapi.go
More file actions
39 lines (34 loc) · 1.5 KB
/
api.go
File metadata and controls
39 lines (34 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package api
import (
"net/http"
"net/url"
"github.com/redhat-developer/app-services-cli/pkg/api/generic"
"github.com/redhat-developer/app-services-cli/pkg/api/rbac"
"github.com/redhat-developer/app-services-cli/pkg/core/logging"
connectormgmtclient "github.com/redhat-developer/app-services-sdk-go/connectormgmt/apiv1/client"
amsclient "github.com/redhat-developer/app-services-sdk-go/accountmgmt/apiv1/client"
kafkainstanceclient "github.com/redhat-developer/app-services-sdk-go/kafkainstance/apiv1/client"
kafkamgmtclient "github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client"
registryinstanceclient "github.com/redhat-developer/app-services-sdk-go/registryinstance/apiv1internal/client"
registrymgmtclient "github.com/redhat-developer/app-services-sdk-go/registrymgmt/apiv1/client"
)
type API interface {
KafkaMgmt() kafkamgmtclient.DefaultApi
ServiceRegistryMgmt() registrymgmtclient.RegistriesApi
ConnectorsMgmt() connectormgmtclient.APIClient
ServiceAccountMgmt() kafkamgmtclient.SecurityApi
KafkaAdmin(instanceID string) (*kafkainstanceclient.APIClient, *kafkamgmtclient.KafkaRequest, error)
ServiceRegistryInstance(instanceID string) (*registryinstanceclient.APIClient, *registrymgmtclient.Registry, error)
AccountMgmt() amsclient.AppServicesApi
RBAC() rbac.RbacAPI
GenericAPI() generic.GenericAPI
GetConfig() Config
}
type Config struct {
AccessToken string
ApiURL *url.URL
ConsoleURL *url.URL
UserAgent string
HTTPClient *http.Client
Logger logging.Logger
}