services

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	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")
)
View Source
var (
	DependencyClient   types.Dependency = &VertexClientDependency{}
	DependencyServices types.Dependency = newVertexGitHubDependency(storage.PathServices, "Vertex Services", "vertex-services")
	DependencyPackages types.Dependency = newVertexGitHubDependency(storage.PathPackages, "Vertex Dependencies", "vertex-dependencies")
)
View Source
var (
	ErrDependencyNotInstalled = errors.New("dependency is not installed")
)
View Source
var (
	ErrPkgManagerNotFound = errors2.New("package manager not found")
)
View Source
var (
	ErrProxyAlreadyRunning = errors.New("a proxy is already running, cannot start a new one")
)

Functions

This section is empty.

Types

type InstallCmd

type InstallCmd struct {
	Cmd  string
	Sudo bool
}

type InstanceService

type InstanceService struct {
	// contains filtered or unexported fields
}

func NewInstanceService

func NewInstanceService(serviceRepo types.ServiceRepository, instanceRepo types.InstanceRepository, dockerRunnerRepo types.RunnerRepository, fsRunnerRepo types.RunnerRepository, instanceLogsRepo types.InstanceLogsRepository, eventRepo types.EventRepository) InstanceService

func (*InstanceService) CheckForUpdates added in v0.4.0

func (s *InstanceService) CheckForUpdates() (map[uuid.UUID]*types.Instance, error)

func (*InstanceService) CloneRepository added in v0.3.0

func (s *InstanceService) CloneRepository(dir string, url string) error

func (*InstanceService) Delete

func (s *InstanceService) Delete(uuid uuid.UUID) error

func (*InstanceService) DownloadRelease added in v0.3.0

func (s *InstanceService) DownloadRelease(dir string, repo string) error

func (*InstanceService) Get

func (s *InstanceService) Get(uuid uuid.UUID) (*types.Instance, error)

func (*InstanceService) GetAll

func (s *InstanceService) GetAll() map[uuid.UUID]*types.Instance

func (*InstanceService) GetDockerContainerInfo added in v0.1.1

func (s *InstanceService) GetDockerContainerInfo(uuid uuid.UUID) (map[string]any, error)

func (*InstanceService) GetLatestLogs added in v0.1.1

func (s *InstanceService) GetLatestLogs(uuid uuid.UUID) ([]types.LogLine, error)

func (*InstanceService) GetUUID added in v0.1.1

func (s *InstanceService) GetUUID() uuid.UUID

func (*InstanceService) Install

func (s *InstanceService) Install(serviceID string, method string) (*types.Instance, error)

func (*InstanceService) OnEvent added in v0.1.1

func (s *InstanceService) OnEvent(e interface{})

func (*InstanceService) PreInstallForDocker added in v0.3.0

func (s *InstanceService) PreInstallForDocker(service types.Service, dir string) error

func (*InstanceService) PreInstallForRelease added in v0.3.0

func (s *InstanceService) PreInstallForRelease(service types.Service, dir string) error

func (*InstanceService) PreInstallForScript added in v0.3.0

func (s *InstanceService) PreInstallForScript(service types.Service, dir string) error

func (*InstanceService) RecreateContainer added in v0.4.3

func (s *InstanceService) RecreateContainer(instance *types.Instance) error

func (*InstanceService) SetDisplayName added in v0.3.2

func (s *InstanceService) SetDisplayName(uuid uuid.UUID, value string) error

func (*InstanceService) SetLaunchOnStartup

func (s *InstanceService) SetLaunchOnStartup(uuid uuid.UUID, value bool) error

func (*InstanceService) Start

func (s *InstanceService) Start(uuid uuid.UUID) error

func (*InstanceService) StartAll

func (s *InstanceService) StartAll()

func (*InstanceService) Stop

func (s *InstanceService) Stop(uuid uuid.UUID) error

func (*InstanceService) StopAll

func (s *InstanceService) StopAll()
func (s *InstanceService) Symlink(path string, repo string) error

func (*InstanceService) WriteEnv

func (s *InstanceService) WriteEnv(uuid uuid.UUID, environment map[string]string) error

type PackageService

type PackageService struct {
	// contains filtered or unexported fields
}

func NewPackageService

func NewPackageService(packageRepo types.PackageRepository) PackageService

func (*PackageService) Get

func (s *PackageService) Get(id string) (types.Package, error)

func (*PackageService) Install

func (s *PackageService) Install(c InstallCmd) error

func (*PackageService) InstallationCommand

func (s *PackageService) InstallationCommand(p *types.Package, pm string) (InstallCmd, error)

type ProxyService added in v0.5.0

type ProxyService struct {
	// contains filtered or unexported fields
}

func NewProxyService added in v0.5.0

func NewProxyService(proxyRepo types.ProxyRepository) 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) RemoveRedirect added in v0.5.0

func (s *ProxyService) RemoveRedirect(id uuid.UUID) error

func (*ProxyService) Start added in v0.5.0

func (s *ProxyService) Start() error

func (*ProxyService) Stop added in v0.5.0

func (s *ProxyService) Stop() error

type ServiceService

type ServiceService struct {
	// contains filtered or unexported fields
}

func NewServiceService

func NewServiceService(serviceRepo types.ServiceRepository) ServiceService

func (*ServiceService) ListAvailable

func (s *ServiceService) ListAvailable() []types.Service

type UpdateDependenciesService

type UpdateDependenciesService struct {
	// contains filtered or unexported fields
}

func NewUpdateDependenciesService

func NewUpdateDependenciesService(currentVertexVersion string) UpdateDependenciesService

func (*UpdateDependenciesService) CheckForUpdates

func (s *UpdateDependenciesService) CheckForUpdates() (types.Updates, error)

func (*UpdateDependenciesService) GetCachedUpdates

func (s *UpdateDependenciesService) GetCachedUpdates() types.Updates

func (*UpdateDependenciesService) InstallUpdates

func (s *UpdateDependenciesService) InstallUpdates(dependenciesID []string) error

type VertexClientDependency

type VertexClientDependency struct {
	// contains filtered or unexported fields
}

func (*VertexClientDependency) CheckForUpdate

func (d *VertexClientDependency) CheckForUpdate() (*types.Update, error)

func (*VertexClientDependency) FetchCurrentVersion

func (d *VertexClientDependency) FetchCurrentVersion()

func (*VertexClientDependency) GetID

func (d *VertexClientDependency) GetID() string

func (*VertexClientDependency) InstallUpdate

func (d *VertexClientDependency) InstallUpdate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL