compose.go 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. Copyright 2020 Docker Compose CLI authors
  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/api/compose"
  19. "github.com/docker/compose-cli/errdefs"
  20. )
  21. type composeService struct {
  22. }
  23. func (c *composeService) Build(ctx context.Context, project *types.Project) error {
  24. return errdefs.ErrNotImplemented
  25. }
  26. // Up executes the equivalent to a `compose up`
  27. func (c *composeService) Up(context.Context, *types.Project, bool) error {
  28. return errdefs.ErrNotImplemented
  29. }
  30. // Down executes the equivalent to a `compose down`
  31. func (c *composeService) Down(context.Context, string) error {
  32. return errdefs.ErrNotImplemented
  33. }
  34. // Logs executes the equivalent to a `compose logs`
  35. func (c *composeService) Logs(context.Context, string, io.Writer) error {
  36. return errdefs.ErrNotImplemented
  37. }
  38. // Ps executes the equivalent to a `compose ps`
  39. func (c *composeService) Ps(context.Context, string) ([]compose.ServiceStatus, error) {
  40. return nil, errdefs.ErrNotImplemented
  41. }
  42. // List executes the equivalent to a `docker stack ls`
  43. func (c *composeService) List(context.Context, string) ([]compose.Stack, error) {
  44. return nil, errdefs.ErrNotImplemented
  45. }
  46. // Convert translate compose model into backend's native format
  47. func (c *composeService) Convert(context.Context, *types.Project, string) ([]byte, error) {
  48. return nil, errdefs.ErrNotImplemented
  49. }