compose.go 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. "io"
  17. "github.com/compose-spec/compose-go/types"
  18. "github.com/docker/compose-cli/compose"
  19. "github.com/docker/compose-cli/errdefs"
  20. )
  21. type composeService struct {
  22. }
  23. // Up executes the equivalent to a `compose up`
  24. func (c *composeService) Up(context.Context, *types.Project) error {
  25. return errdefs.ErrNotImplemented
  26. }
  27. // Down executes the equivalent to a `compose down`
  28. func (c *composeService) Down(context.Context, string) error {
  29. return errdefs.ErrNotImplemented
  30. }
  31. // Logs executes the equivalent to a `compose logs`
  32. func (c *composeService) Logs(context.Context, string, io.Writer) error {
  33. return errdefs.ErrNotImplemented
  34. }
  35. // Ps executes the equivalent to a `compose ps`
  36. func (c *composeService) Ps(context.Context, string) ([]compose.ServiceStatus, error) {
  37. return nil, errdefs.ErrNotImplemented
  38. }
  39. // Convert translate compose model into backend's native format
  40. func (c *composeService) Convert(context.Context, *types.Project) ([]byte, error) {
  41. return nil, errdefs.ErrNotImplemented
  42. }