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"
|
|
|
|
|
2020-12-07 09:09:12 +01:00
|
|
|
"github.com/compose-spec/compose-go/types"
|
2021-06-14 16:26:14 +02:00
|
|
|
"github.com/docker/compose-cli/pkg/api"
|
2020-09-07 13:22:08 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
type composeService struct {
|
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Build(ctx context.Context, project *types.Project, options api.BuildOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2020-11-30 12:03:13 +01:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Push(ctx context.Context, project *types.Project, options api.PushOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2020-12-01 11:34:48 +01:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Pull(ctx context.Context, project *types.Project, options api.PullOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2020-12-03 12:22:01 +01:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Create(ctx context.Context, project *types.Project, opts api.CreateOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2020-12-02 18:23:01 +01:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Start(ctx context.Context, project *types.Project, options api.StartOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2021-01-20 09:35:06 -03:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Restart(ctx context.Context, project *types.Project, options api.RestartOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2021-03-09 18:09:45 -03:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Stop(ctx context.Context, project *types.Project, options api.StopOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2020-12-02 18:23:01 +01:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Up(context.Context, *types.Project, api.UpOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2020-09-07 13:22:08 +02:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Down(context.Context, string, api.DownOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2020-09-07 13:22:08 +02:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Logs(context.Context, string, api.LogConsumer, api.LogOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2020-09-07 13:22:08 +02:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Ps(context.Context, string, api.PsOptions) ([]api.ContainerSummary, error) {
|
|
|
|
return nil, api.ErrNotImplemented
|
2020-09-07 13:22:08 +02:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) List(context.Context, api.ListOptions) ([]api.Stack, error) {
|
|
|
|
return nil, api.ErrNotImplemented
|
2020-09-07 13:22:08 +02:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Convert(context.Context, *types.Project, api.ConvertOptions) ([]byte, error) {
|
|
|
|
return nil, api.ErrNotImplemented
|
2020-09-07 13:22:08 +02:00
|
|
|
}
|
2020-12-03 09:24:15 +01:00
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Kill(ctx context.Context, project *types.Project, options api.KillOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2021-01-31 14:42:13 -03:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) RunOneOffContainer(ctx context.Context, project *types.Project, opts api.RunOptions) (int, error) {
|
|
|
|
return 0, api.ErrNotImplemented
|
2020-12-03 09:24:15 +01:00
|
|
|
}
|
2021-02-15 09:13:41 +01:00
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Remove(ctx context.Context, project *types.Project, options api.RemoveOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2021-02-15 09:13:41 +01:00
|
|
|
}
|
2021-02-15 09:56:34 +01:00
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Exec(ctx context.Context, project *types.Project, opts api.RunOptions) (int, error) {
|
|
|
|
return 0, api.ErrNotImplemented
|
2021-02-15 09:56:34 +01:00
|
|
|
}
|
2021-02-22 10:25:40 +01:00
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Copy(ctx context.Context, project *types.Project, opts api.CopyOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2021-05-01 18:20:52 -07:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Pause(ctx context.Context, project string, options api.PauseOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2021-02-22 10:25:40 +01:00
|
|
|
}
|
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) UnPause(ctx context.Context, project string, options api.PauseOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2021-02-22 10:25:40 +01:00
|
|
|
}
|
2021-03-05 12:40:56 +01:00
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Top(ctx context.Context, projectName string, services []string) ([]api.ContainerProcSummary, error) {
|
|
|
|
return nil, api.ErrNotImplemented
|
2021-03-05 12:40:56 +01:00
|
|
|
}
|
2021-03-05 10:09:27 +01:00
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Events(ctx context.Context, project string, options api.EventsOptions) error {
|
|
|
|
return api.ErrNotImplemented
|
2021-03-05 10:09:27 +01:00
|
|
|
}
|
2021-03-19 09:49:14 +01:00
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Port(ctx context.Context, project string, service string, port int, options api.PortOptions) (string, int, error) {
|
|
|
|
return "", 0, api.ErrNotImplemented
|
2021-03-19 09:49:14 +01:00
|
|
|
}
|
2021-04-07 13:16:22 +02:00
|
|
|
|
2021-06-14 16:26:14 +02:00
|
|
|
func (c *composeService) Images(ctx context.Context, projectName string, options api.ImagesOptions) ([]api.ImageSummary, error) {
|
|
|
|
return nil, api.ErrNotImplemented
|
2021-04-07 13:16:22 +02:00
|
|
|
}
|