Documentation ¶
Index ¶
- func ContainersHandler(c *gofr.Context) (interface{}, error)
- func ImagesHandler(c *gofr.Context) (interface{}, error)
- type Adapter
- type DockerAdapter
- func (d *DockerAdapter) RemoveContainer(c *gofr.Context, containerId string) error
- func (d *DockerAdapter) RemoveImage(c *gofr.Context, imageId string) (interface{}, error)
- func (d *DockerAdapter) RunContainer(c *gofr.Context, imageName string, name string) (string, error)
- func (d *DockerAdapter) ShowContainerLogs(c *gofr.Context, containerId string) (interface{}, error)
- func (d *DockerAdapter) ShowContainerStatus(c *gofr.Context, containerId string) (interface{}, error)
- func (d *DockerAdapter) StartContainer(c *gofr.Context, containerId string) (bool, error)
- func (d *DockerAdapter) StopContainer(c *gofr.Context, containerId string) (bool, error)
- type PodmanAdapter
- func (p *PodmanAdapter) RemoveContainer(c *gofr.Context, containerId string) error
- func (p *PodmanAdapter) RemoveImage(c *gofr.Context, imageId string) (interface{}, error)
- func (p *PodmanAdapter) RunContainer(c *gofr.Context, imageName string, name string) (string, error)
- func (p *PodmanAdapter) ShowContainerLogs(c *gofr.Context, containerId string) (interface{}, error)
- func (p *PodmanAdapter) ShowContainerStatus(c *gofr.Context, containerId string) (interface{}, error)
- func (p *PodmanAdapter) StartContainer(c *gofr.Context, containerId string) (bool, error)
- func (p *PodmanAdapter) StopContainer(c *gofr.Context, containerId string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainersHandler ¶
func ImagesHandler ¶
Types ¶
type Adapter ¶
type Adapter interface { RemoveImage(c *gofr.Context, imageId string) (interface{}, error) RunContainer(c *gofr.Context, imageName string, name string) (string, error) StopContainer(c *gofr.Context, containerId string) (bool, error) RemoveContainer(c *gofr.Context, containerId string) error ShowContainerLogs(c *gofr.Context, containerId string) (interface{}, error) ShowContainerStatus(c *gofr.Context, containerId string) (interface{}, error) StartContainer(c *gofr.Context, containerId string) (bool, error) }
type DockerAdapter ¶
type DockerAdapter struct{}
DockerAdapter provides an interface for interacting with Docker or Podman to manage containers and images.
func (*DockerAdapter) RemoveContainer ¶
func (d *DockerAdapter) RemoveContainer(c *gofr.Context, containerId string) error
func (*DockerAdapter) RemoveImage ¶
func (d *DockerAdapter) RemoveImage(c *gofr.Context, imageId string) (interface{}, error)
func (*DockerAdapter) RunContainer ¶
func (*DockerAdapter) ShowContainerLogs ¶
func (d *DockerAdapter) ShowContainerLogs(c *gofr.Context, containerId string) (interface{}, error)
func (*DockerAdapter) ShowContainerStatus ¶
func (d *DockerAdapter) ShowContainerStatus(c *gofr.Context, containerId string) (interface{}, error)
func (*DockerAdapter) StartContainer ¶
func (*DockerAdapter) StopContainer ¶
type PodmanAdapter ¶
type PodmanAdapter struct {
// contains filtered or unexported fields
}
func NewPodmanAdapter ¶
func NewPodmanAdapter() (*PodmanAdapter, error)
func (*PodmanAdapter) RemoveContainer ¶
func (p *PodmanAdapter) RemoveContainer(c *gofr.Context, containerId string) error
func (*PodmanAdapter) RemoveImage ¶
func (p *PodmanAdapter) RemoveImage(c *gofr.Context, imageId string) (interface{}, error)
func (*PodmanAdapter) RunContainer ¶
func (*PodmanAdapter) ShowContainerLogs ¶
func (p *PodmanAdapter) ShowContainerLogs(c *gofr.Context, containerId string) (interface{}, error)
func (*PodmanAdapter) ShowContainerStatus ¶
func (p *PodmanAdapter) ShowContainerStatus(c *gofr.Context, containerId string) (interface{}, error)
func (*PodmanAdapter) StartContainer ¶
func (*PodmanAdapter) StopContainer ¶
Click to show internal directories.
Click to hide internal directories.