provisioner.go 690 B

123456789101112131415161718192021222324252627282930313233
  1. package provisioner
  2. import (
  3. "github.com/porter-dev/porter/internal/models"
  4. )
  5. type ProvisionerOperation string
  6. const (
  7. Apply ProvisionerOperation = "apply"
  8. Destroy ProvisionerOperation = "destroy"
  9. )
  10. type ProvisionCredentialExchange struct {
  11. CredExchangeEndpoint string
  12. CredExchangeToken string
  13. CredExchangeID uint
  14. VaultToken string
  15. }
  16. type ProvisionOpts struct {
  17. Infra *models.Infra
  18. Operation *models.Operation
  19. CredentialExchange *ProvisionCredentialExchange
  20. OperationKind ProvisionerOperation
  21. Kind string
  22. Values map[string]interface{}
  23. }
  24. type Provisioner interface {
  25. Provision(opts *ProvisionOpts) error
  26. }