containers.go 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. Copyright 2020 Docker, Inc.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package client
  14. import (
  15. "context"
  16. "github.com/docker/compose-cli/api/containers"
  17. "github.com/docker/compose-cli/errdefs"
  18. )
  19. type containerService struct {
  20. }
  21. // List returns all the containers
  22. func (c *containerService) List(context.Context, bool) ([]containers.Container, error) {
  23. return nil, errdefs.ErrNotImplemented
  24. }
  25. // Start starts a stopped container
  26. func (c *containerService) Start(context.Context, string) error {
  27. return errdefs.ErrNotImplemented
  28. }
  29. // Stop stops the running container
  30. func (c *containerService) Stop(context.Context, string, *uint32) error {
  31. return errdefs.ErrNotImplemented
  32. }
  33. func (c *containerService) Kill(ctx context.Context, containerID string, signal string) error {
  34. return errdefs.ErrNotImplemented
  35. }
  36. // Run creates and starts a container
  37. func (c *containerService) Run(context.Context, containers.ContainerConfig) error {
  38. return errdefs.ErrNotImplemented
  39. }
  40. // Exec executes a command inside a running container
  41. func (c *containerService) Exec(context.Context, string, containers.ExecRequest) error {
  42. return errdefs.ErrNotImplemented
  43. }
  44. // Logs returns all the logs of a container
  45. func (c *containerService) Logs(context.Context, string, containers.LogsRequest) error {
  46. return errdefs.ErrNotImplemented
  47. }
  48. // Delete removes containers
  49. func (c *containerService) Delete(context.Context, string, containers.DeleteRequest) error {
  50. return errdefs.ErrNotImplemented
  51. }
  52. // Inspect get a specific container
  53. func (c *containerService) Inspect(context.Context, string) (containers.Container, error) {
  54. return containers.Container{}, errdefs.ErrNotImplemented
  55. }