|
@@ -28,7 +28,7 @@ import (
|
|
|
// Service manages a compose project
|
|
// Service manages a compose project
|
|
|
type Service interface {
|
|
type Service interface {
|
|
|
// Build executes the equivalent to a `compose build`
|
|
// Build executes the equivalent to a `compose build`
|
|
|
- Build(ctx context.Context, project *types.Project) error
|
|
|
|
|
|
|
+ Build(ctx context.Context, project *types.Project, options BuildOptions) error
|
|
|
// Push executes the equivalent ot a `compose push`
|
|
// Push executes the equivalent ot a `compose push`
|
|
|
Push(ctx context.Context, project *types.Project) error
|
|
Push(ctx context.Context, project *types.Project) error
|
|
|
// Pull executes the equivalent of a `compose pull`
|
|
// Pull executes the equivalent of a `compose pull`
|
|
@@ -65,6 +65,12 @@ type Service interface {
|
|
|
UnPause(ctx context.Context, project *types.Project) error
|
|
UnPause(ctx context.Context, project *types.Project) error
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// BuildOptions group options of the Build API
|
|
|
|
|
+type BuildOptions struct {
|
|
|
|
|
+ // Pull always attempt to pull a newer version of the image
|
|
|
|
|
+ Pull bool
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// CreateOptions group options of the Create API
|
|
// CreateOptions group options of the Create API
|
|
|
type CreateOptions struct {
|
|
type CreateOptions struct {
|
|
|
// Remove legacy containers for services that are not defined in the project
|
|
// Remove legacy containers for services that are not defined in the project
|