Interface is the interface of the modules which interact with the deployment targets
| 24 | |
| 25 | // Interface is the interface of the modules which interact with the deployment targets |
| 26 | type 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 |
| 57 | type Module struct { |
no outgoing calls
no test coverage detected