Merge pull request #1623 from JulienTant/1391-add-cp

This commit is contained in:
Nicolas De loof 2021-05-06 15:49:51 +02:00 committed by GitHub
commit 4c0cbea24b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 537 additions and 0 deletions

View file

@ -62,6 +62,8 @@ type Service interface {
Remove(ctx context.Context, project *types.Project, options RemoveOptions) ([]string, error)
// Exec executes a command in a running service container
Exec(ctx context.Context, project *types.Project, opts RunOptions) (int, error)
// Copy copies a file/folder between a service container and the local filesystem
Copy(ctx context.Context, project *types.Project, opts CopyOptions) error
// Pause executes the equivalent to a `compose pause`
Pause(ctx context.Context, project string, options PauseOptions) error
// UnPause executes the equivalent to a `compose unpause`
@ -272,6 +274,16 @@ type PsOptions struct {
Services []string
}
// CopyOptions group options of the cp API
type CopyOptions struct {
Source string
Destination string
All bool
Index int
FollowLink bool
CopyUIDGID bool
}
// PortPublisher hold status about published port
type PortPublisher struct {
URL string