{"modulePath":"github.com/api7/cloud-cli","version":"v0.0.0-20240523012138-b9cffea42484","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cloud\n\nPackage cloud is a generated GoMock package.\n\n## Variables\n\n```go\nvar (\n\t// NewClient is a function to create a new API7 Cloud API Client\n\tNewClient = newClient\n)\n```\n\n## Functions\n\n```go\nfunc InitDefaultClient(cloudAddr, accessToken string, trace bool) (err error)\n```\nInitDefaultClient initializes the default client with the given configuration\n\n## Types\n\n```go\ntype API interface {\n\t// Me returns the current user information\n\tMe() (*cloud.User, error)\n\t// ListClusters returns the list of clusters in organization\n\tListClusters(orgID cloud.ID, limit int, skip int) ([]*cloud.Cluster, error)\n\t// GetTLSBundle gets the tls bundle used to communicate with API7 Cloud. returns the cluster with the given ID\n\tGetTLSBundle(clusterID cloud.ID) (*cloud.TLSBundle, error)\n\t// GetCloudLuaModule returns the Cloud Lua code (in the tar.gz format)\n\tGetCloudLuaModule() ([]byte, error)\n\t// GetStartupConfig gets the startup configuration from API7 Cloud for deploy APISIX by specify config type.\n\tGetStartupConfig(clusterID cloud.ID, configType StartupConfigType) (string, error)\n\t// GetDefaultOrganization returns the default organization for the current user.\n\tGetDefaultOrganization() (*cloud.Organization, error)\n\t// GetDefaultCluster returns the default cluster for the current organization.\n\tGetDefaultCluster() (*cloud.Cluster, error)\n\t// GetClusterDetail returns the detail cluster for the specify cluster.\n\tGetClusterDetail(clusterID cloud.ID) (*cloud.Cluster, error)\n\t// GetSSL returns the detail of the Certificate (SSL) object.\n\tGetSSL(clusterID, sslID cloud.ID) (*cloud.CertificateDetails, error)\n\t// DeleteSSL deletes the specified SSL object.\n\tDeleteSSL(clusterID, sslID cloud.ID) error\n\t// ListSSL lists up to *limits* SSL objects in the specified cluster, and it'll\n\t// skip the first *skip* objects.\n\tListSSL(clusterID cloud.ID, limit int, skip int) ([]*cloud.CertificateDetails, error)\n\t// CreateSSL creates an SSL object according to the given spec.\n\tCreateSSL(clusterID cloud.ID, ssl *cloud.Certificate) (*cloud.CertificateDetails, error)\n\t// UpdateSSL updates the SSL object with the given spec.\n\tUpdateSSL(clusterID cloud.ID, ssl *cloud.Certificate) (*cloud.CertificateDetails, error)\n\t// DebugShowConfig returns the translated Apache APISIX object with the given API7 Cloud resource type and id.\n\tDebugShowConfig(clusterID cloud.ID, resource string, id cloud.ID) (string, error)\n\t// ListServices returns the list of services in application\n\tListServices(clusterID cloud.ID, limit int, skip int) ([]*cloud.Application, error)\n\t// UpdateService return the configuration after the service update\n\tUpdateService(clusterID cloud.ID, svc *cloud.Application) (*cloud.Application, error)\n\t// GetService return the service in line with id in application\n\tGetService(clusterID cloud.ID, appID cloud.ID) (*cloud.Application, error)\n\t// GetConsumer returns the consumer with the given consumer and cluster.\n\tGetConsumer(clusterID, consumerID cloud.ID) (*cloud.Consumer, error)\n\t// GetRoute returns the route with the given app and api.\n\tGetRoute(clusterID, appID cloud.ID, apiID cloud.ID) (*cloud.API, error)\n\t// ListConsumers returns the list of consumers in the given cluster.\n\tListConsumers(clusterID cloud.ID, limit int, skip int) ([]*cloud.Consumer, error)\n\t// DeleteService return the service delete success or fail\n\tDeleteService(clusterID cloud.ID, appID cloud.ID) error\n\t// CreateService return the configuration after the service create\n\tCreateService(clusterID cloud.ID, svc *cloud.Application) (*cloud.Application, error)\n\t// DeleteConsumer deletes the specified consumer.\n\tDeleteConsumer(clusterID, consumerID cloud.ID) error\n\t// CreateConsumer creates the consumer with the given spec.\n\tCreateConsumer(clusterID cloud.ID, consumer *cloud.Consumer) (*cloud.Consumer, error)\n\t// UpdateConsumer updates the consumer with the given spec.\n\tUpdateConsumer(clusterID cloud.ID, consumer *cloud.Consumer) (*cloud.Consumer, error)\n\t// ListAPIs returns the list of APIs in application\n\tListRoutes(clusterID cloud.ID, appID cloud.ID, limit int, skip int) ([]*cloud.API, error)\n\t// DeleteRoute return the route delete success or fail\n\tDeleteRoute(clusterID, appID cloud.ID, apiID cloud.ID) error\n\t// CreateRoute return the configuration after the route create\n\tCreateRoute(clusterID cloud.ID, api *cloud.API) (*cloud.API, error)\n\t// UpdateRoute return the configuration after the route update\n\tUpdateRoute(clusterID cloud.ID, api *cloud.API) (*cloud.API, error)\n}\n```\nAPI warp API7 Cloud REST API\n\n```go\nvar (\n\tDefaultClient API\n)\n```\n\n```go\nfunc Client() API\n```\nClient return default client to access API7 Cloud API\n\n```go\ntype MockAPI struct {\n\t// contains filtered or unexported fields\n}\n```\nMockAPI is a mock of API interface.\n\n```go\nfunc NewMockAPI(ctrl *gomock.Controller) *MockAPI\n```\nNewMockAPI creates a new mock instance.\n\n```go\nfunc (m *MockAPI) CreateConsumer(clusterID cloud_go_sdk.ID, consumer *cloud_go_sdk.Consumer) (*cloud_go_sdk.Consumer, error)\n```\nCreateConsumer mocks base method.\n\n```go\nfunc (m *MockAPI) CreateRoute(clusterID cloud_go_sdk.ID, api *cloud_go_sdk.API) (*cloud_go_sdk.API, error)\n```\nCreateRoute mocks base method.\n\n```go\nfunc (m *MockAPI) CreateSSL(clusterID cloud_go_sdk.ID, ssl *cloud_go_sdk.Certificate) (*cloud_go_sdk.CertificateDetails, error)\n```\nCreateSSL mocks base method.\n\n```go\nfunc (m *MockAPI) CreateService(clusterID cloud_go_sdk.ID, svc *cloud_go_sdk.Application) (*cloud_go_sdk.Application, error)\n```\nCreateService mocks base method.\n\n```go\nfunc (m *MockAPI) DebugShowConfig(clusterID cloud_go_sdk.ID, resource string, id cloud_go_sdk.ID) (string, error)\n```\nDebugShowConfig mocks base method.\n\n```go\nfunc (m *MockAPI) DeleteConsumer(clusterID, consumerID cloud_go_sdk.ID) error\n```\nDeleteConsumer mocks base method.\n\n```go\nfunc (m *MockAPI) DeleteRoute(clusterID, appID, apiID cloud_go_sdk.ID) error\n```\nDeleteRoute mocks base method.\n\n```go\nfunc (m *MockAPI) DeleteSSL(clusterID, sslID cloud_go_sdk.ID) error\n```\nDeleteSSL mocks base method.\n\n```go\nfunc (m *MockAPI) DeleteService(clusterID, appID cloud_go_sdk.ID) error\n```\nDeleteService mocks base method.\n\n```go\nfunc (m *MockAPI) EXPECT() *MockAPIMockRecorder\n```\nEXPECT returns an object that allows the caller to indicate expected use.\n\n```go\nfunc (m *MockAPI) GetCloudLuaModule() ([]byte, error)\n```\nGetCloudLuaModule mocks base method.\n\n```go\nfunc (m *MockAPI) GetClusterDetail(clusterID cloud_go_sdk.ID) (*cloud_go_sdk.Cluster, error)\n```\nGetClusterDetail mocks base method.\n\n```go\nfunc (m *MockAPI) GetConsumer(clusterID, consumerID cloud_go_sdk.ID) (*cloud_go_sdk.Consumer, error)\n```\nGetConsumer mocks base method.\n\n```go\nfunc (m *MockAPI) GetDefaultCluster() (*cloud_go_sdk.Cluster, error)\n```\nGetDefaultCluster mocks base method.\n\n```go\nfunc (m *MockAPI) GetDefaultOrganization() (*cloud_go_sdk.Organization, error)\n```\nGetDefaultOrganization mocks base method.\n\n```go\nfunc (m *MockAPI) GetRoute(clusterID, appID, apiID cloud_go_sdk.ID) (*cloud_go_sdk.API, error)\n```\nGetRoute mocks base method.\n\n```go\nfunc (m *MockAPI) GetSSL(clusterID, sslID cloud_go_sdk.ID) (*cloud_go_sdk.CertificateDetails, error)\n```\nGetSSL mocks base method.\n\n```go\nfunc (m *MockAPI) GetService(clusterID, appID cloud_go_sdk.ID) (*cloud_go_sdk.Application, error)\n```\nGetService mocks base method.\n\n```go\nfunc (m *MockAPI) GetStartupConfig(clusterID cloud_go_sdk.ID, configType StartupConfigType) (string, error)\n```\nGetStartupConfig mocks base method.\n\n```go\nfunc (m *MockAPI) GetTLSBundle(clusterID cloud_go_sdk.ID) (*cloud_go_sdk.TLSBundle, error)\n```\nGetTLSBundle mocks base method.\n\n```go\nfunc (m *MockAPI) ListClusters(orgID cloud_go_sdk.ID, limit, skip int) ([]*cloud_go_sdk.Cluster, error)\n```\nListClusters mocks base method.\n\n```go\nfunc (m *MockAPI) ListConsumers(clusterID cloud_go_sdk.ID, limit, skip int) ([]*cloud_go_sdk.Consumer, error)\n```\nListConsumers mocks base method.\n\n```go\nfunc (m *MockAPI) ListRoutes(clusterID, appID cloud_go_sdk.ID, limit, skip int) ([]*cloud_go_sdk.API, error)\n```\nListRoutes mocks base method.\n\n```go\nfunc (m *MockAPI) ListSSL(clusterID cloud_go_sdk.ID, limit, skip int) ([]*cloud_go_sdk.CertificateDetails, error)\n```\nListSSL mocks base method.\n\n```go\nfunc (m *MockAPI) ListServices(clusterID cloud_go_sdk.ID, limit, skip int) ([]*cloud_go_sdk.Application, error)\n```\nListServices mocks base method.\n\n```go\nfunc (m *MockAPI) Me() (*cloud_go_sdk.User, error)\n```\nMe mocks base method.\n\n```go\nfunc (m *MockAPI) UpdateConsumer(clusterID cloud_go_sdk.ID, consumer *cloud_go_sdk.Consumer) (*cloud_go_sdk.Consumer, error)\n```\nUpdateConsumer mocks base method.\n\n```go\nfunc (m *MockAPI) UpdateRoute(clusterID cloud_go_sdk.ID, api *cloud_go_sdk.API) (*cloud_go_sdk.API, error)\n```\nUpdateRoute mocks base method.\n\n```go\nfunc (m *MockAPI) UpdateSSL(clusterID cloud_go_sdk.ID, ssl *cloud_go_sdk.Certificate) (*cloud_go_sdk.CertificateDetails, error)\n```\nUpdateSSL mocks base method.\n\n```go\nfunc (m *MockAPI) UpdateService(clusterID cloud_go_sdk.ID, svc *cloud_go_sdk.Application) (*cloud_go_sdk.Application, error)\n```\nUpdateService mocks base method.\n\n```go\ntype MockAPIMockRecorder struct {\n\t// contains filtered or unexported fields\n}\n```\nMockAPIMockRecorder is the mock recorder for MockAPI.\n\n```go\nfunc (mr *MockAPIMockRecorder) CreateConsumer(clusterID, consumer interface{}) *gomock.Call\n```\nCreateConsumer indicates an expected call of CreateConsumer.\n\n```go\nfunc (mr *MockAPIMockRecorder) CreateRoute(clusterID, api interface{}) *gomock.Call\n```\nCreateRoute indicates an expected call of CreateRoute.\n\n```go\nfunc (mr *MockAPIMockRecorder) CreateSSL(clusterID, ssl interface{}) *gomock.Call\n```\nCreateSSL indicates an expected call of CreateSSL.\n\n```go\nfunc (mr *MockAPIMockRecorder) CreateService(clusterID, svc interface{}) *gomock.Call\n```\nCreateService indicates an expected call of CreateService.\n\n```go\nfunc (mr *MockAPIMockRecorder) DebugShowConfig(clusterID, resource, id interface{}) *gomock.Call\n```\nDebugShowConfig indicates an expected call of DebugShowConfig.\n\n```go\nfunc (mr *MockAPIMockRecorder) DeleteConsumer(clusterID, consumerID interface{}) *gomock.Call\n```\nDeleteConsumer indicates an expected call of DeleteConsumer.\n\n```go\nfunc (mr *MockAPIMockRecorder) DeleteRoute(clusterID, appID, apiID interface{}) *gomock.Call\n```\nDeleteRoute indicates an expected call of DeleteRoute.\n\n```go\nfunc (mr *MockAPIMockRecorder) DeleteSSL(clusterID, sslID interface{}) *gomock.Call\n```\nDeleteSSL indicates an expected call of DeleteSSL.\n\n```go\nfunc (mr *MockAPIMockRecorder) DeleteService(clusterID, appID interface{}) *gomock.Call\n```\nDeleteService indicates an expected call of DeleteService.\n\n```go\nfunc (mr *MockAPIMockRecorder) GetCloudLuaModule() *gomock.Call\n```\nGetCloudLuaModule indicates an expected call of GetCloudLuaModule.\n\n```go\nfunc (mr *MockAPIMockRecorder) GetClusterDetail(clusterID interface{}) *gomock.Call\n```\nGetClusterDetail indicates an expected call of GetClusterDetail.\n\n```go\nfunc (mr *MockAPIMockRecorder) GetConsumer(clusterID, consumerID interface{}) *gomock.Call\n```\nGetConsumer indicates an expected call of GetConsumer.\n\n```go\nfunc (mr *MockAPIMockRecorder) GetDefaultCluster() *gomock.Call\n```\nGetDefaultCluster indicates an expected call of GetDefaultCluster.\n\n```go\nfunc (mr *MockAPIMockRecorder) GetDefaultOrganization() *gomock.Call\n```\nGetDefaultOrganization indicates an expected call of GetDefaultOrganization.\n\n```go\nfunc (mr *MockAPIMockRecorder) GetRoute(clusterID, appID, apiID interface{}) *gomock.Call\n```\nGetRoute indicates an expected call of GetRoute.\n\n```go\nfunc (mr *MockAPIMockRecorder) GetSSL(clusterID, sslID interface{}) *gomock.Call\n```\nGetSSL indicates an expected call of GetSSL.\n\n```go\nfunc (mr *MockAPIMockRecorder) GetService(clusterID, appID interface{}) *gomock.Call\n```\nGetService indicates an expected call of GetService.\n\n```go\nfunc (mr *MockAPIMockRecorder) GetStartupConfig(clusterID, configType interface{}) *gomock.Call\n```\nGetStartupConfig indicates an expected call of GetStartupConfig.\n\n```go\nfunc (mr *MockAPIMockRecorder) GetTLSBundle(clusterID interface{}) *gomock.Call\n```\nGetTLSBundle indicates an expected call of GetTLSBundle.\n\n```go\nfunc (mr *MockAPIMockRecorder) ListClusters(orgID, limit, skip interface{}) *gomock.Call\n```\nListClusters indicates an expected call of ListClusters.\n\n```go\nfunc (mr *MockAPIMockRecorder) ListConsumers(clusterID, limit, skip interface{}) *gomock.Call\n```\nListConsumers indicates an expected call of ListConsumers.\n\n```go\nfunc (mr *MockAPIMockRecorder) ListRoutes(clusterID, appID, limit, skip interface{}) *gomock.Call\n```\nListRoutes indicates an expected call of ListRoutes.\n\n```go\nfunc (mr *MockAPIMockRecorder) ListSSL(clusterID, limit, skip interface{}) *gomock.Call\n```\nListSSL indicates an expected call of ListSSL.\n\n```go\nfunc (mr *MockAPIMockRecorder) ListServices(clusterID, limit, skip interface{}) *gomock.Call\n```\nListServices indicates an expected call of ListServices.\n\n```go\nfunc (mr *MockAPIMockRecorder) Me() *gomock.Call\n```\nMe indicates an expected call of Me.\n\n```go\nfunc (mr *MockAPIMockRecorder) UpdateConsumer(clusterID, consumer interface{}) *gomock.Call\n```\nUpdateConsumer indicates an expected call of UpdateConsumer.\n\n```go\nfunc (mr *MockAPIMockRecorder) UpdateRoute(clusterID, api interface{}) *gomock.Call\n```\nUpdateRoute indicates an expected call of UpdateRoute.\n\n```go\nfunc (mr *MockAPIMockRecorder) UpdateSSL(clusterID, ssl interface{}) *gomock.Call\n```\nUpdateSSL indicates an expected call of UpdateSSL.\n\n```go\nfunc (mr *MockAPIMockRecorder) UpdateService(clusterID, svc interface{}) *gomock.Call\n```\nUpdateService indicates an expected call of UpdateService.\n\n```go\ntype StartupConfigType string\n```\nStartupConfigType is type of gateway startup config\n\n```go\nconst (\n\tAPISIX StartupConfigType = \"apisix\"\n\tHELM   StartupConfigType = \"helm\"\n)\n```\n\n","path":"github.com/api7/cloud-cli/internal/cloud","name":"cloud","synopsis":"Package cloud is a generated GoMock package.","isRedistributable":true}
