component/provision: Make components purgable

This commit is contained in:
Tom Wiesing 2022-10-04 13:27:55 +02:00
parent 845e927117
commit 4358320433
No known key found for this signature in database
5 changed files with 46 additions and 31 deletions

View file

@ -4,11 +4,15 @@ import (
"github.com/FAU-CDI/wisski-distillery/internal/models"
)
// Provisionable represents a component with a Provision method.
// Provisionable represents a component with a Provision and a Purge method.
type Provisionable interface {
Component
// Provision provisions resources specific to the provided instance.
// Domain holds the full (unique) domain name of the given instance.
Provision(instance models.Instance, domain string) error
// Purge purges resources specific to the provided instance.
// Domain holds the full (unique) domain name of the given instance.
Purge(instance models.Instance, domain string) error
}