compose.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. func (c *composeService) Push(ctx context.Context, project *types.Project) error {
  27. return errdefs.ErrNotImplemented
  28. }
  29. // Up executes the equivalent to a `compose up`
  30. func (c *composeService) Up(context.Context, *types.Project, bool) error {
  31. return errdefs.ErrNotImplemented
  32. }
  33. // Down executes the equivalent to a `compose down`
  34. func (c *composeService) Down(context.Context, string) error {
  35. return errdefs.ErrNotImplemented
  36. }
  37. // Logs executes the equivalent to a `compose logs`
  38. func (c *composeService) Logs(context.Context, string, io.Writer) error {
  39. return errdefs.ErrNotImplemented
  40. }
  41. // Ps executes the equivalent to a `compose ps`
  42. func (c *composeService) Ps(context.Context, string) ([]compose.ServiceStatus, error) {
  43. return nil, errdefs.ErrNotImplemented
  44. }
  45. // List executes the equivalent to a `docker stack ls`
  46. func (c *composeService) List(context.Context, string) ([]compose.Stack, error) {
  47. return nil, errdefs.ErrNotImplemented
  48. }
  49. // Convert translate compose model into backend's native format
  50. func (c *composeService) Convert(context.Context, *types.Project, string) ([]byte, error) {
  51. return nil, errdefs.ErrNotImplemented
  52. }