Documentation
¶
Index ¶
- type CapAdapter
- type ContainerAdapter
- type ContainerHandler
- type ContainerService
- type DockerAdapter
- type DockerKernelHandler
- type DockerService
- type EnvAdapter
- type EnvHandler
- type EnvService
- type LogsAdapter
- type MetricsService
- type MockContainerService
- func (m *MockContainerService) AddContainerTag(ctx context.Context, id uuid.UUID, tagID uuid.UUID) error
- func (m *MockContainerService) CheckForUpdates(ctx context.Context) (types.Containers, error)
- func (m *MockContainerService) CreateContainer(ctx context.Context, opts types.CreateContainerOptions) (*types.Container, error)
- func (m *MockContainerService) CreateEnv(ctx context.Context, env types.EnvVariable) error
- func (m *MockContainerService) Delete(ctx context.Context, uuid uuid.UUID) error
- func (m *MockContainerService) DeleteAll(ctx context.Context) error
- func (m *MockContainerService) DeleteEnv(ctx context.Context, id uuid.UUID) error
- func (m *MockContainerService) Get(ctx context.Context, id uuid.UUID) (*types.Container, error)
- func (m *MockContainerService) GetAllVersions(ctx context.Context, id uuid.UUID, useCache bool) ([]string, error)
- func (m *MockContainerService) GetContainerInfo(ctx context.Context, id uuid.UUID) (map[string]any, error)
- func (m *MockContainerService) GetContainers(ctx context.Context) (types.Containers, error)
- func (m *MockContainerService) GetContainersWithFilters(ctx context.Context, filters types.ContainerFilters) (types.Containers, error)
- func (m *MockContainerService) GetEnvs(ctx context.Context, id uuid.UUID) ([]types.EnvVariable, error)
- func (m *MockContainerService) GetLatestLogs(id uuid.UUID) ([]types.LogLine, error)
- func (m *MockContainerService) GetPorts(ctx context.Context, id uuid.UUID) (types.Ports, error)
- func (m *MockContainerService) GetTemplateByID(ctx context.Context, id string) (*types.Template, error)
- func (m *MockContainerService) GetTemplates(ctx context.Context) []types.Template
- func (m *MockContainerService) LoadAll(ctx context.Context) error
- func (m *MockContainerService) PatchEnv(ctx context.Context, env types.EnvVariable) error
- func (m *MockContainerService) RecreateContainer(ctx context.Context, uuid uuid.UUID) error
- func (m *MockContainerService) ReloadContainer(ctx context.Context, id uuid.UUID) error
- func (m *MockContainerService) SetDatabases(ctx context.Context, inst *types.Container, databases map[string]uuid.UUID, ...) error
- func (m *MockContainerService) Start(ctx context.Context, uuid uuid.UUID) error
- func (m *MockContainerService) StartAll(ctx context.Context) error
- func (m *MockContainerService) Stop(ctx context.Context, uuid uuid.UUID) error
- func (m *MockContainerService) StopAll(ctx context.Context) error
- func (m *MockContainerService) UpdateContainer(ctx context.Context, uuid uuid.UUID, c types.Container) error
- func (m *MockContainerService) WaitStatus(ctx context.Context, id uuid.UUID, status string) error
- type MockTagsService
- func (m *MockTagsService) CreateTag(ctx context.Context, tag types.Tag) (types.Tag, error)
- func (m *MockTagsService) DeleteTag(ctx context.Context, id uuid.UUID) error
- func (m *MockTagsService) GetTag(ctx context.Context, userID uuid.UUID, name string) (types.Tag, error)
- func (m *MockTagsService) GetTags(ctx context.Context, userID uuid.UUID) (types.Tags, error)
- type PortAdapter
- type PortsHandler
- type PortsService
- type RunnerAdapter
- type SysctlAdapter
- type TagAdapter
- type TagsHandler
- type TagsService
- type TemplateAdapter
- type TemplateHandler
- type VolumeAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapAdapter ¶
type ContainerAdapter ¶
type ContainerAdapter interface { GetContainer(ctx context.Context, id uuid.UUID) (*types.Container, error) GetContainers(ctx context.Context) (types.Containers, error) GetContainersWithFilters(ctx context.Context, filters types.ContainerFilters) (types.Containers, error) CreateContainer(ctx context.Context, container types.Container) error UpdateContainer(ctx context.Context, container types.Container) error DeleteContainer(ctx context.Context, id uuid.UUID) error GetContainerTags(ctx context.Context, id uuid.UUID) (types.Tags, error) AddTag(ctx context.Context, id uuid.UUID, tagID uuid.UUID) error DeleteTags(ctx context.Context, id uuid.UUID) error SetStatus(ctx context.Context, id uuid.UUID, status string) error }
type ContainerHandler ¶
type ContainerHandler interface { Get() gin.HandlerFunc GetContainers() gin.HandlerFunc CreateContainer() gin.HandlerFunc Delete() gin.HandlerFunc Patch() gin.HandlerFunc Start() gin.HandlerFunc Stop() gin.HandlerFunc AddContainerTag() gin.HandlerFunc GetDocker() gin.HandlerFunc RecreateDocker() gin.HandlerFunc ReloadContainer() gin.HandlerFunc GetLogs() gin.HandlerFunc GetVersions() gin.HandlerFunc WaitStatus() gin.HandlerFunc CheckForUpdates() gin.HandlerFunc ContainerEvents() gin.HandlerFunc ContainersEvents() gin.HandlerFunc }
type ContainerService ¶
type ContainerService interface { Get(ctx context.Context, id uuid.UUID) (*types.Container, error) GetContainers(ctx context.Context) (types.Containers, error) GetContainersWithFilters(ctx context.Context, filters types.ContainerFilters) (types.Containers, error) CreateContainer(ctx context.Context, opts types.CreateContainerOptions) (*types.Container, error) Delete(ctx context.Context, id uuid.UUID) error UpdateContainer(ctx context.Context, id uuid.UUID, c types.Container) error Start(ctx context.Context, id uuid.UUID) error StartAll(ctx context.Context) error Stop(ctx context.Context, id uuid.UUID) error StopAll(ctx context.Context) error AddContainerTag(ctx context.Context, id uuid.UUID, tagID uuid.UUID) error RecreateContainer(ctx context.Context, id uuid.UUID) error DeleteAll(ctx context.Context) error CheckForUpdates(ctx context.Context) (types.Containers, error) SetDatabases(ctx context.Context, c *types.Container, databases map[string]uuid.UUID, options map[string]*types.SetDatabasesOptions) error GetAllVersions(ctx context.Context, id uuid.UUID, useCache bool) ([]string, error) GetContainerInfo(ctx context.Context, id uuid.UUID) (map[string]any, error) WaitStatus(ctx context.Context, id uuid.UUID, status string) error GetLatestLogs(id uuid.UUID) ([]types.LogLine, error) GetTemplateByID(ctx context.Context, id string) (*types.Template, error) GetTemplates(ctx context.Context) []types.Template ReloadContainer(ctx context.Context, id uuid.UUID) error }
type DockerAdapter ¶
type DockerAdapter interface { ListContainers() ([]types.DockerContainer, error) DeleteContainer(id string) error CreateContainer(options types.CreateDockerContainerOptions) (types.CreateContainerResponse, error) StartContainer(id string) error StopContainer(id string) error InfoContainer(id string) (types.InfoContainerResponse, error) LogsStdoutContainer(id string) (io.ReadCloser, error) LogsStderrContainer(id string) (io.ReadCloser, error) WaitContainer(id string, cond types.WaitContainerCondition) error InfoImage(id string) (types.InfoImageResponse, error) PullImage(options types.PullImageOptions) (io.ReadCloser, error) BuildImage(options types.BuildImageOptions) (dockertypes.ImageBuildResponse, error) CreateVolume(options types.CreateVolumeOptions) (volume.Volume, error) DeleteVolume(name string) error }
type DockerKernelHandler ¶
type DockerKernelHandler interface { GetContainers() gin.HandlerFunc CreateContainer() gin.HandlerFunc DeleteContainer() gin.HandlerFunc StartContainer() gin.HandlerFunc StopContainer() gin.HandlerFunc InfoContainer() gin.HandlerFunc LogsStdoutContainer() gin.HandlerFunc LogsStderrContainer() gin.HandlerFunc WaitContainer() gin.HandlerFunc DeleteMounts() gin.HandlerFunc InfoImage() gin.HandlerFunc PullImage() gin.HandlerFunc BuildImage() gin.HandlerFunc CreateVolume() gin.HandlerFunc DeleteVolume() gin.HandlerFunc }
type DockerService ¶
type DockerService interface { ListContainers() ([]types.DockerContainer, error) DeleteContainer(id string) error CreateContainer(options types.CreateDockerContainerOptions) (types.CreateContainerResponse, error) StartContainer(id string) error StopContainer(id string) error InfoContainer(id string) (types.InfoContainerResponse, error) LogsStdoutContainer(id string) (io.ReadCloser, error) LogsStderrContainer(id string) (io.ReadCloser, error) WaitContainer(id string, cond types.WaitContainerCondition) error DeleteMounts(uuid string) error InfoImage(id string) (types.InfoImageResponse, error) PullImage(options types.PullImageOptions) (io.ReadCloser, error) BuildImage(options types.BuildImageOptions) (vtypes.ImageBuildResponse, error) CreateVolume(name string) (volume.Volume, error) DeleteVolume(name string) error }
type EnvAdapter ¶
type EnvAdapter interface { GetEnvs(ctx context.Context, filters types.EnvVariableFilters) ([]types.EnvVariable, error) CreateEnv(ctx context.Context, variable types.EnvVariable) error DeleteEnv(ctx context.Context, id uuid.UUID) error DeleteEnvs(ctx context.Context, id uuid.UUID) error UpdateEnvByID(ctx context.Context, variable types.EnvVariable) error UpdateEnvByName(ctx context.Context, variable types.EnvVariable) error }
type EnvHandler ¶
type EnvHandler interface { GetEnv() gin.HandlerFunc PatchEnv() gin.HandlerFunc DeleteEnv() gin.HandlerFunc CreateEnv() gin.HandlerFunc }
type EnvService ¶
type LogsAdapter ¶
type LogsAdapter interface { Register(id uuid.UUID) error Unregister(id uuid.UUID) error UnregisterAll() error Push(id uuid.UUID, line types.LogLine) Pop(id uuid.UUID) (types.LogLine, error) LoadBuffer(id uuid.UUID) ([]types.LogLine, error) // LoadBuffer loads the latest logs kept in memory. Exists(id uuid.UUID) bool }
type MetricsService ¶
type MetricsService interface { metric.RegistryProvider }
type MockContainerService ¶
func (*MockContainerService) AddContainerTag ¶
func (*MockContainerService) CheckForUpdates ¶
func (m *MockContainerService) CheckForUpdates(ctx context.Context) (types.Containers, error)
func (*MockContainerService) CreateContainer ¶
func (m *MockContainerService) CreateContainer(ctx context.Context, opts types.CreateContainerOptions) (*types.Container, error)
func (*MockContainerService) CreateEnv ¶
func (m *MockContainerService) CreateEnv(ctx context.Context, env types.EnvVariable) error
func (*MockContainerService) DeleteAll ¶
func (m *MockContainerService) DeleteAll(ctx context.Context) error
func (*MockContainerService) GetAllVersions ¶
func (*MockContainerService) GetContainerInfo ¶
func (*MockContainerService) GetContainers ¶
func (m *MockContainerService) GetContainers(ctx context.Context) (types.Containers, error)
func (*MockContainerService) GetContainersWithFilters ¶
func (m *MockContainerService) GetContainersWithFilters(ctx context.Context, filters types.ContainerFilters) (types.Containers, error)
func (*MockContainerService) GetEnvs ¶
func (m *MockContainerService) GetEnvs(ctx context.Context, id uuid.UUID) ([]types.EnvVariable, error)
func (*MockContainerService) GetLatestLogs ¶
func (*MockContainerService) GetTemplateByID ¶
func (*MockContainerService) GetTemplates ¶
func (m *MockContainerService) GetTemplates(ctx context.Context) []types.Template
func (*MockContainerService) LoadAll ¶
func (m *MockContainerService) LoadAll(ctx context.Context) error
func (*MockContainerService) PatchEnv ¶
func (m *MockContainerService) PatchEnv(ctx context.Context, env types.EnvVariable) error
func (*MockContainerService) RecreateContainer ¶
func (*MockContainerService) ReloadContainer ¶
func (*MockContainerService) SetDatabases ¶
func (*MockContainerService) StartAll ¶
func (m *MockContainerService) StartAll(ctx context.Context) error
func (*MockContainerService) StopAll ¶
func (m *MockContainerService) StopAll(ctx context.Context) error
func (*MockContainerService) UpdateContainer ¶
func (*MockContainerService) WaitStatus ¶
type MockTagsService ¶
type PortAdapter ¶
type PortAdapter interface { GetPorts(ctx context.Context, filters types.PortFilters) (types.Ports, error) CreatePort(ctx context.Context, port types.Port) error DeletePort(ctx context.Context, id uuid.UUID) error DeletePorts(ctx context.Context, id uuid.UUID) error UpdatePortByID(ctx context.Context, port types.Port) error }
type PortsHandler ¶
type PortsHandler interface { GetPorts() gin.HandlerFunc PatchPort() gin.HandlerFunc DeletePort() gin.HandlerFunc CreatePort() gin.HandlerFunc }
type PortsService ¶
type RunnerAdapter ¶
type RunnerAdapter interface { GetDockerContainers(ctx context.Context) ([]types.DockerContainer, error) DeleteContainer(ctx context.Context, c *types.Container, volumes []string) error DeleteMounts(ctx context.Context, c *types.Container) error Start(ctx context.Context, c *types.Container, ports types.Ports, volumes types.Volumes, env []types.EnvVariable, caps types.Capabilities, sysctls types.Sysctls, setStatus func(status string)) (stdout io.ReadCloser, stderr io.ReadCloser, err error) Stop(ctx context.Context, c *types.Container) error Info(ctx context.Context, c types.Container) (map[string]any, error) WaitCondition(ctx context.Context, c *types.Container, cond types.WaitContainerCondition) error CheckForUpdates(ctx context.Context, c *types.Container) error HasUpdateAvailable(ctx context.Context, c types.Container) (bool, error) GetAllVersions(ctx context.Context, c types.Container) ([]string, error) }
type SysctlAdapter ¶
type TagAdapter ¶
type TagsHandler ¶
type TagsHandler interface { GetTag() gin.HandlerFunc GetTags() gin.HandlerFunc CreateTag() gin.HandlerFunc DeleteTag() gin.HandlerFunc }
type TagsService ¶
type TemplateAdapter ¶
type TemplateHandler ¶
type TemplateHandler interface { GetTemplate() gin.HandlerFunc GetTemplates() gin.HandlerFunc }
Click to show internal directories.
Click to hide internal directories.