component/provision: Make components purgable
This commit is contained in:
parent
845e927117
commit
4358320433
5 changed files with 46 additions and 31 deletions
|
|
@ -7,6 +7,7 @@ import (
|
|||
_ "embed"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/models"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/errorx"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/unpack"
|
||||
"github.com/tkw1536/goprogram/exit"
|
||||
)
|
||||
|
|
@ -23,6 +24,13 @@ func (ts *Triplestore) Provision(instance models.Instance, domain string) error
|
|||
return ts.CreateRepository(instance.GraphDBRepository, domain, instance.GraphDBUsername, instance.GraphDBPassword)
|
||||
}
|
||||
|
||||
func (ts *Triplestore) Purge(instance models.Instance, domain string) error {
|
||||
return errorx.First(
|
||||
ts.PurgeRepo(instance.GraphDBRepository),
|
||||
ts.PurgeUser(instance.GraphDBUsername),
|
||||
)
|
||||
}
|
||||
|
||||
func (ts *Triplestore) CreateRepository(name, domain, user, password string) error {
|
||||
if err := ts.Wait(); err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue