create.go 609 B

123456789101112131415161718192021222324252627282930
  1. package create
  2. import (
  3. api "github.com/porter-dev/porter/api/client"
  4. "github.com/porter-dev/porter/cli/cmd/docker"
  5. )
  6. // CreateAgent handles the creation of a new application on Porter
  7. type CreateAgent struct {
  8. client *api.Client
  9. agent *docker.Agent
  10. opts *CreateOpts
  11. }
  12. // CreateOpts are the options for creating a new CreateAgent
  13. type CreateOpts struct {
  14. ProjectID uint
  15. ClusterID uint
  16. Namespace string
  17. }
  18. func (c *CreateAgent) CreateFromDocker() error {
  19. // read values from local file
  20. // overwrite with docker image repository and tag
  21. // call subdomain creation if necessary
  22. return nil
  23. }