| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | package dockerfunc |
| 4 | |
| 5 | import ( |
| 6 | "context" |
| 7 | |
| 8 | "github.com/docker/docker/api/types" |
| 9 | typesContainer "github.com/docker/docker/api/types/container" |
| 10 | typesImage "github.com/docker/docker/api/types/image" |
| 11 | ) |
| 12 | |
| 13 | // DockerClient defines the minimal Docker API surface needed by function handlers. |
| 14 | type DockerClient interface { |
| 15 | ContainerList(context.Context, typesContainer.ListOptions) ([]types.Container, error) |
| 16 | ImageList(context.Context, typesImage.ListOptions) ([]typesImage.Summary, error) |
| 17 | } |
| 18 | |
| 19 | // Deps provides runtime dependencies needed by Docker function handlers. |
| 20 | type Deps interface { |
| 21 | DockerClient() (DockerClient, error) |
| 22 | } |