2020-09-07 13:22:08 +02:00
|
|
|
/*
|
2020-09-22 12:13:00 +02:00
|
|
|
Copyright 2020 Docker Compose CLI authors
|
2020-09-07 13:22:08 +02:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/docker/compose-cli/api/compose"
|
2021-01-15 16:51:31 +01:00
|
|
|
"github.com/docker/compose-cli/api/errdefs"
|
2020-12-07 09:09:12 +01:00
|
|
|
|
|
|
|
"github.com/compose-spec/compose-go/types"
|
2020-09-07 13:22:08 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
type composeService struct {
|
|
|
|
}
|
|
|
|
|
2020-11-30 12:03:13 +01:00
|
|
|
func (c *composeService) Build(ctx context.Context, project *types.Project) error {
|
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2020-12-01 11:34:48 +01:00
|
|
|
func (c *composeService) Push(ctx context.Context, project *types.Project) error {
|
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2020-12-03 12:22:01 +01:00
|
|
|
func (c *composeService) Pull(ctx context.Context, project *types.Project) error {
|
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2021-01-06 14:23:37 +01:00
|
|
|
func (c *composeService) Create(ctx context.Context, project *types.Project, opts compose.CreateOptions) error {
|
2020-12-02 18:23:01 +01:00
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2021-02-08 11:04:46 +01:00
|
|
|
func (c *composeService) Start(ctx context.Context, project *types.Project, options compose.StartOptions) error {
|
2021-01-20 13:35:06 +01:00
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2021-01-26 22:42:49 +01:00
|
|
|
func (c *composeService) Stop(ctx context.Context, project *types.Project) error {
|
2020-12-02 18:23:01 +01:00
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2020-12-16 16:16:39 +01:00
|
|
|
func (c *composeService) Up(context.Context, *types.Project, compose.UpOptions) error {
|
2020-09-07 13:22:08 +02:00
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2020-12-16 16:16:39 +01:00
|
|
|
func (c *composeService) Down(context.Context, string, compose.DownOptions) error {
|
2020-09-07 13:22:08 +02:00
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2020-12-16 16:58:54 +01:00
|
|
|
func (c *composeService) Logs(context.Context, string, compose.LogConsumer, compose.LogOptions) error {
|
2020-09-07 13:22:08 +02:00
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2021-01-29 14:41:44 +01:00
|
|
|
func (c *composeService) Ps(context.Context, string, compose.PsOptions) ([]compose.ContainerSummary, error) {
|
2020-09-07 13:22:08 +02:00
|
|
|
return nil, errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2021-01-21 18:45:13 +01:00
|
|
|
func (c *composeService) List(context.Context) ([]compose.Stack, error) {
|
2020-09-07 13:22:08 +02:00
|
|
|
return nil, errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2020-12-16 16:16:39 +01:00
|
|
|
func (c *composeService) Convert(context.Context, *types.Project, compose.ConvertOptions) ([]byte, error) {
|
2020-09-07 13:22:08 +02:00
|
|
|
return nil, errdefs.ErrNotImplemented
|
|
|
|
}
|
2020-12-03 09:24:15 +01:00
|
|
|
|
2021-01-31 18:42:13 +01:00
|
|
|
func (c *composeService) Kill(ctx context.Context, project *types.Project, options compose.KillOptions) error {
|
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|
|
|
|
|
2021-02-12 17:33:59 +01:00
|
|
|
func (c *composeService) RunOneOffContainer(ctx context.Context, project *types.Project, opts compose.RunOptions) (int, error) {
|
|
|
|
return 0, errdefs.ErrNotImplemented
|
2020-12-03 09:24:15 +01:00
|
|
|
}
|
2021-02-15 09:13:41 +01:00
|
|
|
|
|
|
|
func (c *composeService) Remove(ctx context.Context, project *types.Project, options compose.RemoveOptions) error {
|
|
|
|
return errdefs.ErrNotImplemented
|
|
|
|
}
|