Documentation ¶
Index ¶
- Variables
- type ContainerEnvService
- type ContainerLogsService
- type ContainerRunnerService
- func (s *ContainerRunnerService) CheckForUpdates(inst *types.Container) error
- func (s *ContainerRunnerService) Delete(inst *types.Container) error
- func (s *ContainerRunnerService) GetAllVersions(inst *types.Container, useCache bool) ([]string, error)
- func (s *ContainerRunnerService) GetDockerContainerInfo(inst types.Container) (map[string]any, error)
- func (s *ContainerRunnerService) Install(uuid uuid.UUID, service types.Service) error
- func (s *ContainerRunnerService) RecreateContainer(inst *types.Container) error
- func (s *ContainerRunnerService) Start(inst *types.Container) error
- func (s *ContainerRunnerService) Stop(inst *types.Container) error
- func (s *ContainerRunnerService) WaitCondition(inst *types.Container, cond vtypes.WaitContainerCondition) error
- type ContainerService
- func (s *ContainerService) CheckForUpdates() (map[uuid.UUID]*types.Container, error)
- func (s *ContainerService) Delete(inst *types.Container) error
- func (s *ContainerService) DeleteAll()
- func (s *ContainerService) Exists(uuid uuid.UUID) bool
- func (s *ContainerService) Get(uuid uuid.UUID) (*types.Container, error)
- func (s *ContainerService) GetAll() map[uuid.UUID]*types.Container
- func (s *ContainerService) GetTags() []string
- func (s *ContainerService) GetUUID() uuid.UUID
- func (s *ContainerService) Install(service types.Service, method string) (*types.Container, error)
- func (s *ContainerService) LoadAll()
- func (s *ContainerService) OnEvent(e interface{})
- func (s *ContainerService) Search(query types.ContainerSearchQuery) map[uuid.UUID]*types.Container
- func (s *ContainerService) SetDatabases(inst *types.Container, databases map[string]uuid.UUID) error
- func (s *ContainerService) StartAll()
- func (s *ContainerService) StopAll()
- type ContainerServiceParams
- type ContainerServiceService
- func (s *ContainerServiceService) CheckForUpdate(inst *types.Container, latest types.Service) error
- func (s *ContainerServiceService) Load(uuid uuid.UUID) (types.Service, error)
- func (s *ContainerServiceService) Save(inst *types.Container, service types.Service) error
- func (s *ContainerServiceService) Update(inst *types.Container, service types.Service) error
- type ContainerSettingsService
- func (s *ContainerSettingsService) Load(inst *types.Container) error
- func (s *ContainerSettingsService) Save(inst *types.Container, settings types.ContainerSettings) error
- func (s *ContainerSettingsService) SetDatabases(inst *types.Container, databases map[string]uuid.UUID) error
- func (s *ContainerSettingsService) SetDisplayName(inst *types.Container, value string) error
- func (s *ContainerSettingsService) SetLaunchOnStartup(inst *types.Container, value bool) error
- func (s *ContainerSettingsService) SetTags(inst *types.Container, tags []string) error
- func (s *ContainerSettingsService) SetVersion(inst *types.Container, value string) error
- type ServiceService
Constants ¶
This section is empty.
Variables ¶
var ( ErrContainerAlreadyExists = errors.New("container already exists") ErrContainerAlreadyRunning = errors.New("the container is already running") ErrContainerNotRunning = errors.New("the container is not running") ErrInstallMethodDoesNotExists = errors.New("this install method doesn't exist for this service") )
Functions ¶
This section is empty.
Types ¶
type ContainerEnvService ¶
type ContainerEnvService struct {
// contains filtered or unexported fields
}
func NewContainerEnvService ¶
func NewContainerEnvService(adapter types.ContainerEnvAdapterPort) *ContainerEnvService
func (*ContainerEnvService) Save ¶
func (s *ContainerEnvService) Save(inst *types.Container, env types.ContainerEnvVariables) error
type ContainerLogsService ¶
type ContainerLogsService struct {
// contains filtered or unexported fields
}
func NewContainerLogsService ¶
func NewContainerLogsService(ctx *app.Context, adapter types.ContainerLogsAdapterPort) *ContainerLogsService
func (*ContainerLogsService) GetLatestLogs ¶
func (*ContainerLogsService) GetUUID ¶
func (s *ContainerLogsService) GetUUID() uuid.UUID
func (*ContainerLogsService) OnEvent ¶
func (s *ContainerLogsService) OnEvent(e interface{})
type ContainerRunnerService ¶
type ContainerRunnerService struct {
// contains filtered or unexported fields
}
func NewContainerRunnerService ¶
func NewContainerRunnerService(ctx *app.Context, adapter types.ContainerRunnerAdapterPort) *ContainerRunnerService
func (*ContainerRunnerService) CheckForUpdates ¶
func (s *ContainerRunnerService) CheckForUpdates(inst *types.Container) error
func (*ContainerRunnerService) Delete ¶
func (s *ContainerRunnerService) Delete(inst *types.Container) error
func (*ContainerRunnerService) GetAllVersions ¶
func (*ContainerRunnerService) GetDockerContainerInfo ¶
func (*ContainerRunnerService) RecreateContainer ¶
func (s *ContainerRunnerService) RecreateContainer(inst *types.Container) error
RecreateContainer recreates a container by its UUID.
func (*ContainerRunnerService) Start ¶
func (s *ContainerRunnerService) Start(inst *types.Container) error
Start starts a container by its UUID. If the container does not exist, it returns ErrContainerNotFound. If the container is already running, it returns ErrContainerAlreadyRunning.
func (*ContainerRunnerService) Stop ¶
func (s *ContainerRunnerService) Stop(inst *types.Container) error
Stop stops an container by its UUID. If the container does not exist, it returns ErrContainerNotFound. If the container is not running, it returns ErrContainerNotRunning.
func (*ContainerRunnerService) WaitCondition ¶
func (s *ContainerRunnerService) WaitCondition(inst *types.Container, cond vtypes.WaitContainerCondition) error
type ContainerService ¶
type ContainerService struct {
// contains filtered or unexported fields
}
func NewContainerService ¶
func NewContainerService(params ContainerServiceParams) *ContainerService
func (*ContainerService) CheckForUpdates ¶
func (*ContainerService) Delete ¶
func (s *ContainerService) Delete(inst *types.Container) error
Delete deletes an container by its UUID. If the container is still running, it returns ErrContainerStillRunning.
func (*ContainerService) DeleteAll ¶
func (s *ContainerService) DeleteAll()
func (*ContainerService) Get ¶
Get returns an container by its UUID. If the container does not exist, it returns ErrContainerNotFound.
func (*ContainerService) GetAll ¶
func (s *ContainerService) GetAll() map[uuid.UUID]*types.Container
func (*ContainerService) GetTags ¶
func (s *ContainerService) GetTags() []string
func (*ContainerService) GetUUID ¶
func (s *ContainerService) GetUUID() uuid.UUID
func (*ContainerService) LoadAll ¶
func (s *ContainerService) LoadAll()
func (*ContainerService) OnEvent ¶
func (s *ContainerService) OnEvent(e interface{})
func (*ContainerService) Search ¶
func (s *ContainerService) Search(query types.ContainerSearchQuery) map[uuid.UUID]*types.Container
Search returns all containers that match the query.
func (*ContainerService) SetDatabases ¶
func (*ContainerService) StartAll ¶
func (s *ContainerService) StartAll()
func (*ContainerService) StopAll ¶
func (s *ContainerService) StopAll()
type ContainerServiceParams ¶
type ContainerServiceParams struct { Ctx *app.Context ContainerAdapter types.ContainerAdapterPort ContainerRunnerService *ContainerRunnerService ContainerServiceService *ContainerServiceService ContainerEnvService *ContainerEnvService ContainerSettingsService *ContainerSettingsService }
type ContainerServiceService ¶
type ContainerServiceService struct {
// contains filtered or unexported fields
}
func NewContainerServiceService ¶
func NewContainerServiceService(adapter types.ContainerServiceAdapterPort) *ContainerServiceService
func (*ContainerServiceService) CheckForUpdate ¶
CheckForUpdate checks if the service of an container has an update. If it has, it sets the container's ServiceUpdate field.
type ContainerSettingsService ¶
type ContainerSettingsService struct {
// contains filtered or unexported fields
}
func NewContainerSettingsService ¶
func NewContainerSettingsService(adapter types.ContainerSettingsAdapterPort) *ContainerSettingsService
func (*ContainerSettingsService) Load ¶
func (s *ContainerSettingsService) Load(inst *types.Container) error
func (*ContainerSettingsService) Save ¶
func (s *ContainerSettingsService) Save(inst *types.Container, settings types.ContainerSettings) error
func (*ContainerSettingsService) SetDatabases ¶
func (*ContainerSettingsService) SetDisplayName ¶
func (s *ContainerSettingsService) SetDisplayName(inst *types.Container, value string) error
func (*ContainerSettingsService) SetLaunchOnStartup ¶
func (s *ContainerSettingsService) SetLaunchOnStartup(inst *types.Container, value bool) error
func (*ContainerSettingsService) SetTags ¶
func (s *ContainerSettingsService) SetTags(inst *types.Container, tags []string) error
func (*ContainerSettingsService) SetVersion ¶
func (s *ContainerSettingsService) SetVersion(inst *types.Container, value string) error
type ServiceService ¶
type ServiceService struct {
// contains filtered or unexported fields
}
func NewServiceService ¶
func NewServiceService() *ServiceService
func (*ServiceService) GetAll ¶
func (s *ServiceService) GetAll() []types.Service
func (*ServiceService) GetUUID ¶
func (s *ServiceService) GetUUID() uuid.UUID
func (*ServiceService) OnEvent ¶
func (s *ServiceService) OnEvent(e interface{})
func (*ServiceService) Reload ¶
func (s *ServiceService) Reload() error