From baf3a9b3a72e4d98ad30ee56a7dd81812fb1fd21 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Fri, 20 Mar 2020 13:00:37 -0500 Subject: use boolreport for containerexists response in the case of exists, use a boolreport structure so that responses can be consistent pointer and error Signed-off-by: Brent Baude --- pkg/domain/entities/containers.go | 4 ++++ pkg/domain/entities/engine_container.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/domain/entities') diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go index e688e4fd3..45ce1f1fb 100644 --- a/pkg/domain/entities/containers.go +++ b/pkg/domain/entities/containers.go @@ -13,3 +13,7 @@ type WaitReport struct { Error error ExitCode int32 } + +type BoolReport struct { + Value bool +} diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go index 53f8f88f5..aa2ceb630 100644 --- a/pkg/domain/entities/engine_container.go +++ b/pkg/domain/entities/engine_container.go @@ -7,7 +7,7 @@ import ( type ContainerEngine interface { ContainerDelete(ctx context.Context, opts ContainerDeleteOptions) (*ContainerDeleteReport, error) ContainerPrune(ctx context.Context) (*ContainerPruneReport, error) - ContainerExists(ctx context.Context, nameOrId string) (bool, error) + ContainerExists(ctx context.Context, nameOrId string) (*BoolReport, error) ContainerWait(ctx context.Context, namesOrIds []string, options WaitOptions) ([]WaitReport, error) PodDelete(ctx context.Context, opts PodPruneOptions) (*PodDeleteReport, error) PodPrune(ctx context.Context) (*PodPruneReport, error) -- cgit v1.2.3-54-g00ecf