Documentation
¶
Index ¶
- Variables
- type DependenciesService
- type DockerKernelService
- func (s DockerKernelService) BuildImage(options types.BuildImageOptions) (dockertypes.ImageBuildResponse, error)
- func (s DockerKernelService) CreateContainer(options types.CreateContainerOptions) (types.CreateContainerResponse, error)
- func (s DockerKernelService) DeleteContainer(id string) error
- func (s DockerKernelService) InfoContainer(id string) (types.InfoContainerResponse, error)
- func (s DockerKernelService) InfoImage(id string) (types.InfoImageResponse, error)
- func (s DockerKernelService) ListContainers() ([]types.Container, error)
- func (s DockerKernelService) LogsStderrContainer(id string) (io.ReadCloser, error)
- func (s DockerKernelService) LogsStdoutContainer(id string) (io.ReadCloser, error)
- func (s DockerKernelService) PullImage(options types.PullImageOptions) (io.ReadCloser, error)
- func (s DockerKernelService) StartContainer(id string) error
- func (s DockerKernelService) StopContainer(id string) error
- func (s DockerKernelService) WaitContainer(id string, cond types.WaitContainerCondition) error
- type HardwareService
- type InstanceEnvService
- type InstanceLogsService
- type InstanceRunnerService
- func (s *InstanceRunnerService) CheckForUpdates(inst *types.Instance) error
- func (s *InstanceRunnerService) Delete(inst *types.Instance) error
- func (s *InstanceRunnerService) GetAllVersions(inst *types.Instance, useCache bool) ([]string, error)
- func (s *InstanceRunnerService) GetDockerContainerInfo(inst types.Instance) (map[string]any, error)
- func (s *InstanceRunnerService) Install(uuid uuid.UUID, service types.Service) error
- func (s *InstanceRunnerService) RecreateContainer(inst *types.Instance) error
- func (s *InstanceRunnerService) Start(inst *types.Instance) error
- func (s *InstanceRunnerService) Stop(inst *types.Instance) error
- type InstanceService
- func (s *InstanceService) CheckForUpdates() (map[uuid.UUID]*types.Instance, error)
- func (s *InstanceService) Delete(uuid uuid.UUID) error
- func (s *InstanceService) Exists(uuid uuid.UUID) bool
- func (s *InstanceService) Get(uuid uuid.UUID) (*types.Instance, error)
- func (s *InstanceService) GetAll() map[uuid.UUID]*types.Instance
- func (s *InstanceService) Install(service types.Service, method string) (*types.Instance, error)
- func (s *InstanceService) LoadAll()
- func (s *InstanceService) Search(query types.InstanceQuery) map[uuid.UUID]*types.Instance
- func (s *InstanceService) SetDatabases(inst *types.Instance, databases map[string]uuid.UUID) error
- func (s *InstanceService) StartAll()
- func (s *InstanceService) StopAll()
- type InstanceServiceParams
- type InstanceServiceService
- func (s *InstanceServiceService) CheckForUpdate(inst *types.Instance, latest types.Service) error
- func (s *InstanceServiceService) Load(uuid uuid.UUID) (types.Service, error)
- func (s *InstanceServiceService) Save(inst *types.Instance, service types.Service) error
- func (s *InstanceServiceService) Update(inst *types.Instance, service types.Service) error
- type InstanceSettingsService
- func (s *InstanceSettingsService) Load(inst *types.Instance) error
- func (s *InstanceSettingsService) Save(inst *types.Instance, settings types.InstanceSettings) error
- func (s *InstanceSettingsService) SetDatabases(inst *types.Instance, databases map[string]uuid.UUID) error
- func (s *InstanceSettingsService) SetDisplayName(inst *types.Instance, value string) error
- func (s *InstanceSettingsService) SetLaunchOnStartup(inst *types.Instance, value bool) error
- func (s *InstanceSettingsService) SetVersion(inst *types.Instance, value string) error
- type NotificationsService
- type ProxyService
- type ServiceService
- type SettingsService
- func (s *SettingsService) GetChannel() types.SettingsUpdatesChannel
- func (s *SettingsService) GetNotificationsWebhook() *string
- func (s *SettingsService) SetChannel(channel *types.SettingsUpdatesChannel) error
- func (s *SettingsService) SetNotificationsWebhook(webhook *string) error
- func (s *SettingsService) Update(settings types.Settings) error
- type SshKernelService
- type SshService
Constants ¶
This section is empty.
Variables ¶
var ( ErrInstanceAlreadyExists = errors.New("instance already exists") ErrInstanceAlreadyRunning = errors.New("the instance is already running") ErrInstanceNotRunning = errors.New("the instance is not running") ErrInstallMethodDoesNotExists = errors.New("this install method doesn't exist for this service") )
var (
Dependencies = []*types.Dependency{
{
ID: "vertex-webui",
Name: "Vertex Web UI",
Updater: &clientUpdater{},
},
{
ID: "vertex-services",
Name: "Vertex Services",
Updater: newGitHubUpdater("services", "Vertex Services", "vertex-services"),
},
}
)
var (
ErrDependencyNotInstalled = errors.New("dependency is not installed")
)
var (
ErrInvalidPublicKey = errors.New("invalid key")
)
Functions ¶
This section is empty.
Types ¶
type DependenciesService ¶ added in v0.7.0
type DependenciesService struct {
// contains filtered or unexported fields
}
func NewDependenciesService ¶ added in v0.7.0
func NewDependenciesService(currentVertexVersion string) DependenciesService
func (*DependenciesService) CheckForUpdates ¶ added in v0.7.0
func (s *DependenciesService) CheckForUpdates(channel types.SettingsUpdatesChannel) (types.Dependencies, error)
func (*DependenciesService) GetCachedUpdates ¶ added in v0.7.0
func (s *DependenciesService) GetCachedUpdates() types.Dependencies
func (*DependenciesService) InstallUpdates ¶ added in v0.7.0
func (s *DependenciesService) InstallUpdates(dependenciesID []string) error
type DockerKernelService ¶ added in v0.9.0
type DockerKernelService struct {
// contains filtered or unexported fields
}
func NewDockerKernelService ¶ added in v0.9.0
func NewDockerKernelService(dockerAdapter types.DockerAdapterPort) DockerKernelService
func (DockerKernelService) BuildImage ¶ added in v0.9.0
func (s DockerKernelService) BuildImage(options types.BuildImageOptions) (dockertypes.ImageBuildResponse, error)
func (DockerKernelService) CreateContainer ¶ added in v0.9.0
func (s DockerKernelService) CreateContainer(options types.CreateContainerOptions) (types.CreateContainerResponse, error)
func (DockerKernelService) DeleteContainer ¶ added in v0.9.0
func (s DockerKernelService) DeleteContainer(id string) error
func (DockerKernelService) InfoContainer ¶ added in v0.9.0
func (s DockerKernelService) InfoContainer(id string) (types.InfoContainerResponse, error)
func (DockerKernelService) InfoImage ¶ added in v0.9.0
func (s DockerKernelService) InfoImage(id string) (types.InfoImageResponse, error)
func (DockerKernelService) ListContainers ¶ added in v0.9.0
func (s DockerKernelService) ListContainers() ([]types.Container, error)
func (DockerKernelService) LogsStderrContainer ¶ added in v0.9.0
func (s DockerKernelService) LogsStderrContainer(id string) (io.ReadCloser, error)
func (DockerKernelService) LogsStdoutContainer ¶ added in v0.9.0
func (s DockerKernelService) LogsStdoutContainer(id string) (io.ReadCloser, error)
func (DockerKernelService) PullImage ¶ added in v0.9.0
func (s DockerKernelService) PullImage(options types.PullImageOptions) (io.ReadCloser, error)
func (DockerKernelService) StartContainer ¶ added in v0.9.0
func (s DockerKernelService) StartContainer(id string) error
func (DockerKernelService) StopContainer ¶ added in v0.9.0
func (s DockerKernelService) StopContainer(id string) error
func (DockerKernelService) WaitContainer ¶ added in v0.9.0
func (s DockerKernelService) WaitContainer(id string, cond types.WaitContainerCondition) error
type HardwareService ¶ added in v0.7.0
type HardwareService struct{}
func NewHardwareService ¶ added in v0.7.0
func NewHardwareService() HardwareService
func (HardwareService) GetHardware ¶ added in v0.7.0
func (s HardwareService) GetHardware() types.Hardware
type InstanceEnvService ¶ added in v0.10.0
type InstanceEnvService struct {
// contains filtered or unexported fields
}
func NewInstanceEnvService ¶ added in v0.10.0
func NewInstanceEnvService(adapter types.InstanceEnvAdapterPort) InstanceEnvService
func (*InstanceEnvService) Load ¶ added in v0.10.0
func (s *InstanceEnvService) Load(inst *types.Instance) error
func (*InstanceEnvService) Save ¶ added in v0.10.0
func (s *InstanceEnvService) Save(inst *types.Instance, env types.InstanceEnvVariables) error
type InstanceLogsService ¶ added in v0.10.0
type InstanceLogsService struct {
// contains filtered or unexported fields
}
func NewInstanceLogsService ¶ added in v0.10.0
func NewInstanceLogsService(logsAdapter types.InstanceLogsAdapterPort, eventAdapter types.EventAdapterPort) InstanceLogsService
func (*InstanceLogsService) GetLatestLogs ¶ added in v0.10.0
func (*InstanceLogsService) GetUUID ¶ added in v0.10.0
func (s *InstanceLogsService) GetUUID() uuid.UUID
func (*InstanceLogsService) OnEvent ¶ added in v0.10.0
func (s *InstanceLogsService) OnEvent(e interface{})
type InstanceRunnerService ¶ added in v0.10.0
type InstanceRunnerService struct {
// contains filtered or unexported fields
}
func NewInstanceRunnerService ¶ added in v0.10.0
func NewInstanceRunnerService(eventsAdapter types.EventAdapterPort, dockerRunnerAdapter types.RunnerAdapterPort) InstanceRunnerService
func (*InstanceRunnerService) CheckForUpdates ¶ added in v0.10.0
func (s *InstanceRunnerService) CheckForUpdates(inst *types.Instance) error
func (*InstanceRunnerService) Delete ¶ added in v0.10.0
func (s *InstanceRunnerService) Delete(inst *types.Instance) error
func (*InstanceRunnerService) GetAllVersions ¶ added in v0.10.0
func (*InstanceRunnerService) GetDockerContainerInfo ¶ added in v0.10.0
func (*InstanceRunnerService) RecreateContainer ¶ added in v0.10.0
func (s *InstanceRunnerService) RecreateContainer(inst *types.Instance) error
RecreateContainer recreates a container by its UUID.
type InstanceService ¶
type InstanceService struct {
// contains filtered or unexported fields
}
func NewInstanceService ¶
func NewInstanceService(params InstanceServiceParams) InstanceService
func (*InstanceService) CheckForUpdates ¶ added in v0.4.0
func (*InstanceService) Delete ¶
func (s *InstanceService) Delete(uuid uuid.UUID) error
Delete deletes an instance by its UUID. If the instance does not exist, it returns ErrInstanceNotFound. If the instance is still running, it returns ErrInstanceStillRunning.
func (*InstanceService) Exists ¶ added in v0.10.0
func (s *InstanceService) Exists(uuid uuid.UUID) bool
func (*InstanceService) Get ¶
Get returns an instance by its UUID. If the instance does not exist, it returns ErrInstanceNotFound.
func (*InstanceService) LoadAll ¶ added in v0.10.0
func (s *InstanceService) LoadAll()
func (*InstanceService) Search ¶ added in v0.6.0
func (s *InstanceService) Search(query types.InstanceQuery) map[uuid.UUID]*types.Instance
Search returns all instances that match the query.
func (*InstanceService) SetDatabases ¶ added in v0.6.0
func (*InstanceService) StartAll ¶
func (s *InstanceService) StartAll()
func (*InstanceService) StopAll ¶
func (s *InstanceService) StopAll()
type InstanceServiceParams ¶ added in v0.10.0
type InstanceServiceParams struct { InstanceAdapter types.InstanceAdapterPort EventsAdapter types.EventAdapterPort InstanceRunnerService *InstanceRunnerService InstanceServiceService *InstanceServiceService InstanceEnvService *InstanceEnvService InstanceSettingsService *InstanceSettingsService }
type InstanceServiceService ¶ added in v0.10.0
type InstanceServiceService struct {
// contains filtered or unexported fields
}
func NewInstanceServiceService ¶ added in v0.10.0
func NewInstanceServiceService(instanceServiceAdapter types.InstanceServiceAdapterPort) InstanceServiceService
func (*InstanceServiceService) CheckForUpdate ¶ added in v0.10.0
CheckForUpdate checks if the service of an instance has an update. If it has, it sets the instance's ServiceUpdate field.
type InstanceSettingsService ¶ added in v0.10.0
type InstanceSettingsService struct {
// contains filtered or unexported fields
}
func NewInstanceSettingsService ¶ added in v0.10.0
func NewInstanceSettingsService(instanceSettingsAdapter types.InstanceSettingsAdapterPort) InstanceSettingsService
func (*InstanceSettingsService) Load ¶ added in v0.10.0
func (s *InstanceSettingsService) Load(inst *types.Instance) error
func (*InstanceSettingsService) Save ¶ added in v0.10.0
func (s *InstanceSettingsService) Save(inst *types.Instance, settings types.InstanceSettings) error
func (*InstanceSettingsService) SetDatabases ¶ added in v0.10.0
func (*InstanceSettingsService) SetDisplayName ¶ added in v0.10.0
func (s *InstanceSettingsService) SetDisplayName(inst *types.Instance, value string) error
func (*InstanceSettingsService) SetLaunchOnStartup ¶ added in v0.10.0
func (s *InstanceSettingsService) SetLaunchOnStartup(inst *types.Instance, value bool) error
func (*InstanceSettingsService) SetVersion ¶ added in v0.10.0
func (s *InstanceSettingsService) SetVersion(inst *types.Instance, value string) error
type NotificationsService ¶ added in v0.5.3
type NotificationsService struct {
// contains filtered or unexported fields
}
func NewNotificationsService ¶ added in v0.5.3
func NewNotificationsService(settingsAdapter types.SettingsAdapterPort, eventsAdapter types.EventAdapterPort, instanceAdapter types.InstanceAdapterPort) NotificationsService
func (*NotificationsService) StartWebhook ¶ added in v0.5.3
func (s *NotificationsService) StartWebhook() error
func (*NotificationsService) StopWebhook ¶ added in v0.5.3
func (s *NotificationsService) StopWebhook()
type ProxyService ¶ added in v0.5.0
type ProxyService struct {
// contains filtered or unexported fields
}
func NewProxyService ¶ added in v0.5.0
func NewProxyService(proxyAdapter types.ProxyAdapterPort) ProxyService
func (*ProxyService) AddRedirect ¶ added in v0.5.0
func (s *ProxyService) AddRedirect(redirect types.ProxyRedirect) error
func (*ProxyService) GetRedirects ¶ added in v0.5.0
func (s *ProxyService) GetRedirects() types.ProxyRedirects
func (*ProxyService) HandleProxy ¶ added in v0.9.0
func (s *ProxyService) HandleProxy(c *router.Context)
func (*ProxyService) RemoveRedirect ¶ added in v0.5.0
func (s *ProxyService) RemoveRedirect(id uuid.UUID) error
type ServiceService ¶
type ServiceService struct {
// contains filtered or unexported fields
}
func NewServiceService ¶
func NewServiceService(serviceAdapter types.ServiceAdapterPort) ServiceService
func (*ServiceService) GetAll ¶ added in v0.10.0
func (s *ServiceService) GetAll() []types.Service
func (*ServiceService) GetById ¶ added in v0.10.0
func (s *ServiceService) GetById(id string) (types.Service, error)
func (*ServiceService) Reload ¶ added in v0.5.4
func (s *ServiceService) Reload() error
type SettingsService ¶ added in v0.5.3
type SettingsService struct {
// contains filtered or unexported fields
}
func NewSettingsService ¶ added in v0.5.3
func NewSettingsService(settingsAdapter types.SettingsAdapterPort) SettingsService
func (*SettingsService) GetChannel ¶ added in v0.9.3
func (s *SettingsService) GetChannel() types.SettingsUpdatesChannel
func (*SettingsService) GetNotificationsWebhook ¶ added in v0.5.3
func (s *SettingsService) GetNotificationsWebhook() *string
func (*SettingsService) SetChannel ¶ added in v0.9.3
func (s *SettingsService) SetChannel(channel *types.SettingsUpdatesChannel) error
func (*SettingsService) SetNotificationsWebhook ¶ added in v0.5.3
func (s *SettingsService) SetNotificationsWebhook(webhook *string) error
type SshKernelService ¶ added in v0.10.0
type SshKernelService struct {
// contains filtered or unexported fields
}
func NewSshKernelService ¶ added in v0.10.0
func NewSshKernelService(sshAdapter types.SshAdapterPort) SshKernelService
func (*SshKernelService) Add ¶ added in v0.10.0
func (s *SshKernelService) Add(authorizedKey string) error
Add adds an SSH key to the authorized keys file. The key must be a valid SSH public key, otherwise ErrInvalidPublicKey is returned.
func (*SshKernelService) Delete ¶ added in v0.10.0
func (s *SshKernelService) Delete(fingerprint string) error
Delete deletes an SSH key from the authorized keys file.
type SshService ¶ added in v0.10.0
type SshService struct {
// contains filtered or unexported fields
}
func NewSshService ¶ added in v0.10.0
func NewSshService(sshAdapter types.SshAdapterPort) SshService
func (*SshService) Add ¶ added in v0.10.0
func (s *SshService) Add(key string) error
func (*SshService) Delete ¶ added in v0.10.0
func (s *SshService) Delete(fingerprint string) error