Documentation ¶
Index ¶
- type Config
- type Interface
- type Module
- func (m *Module) ApplyService(ctx context.Context, service *model.Service) error
- func (m *Module) ApplyServiceRole(ctx context.Context, role *model.Role) error
- func (m *Module) ApplyServiceRoutes(ctx context.Context, projectID, serviceID string, routes model.Routes) error
- func (m *Module) CreateProject(ctx context.Context, project *model.Project) error
- func (m *Module) CreateSecret(ctx context.Context, projectID string, secretObj *model.Secret) error
- func (m *Module) DeleteKey(ctx context.Context, projectID, secretName, secretKey string) error
- func (m *Module) DeleteProject(ctx context.Context, projectID string) error
- func (m *Module) DeleteSecret(ctx context.Context, projectID, secretName string) error
- func (m *Module) DeleteService(ctx context.Context, projectID, serviceID, version string) error
- func (m *Module) DeleteServiceRole(ctx context.Context, projectID, serviceID, id string) error
- func (m *Module) GetLogs(ctx context.Context, projectID string, info *model.LogRequest) (io.ReadCloser, error)
- func (m *Module) GetServiceRole(ctx context.Context, projectID string) ([]*model.Role, error)
- func (m *Module) GetServiceRoutes(ctx context.Context, projectID string) (map[string]model.Routes, error)
- func (m *Module) GetServiceStatus(ctx context.Context, projectID string) ([]*model.ServiceStatus, error)
- func (m *Module) GetServices(ctx context.Context, projectID string) ([]*model.Service, error)
- func (m *Module) ListSecrets(ctx context.Context, projectID string) ([]*model.Secret, error)
- func (m *Module) ScaleUp(ctx context.Context, projectID, serviceID, version string) error
- func (m *Module) SetFileSecretRootPath(ctx context.Context, projectID string, secretName, rootPath string) error
- func (m *Module) SetKey(ctx context.Context, projectID, secretName, secretKey string, ...) error
- func (m *Module) Type() model.DriverType
- func (m *Module) WaitForService(ctx context.Context, service *model.Service) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DriverType model.DriverType ConfigFilePath string IsInCluster bool ProxyPort uint32 PrometheusAddr string ClusterName string }
Config describes the configuration required by the driver module
type Interface ¶
type Interface interface { CreateProject(ctx context.Context, project *model.Project) error DeleteProject(ctx context.Context, projectID string) error ApplyService(ctx context.Context, service *model.Service) error GetServices(ctx context.Context, projectID string) ([]*model.Service, error) GetServiceStatus(ctx context.Context, projectID string) ([]*model.ServiceStatus, error) DeleteService(ctx context.Context, projectID, serviceID, version string) error ScaleUp(ctx context.Context, projectID, serviceID, version string) error WaitForService(ctx context.Context, service *model.Service) error Type() model.DriverType GetLogs(ctx context.Context, projectID string, info *model.LogRequest) (io.ReadCloser, error) // Service routes ApplyServiceRoutes(ctx context.Context, projectID, serviceID string, routes model.Routes) error GetServiceRoutes(ctx context.Context, projectID string) (map[string]model.Routes, error) // Service role ApplyServiceRole(ctx context.Context, role *model.Role) error GetServiceRole(ctx context.Context, projectID string) ([]*model.Role, error) DeleteServiceRole(ctx context.Context, projectID, serviceID, id string) error // Secret methods! CreateSecret(ctx context.Context, projectID string, secretObj *model.Secret) error ListSecrets(ctx context.Context, projectID string) ([]*model.Secret, error) DeleteSecret(ctx context.Context, projectID, secretName string) error SetKey(ctx context.Context, projectID, secretName, secretKey string, secretObj *model.SecretValue) error DeleteKey(ctx context.Context, projectID, secretName, secretKey string) error SetFileSecretRootPath(ctx context.Context, projectID string, secretName, rootPath string) error }
Interface is the interface of the modules which interact with the deployment targets
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module holds config of driver package
func (*Module) ApplyService ¶
ApplyService applies service
func (*Module) ApplyServiceRole ¶
ApplyServiceRole applies service role
func (*Module) ApplyServiceRoutes ¶
func (m *Module) ApplyServiceRoutes(ctx context.Context, projectID, serviceID string, routes model.Routes) error
ApplyServiceRoutes applies service routes
func (*Module) CreateProject ¶
CreateProject creates project
func (*Module) CreateSecret ¶
CreateSecret create's secret
func (*Module) DeleteProject ¶
DeleteProject deletes project
func (*Module) DeleteSecret ¶
DeleteSecret delete's secret
func (*Module) DeleteService ¶
DeleteService delete's service
func (*Module) DeleteServiceRole ¶
DeleteServiceRole delete's service role
func (*Module) GetLogs ¶
func (m *Module) GetLogs(ctx context.Context, projectID string, info *model.LogRequest) (io.ReadCloser, error)
GetLogs get logs of specified service
func (*Module) GetServiceRole ¶
GetServiceRole get's service role
func (*Module) GetServiceRoutes ¶
func (m *Module) GetServiceRoutes(ctx context.Context, projectID string) (map[string]model.Routes, error)
GetServiceRoutes get's service routes
func (*Module) GetServiceStatus ¶
func (m *Module) GetServiceStatus(ctx context.Context, projectID string) ([]*model.ServiceStatus, error)
GetServiceStatus gets services status
func (*Module) GetServices ¶
GetServices gets services
func (*Module) ListSecrets ¶
ListSecrets list's secrets
func (*Module) SetFileSecretRootPath ¶
func (m *Module) SetFileSecretRootPath(ctx context.Context, projectID string, secretName, rootPath string) error
SetFileSecretRootPath set's file secret root path