MCPcopy
hub / github.com/spacecloud-io/space-cloud / Interface

Interface Interface

runner/utils/driver/driver.go:26–54  ·  view source on GitHub ↗

Interface is the interface of the modules which interact with the deployment targets

Source from the content-addressed store, hash-verified

24
25// Interface is the interface of the modules which interact with the deployment targets
26type Interface interface {
27 CreateProject(ctx context.Context, project *model.Project) error
28 DeleteProject(ctx context.Context, projectID string) error
29 ApplyService(ctx context.Context, service *model.Service) error
30 GetServices(ctx context.Context, projectID string) ([]*model.Service, error)
31 GetServiceStatus(ctx context.Context, projectID string) ([]*model.ServiceStatus, error)
32 DeleteService(ctx context.Context, projectID, serviceID, version string) error
33 ScaleUp(ctx context.Context, projectID, serviceID, version string) error
34 WaitForService(ctx context.Context, service *model.Service) error
35 Type() model.DriverType
36 GetLogs(ctx context.Context, projectID string, info *model.LogRequest) (io.ReadCloser, error)
37
38 // Service routes
39 ApplyServiceRoutes(ctx context.Context, projectID, serviceID string, routes model.Routes) error
40 GetServiceRoutes(ctx context.Context, projectID string) (map[string]model.Routes, error)
41
42 // Service role
43 ApplyServiceRole(ctx context.Context, role *model.Role) error
44 GetServiceRole(ctx context.Context, projectID string) ([]*model.Role, error)
45 DeleteServiceRole(ctx context.Context, projectID, serviceID, id string) error
46
47 // Secret methods!
48 CreateSecret(ctx context.Context, projectID string, secretObj *model.Secret) error
49 ListSecrets(ctx context.Context, projectID string) ([]*model.Secret, error)
50 DeleteSecret(ctx context.Context, projectID, secretName string) error
51 SetKey(ctx context.Context, projectID, secretName, secretKey string, secretObj *model.SecretValue) error
52 DeleteKey(ctx context.Context, projectID, secretName, secretKey string) error
53 SetFileSecretRootPath(ctx context.Context, projectID string, secretName, rootPath string) error
54}
55
56// Module holds config of driver package
57type Module struct {

Callers 51

CreateProjectMethod · 0.65
handleCreateProjectMethod · 0.65
DeleteProjectMethod · 0.65
handleDeleteProjectMethod · 0.65
deleteProjectFunction · 0.65
ApplyServiceMethod · 0.65
handleApplyServiceMethod · 0.65
GetServicesMethod · 0.65
HandleGetServicesMethod · 0.65
getAllProjectsFunction · 0.65
GetSubCommandsFunction · 0.65
TestManager_GetServicesFunction · 0.65

Implementers 2

Modulerunner/utils/driver/driver.go
Istiorunner/utils/driver/istio/istio.go

Calls

no outgoing calls

Tested by

no test coverage detected