Documentation ¶
Index ¶
- type DockerClient
- func (dc *DockerClient) DeleteContainer(id string, opts container.RemoveOptions) error
- func (dc *DockerClient) DeleteImage(id string, opts image.RemoveOptions) error
- func (dc DockerClient) DeleteVolume(id string, force bool) error
- func (dc *DockerClient) GetContainerLogs(id string) (io.ReadCloser, error)
- func (dc *DockerClient) InspectContainer(id string) (*types.ContainerJSON, error)
- func (dc *DockerClient) ListContainers(showContainerSize bool) []types.Container
- func (dc *DockerClient) ListImages() []image.Summary
- func (dc DockerClient) ListVolumes() ([]*volume.Volume, error)
- func (dc DockerClient) PingDocker() error
- func (dc *DockerClient) PruneContainers() (types.ContainersPruneReport, error)
- func (dc *DockerClient) PruneImages() (types.ImagesPruneReport, error)
- func (dc DockerClient) PruneVolumes() (*types.VolumesPruneReport, error)
- func (dc *DockerClient) RestartContainer(id string) error
- func (dc *DockerClient) RunImage(containerConfig container.Config) (*string, error)
- func (dc *DockerClient) ScoutImage(ctx context.Context, imageName string) (*ScoutData, error)
- func (dc *DockerClient) ToggleContainerListAll()
- func (dc *DockerClient) TogglePauseResume(id string) error
- func (dc *DockerClient) ToggleStartStopContainer(id string) error
- type ImageVulnerabilities
- type MockApi
- func (mo *MockApi) ContainerInspect(ctx context.Context, container string) (types.ContainerJSON, error)
- func (mo *MockApi) ContainerInspectWithRaw(ctx context.Context, container string, getSize bool) (types.ContainerJSON, []byte, error)
- func (m *MockApi) ContainerList(ctx context.Context, options container.ListOptions) ([]types.Container, error)
- func (mo *MockApi) ContainerLogs(ctx context.Context, container string, options container.LogsOptions) (io.ReadCloser, error)
- func (mo *MockApi) ContainerPause(ctx context.Context, container string) error
- func (mo *MockApi) ContainerRemove(ctx context.Context, container string, options container.RemoveOptions) error
- func (mo *MockApi) ContainerRestart(ctx context.Context, container string, options container.StopOptions) error
- func (mo *MockApi) ContainerStart(ctx context.Context, container string, options container.StartOptions) error
- func (mo *MockApi) ContainerStop(ctx context.Context, container string, options container.StopOptions) error
- func (mo *MockApi) ContainerUnpause(ctx context.Context, container string) error
- func (mo *MockApi) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (types.ContainersPruneReport, error)
- func (m *MockApi) ImageList(ctx context.Context, options dimage.ListOptions) ([]dimage.Summary, error)
- func (m *MockApi) ImageRemove(ctx context.Context, image string, options dimage.RemoveOptions) ([]dimage.DeleteResponse, error)
- func (te *MockApi) ImagesPrune(ctx context.Context, pruneFilter filters.Args) (types.ImagesPruneReport, error)
- func (m *MockApi) SetMockContainers(conts []types.Container)
- func (m *MockApi) SetMockImages(imgs []dimage.Summary)
- func (m *MockApi) SetMockVolumes(vols []*volume.Volume)
- func (m *MockApi) VolumeList(ctx context.Context, options volume.ListOptions) (volume.ListResponse, error)
- func (m *MockApi) VolumeRemove(ctx context.Context, volumeID string, force bool) error
- func (mo *MockApi) VolumesPrune(ctx context.Context, pruneFilter filters.Args) (types.VolumesPruneReport, error)
- type ScoutData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerClient ¶
type DockerClient struct {
// contains filtered or unexported fields
}
func NewDockerClient ¶
func NewDockerClient() DockerClient
func NewMockCli ¶ added in v1.3.1
func NewMockCli(cli *MockApi) DockerClient
func (*DockerClient) DeleteContainer ¶
func (dc *DockerClient) DeleteContainer(id string, opts container.RemoveOptions) error
Deletes the container
func (*DockerClient) DeleteImage ¶
func (dc *DockerClient) DeleteImage(id string, opts image.RemoveOptions) error
func (DockerClient) DeleteVolume ¶
func (dc DockerClient) DeleteVolume(id string, force bool) error
func (*DockerClient) GetContainerLogs ¶
func (dc *DockerClient) GetContainerLogs(id string) (io.ReadCloser, error)
gets logs
func (*DockerClient) InspectContainer ¶
func (dc *DockerClient) InspectContainer(id string) (*types.ContainerJSON, error)
func (*DockerClient) ListContainers ¶
func (dc *DockerClient) ListContainers(showContainerSize bool) []types.Container
func (*DockerClient) ListImages ¶
func (dc *DockerClient) ListImages() []image.Summary
func (DockerClient) ListVolumes ¶
func (dc DockerClient) ListVolumes() ([]*volume.Volume, error)
func (DockerClient) PingDocker ¶
func (dc DockerClient) PingDocker() error
func (*DockerClient) PruneContainers ¶
func (dc *DockerClient) PruneContainers() (types.ContainersPruneReport, error)
func (*DockerClient) PruneImages ¶
func (dc *DockerClient) PruneImages() (types.ImagesPruneReport, error)
func (DockerClient) PruneVolumes ¶
func (dc DockerClient) PruneVolumes() (*types.VolumesPruneReport, error)
func (*DockerClient) RestartContainer ¶
func (dc *DockerClient) RestartContainer(id string) error
func (*DockerClient) RunImage ¶ added in v1.3.1
func (dc *DockerClient) RunImage(containerConfig container.Config) (*string, error)
Runs the image and returns the container ID
func (*DockerClient) ScoutImage ¶
runs docker scout and parses the output using regex
func (*DockerClient) ToggleContainerListAll ¶
func (dc *DockerClient) ToggleContainerListAll()
Toggles listing of inactive containers
func (*DockerClient) TogglePauseResume ¶
func (dc *DockerClient) TogglePauseResume(id string) error
func (*DockerClient) ToggleStartStopContainer ¶
func (dc *DockerClient) ToggleStartStopContainer(id string) error
Toggles running state of container
type ImageVulnerabilities ¶
type MockApi ¶ added in v1.3.1
type MockApi struct { client.CommonAPIClient // contains filtered or unexported fields }
func (*MockApi) ContainerInspect ¶ added in v1.3.1
func (*MockApi) ContainerInspectWithRaw ¶ added in v1.3.1
func (*MockApi) ContainerList ¶ added in v1.3.1
func (*MockApi) ContainerLogs ¶ added in v1.3.1
func (mo *MockApi) ContainerLogs(ctx context.Context, container string, options container.LogsOptions) (io.ReadCloser, error)
func (*MockApi) ContainerPause ¶ added in v1.3.1
func (*MockApi) ContainerRemove ¶ added in v1.3.1
func (*MockApi) ContainerRestart ¶ added in v1.3.1
func (*MockApi) ContainerStart ¶ added in v1.3.1
func (*MockApi) ContainerStop ¶ added in v1.3.1
func (*MockApi) ContainerUnpause ¶ added in v1.3.1
func (*MockApi) ContainersPrune ¶ added in v1.3.1
func (*MockApi) ImageRemove ¶ added in v1.3.1
func (m *MockApi) ImageRemove(ctx context.Context, image string, options dimage.RemoveOptions) ([]dimage.DeleteResponse, error)
func (*MockApi) ImagesPrune ¶ added in v1.3.1
func (*MockApi) SetMockContainers ¶ added in v1.3.1
func (*MockApi) SetMockImages ¶ added in v1.3.1
func (*MockApi) SetMockVolumes ¶ added in v1.3.1
func (*MockApi) VolumeList ¶ added in v1.3.1
func (m *MockApi) VolumeList(ctx context.Context, options volume.ListOptions) (volume.ListResponse, error)
func (*MockApi) VolumeRemove ¶ added in v1.3.1
func (*MockApi) VolumesPrune ¶ added in v1.3.1
type ScoutData ¶
type ScoutData struct {
ImageVulEntries []ImageVulnerabilities
}
Click to show internal directories.
Click to hide internal directories.