Add support for provisioning and rebuilding via interface
This commit is contained in:
parent
f5c5999f44
commit
ddb4bb3546
76 changed files with 1306 additions and 625 deletions
41
internal/wisski/ingredient/php/extras/adapters.go
Normal file
41
internal/wisski/ingredient/php/extras/adapters.go
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
package extras
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/phpx"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/php"
|
||||
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
// Prefixes implements reading and writing prefix
|
||||
type Adapters struct {
|
||||
ingredient.Base
|
||||
Dependencies struct {
|
||||
PHP *php.PHP
|
||||
}
|
||||
}
|
||||
|
||||
//go:embed adapters.php
|
||||
var adaptersPHP string
|
||||
|
||||
type DistilleryAdapter struct {
|
||||
Label string
|
||||
MachineName string
|
||||
Description string
|
||||
InstanceDomain string
|
||||
|
||||
GraphDBRepository string
|
||||
GraphDBUsername string
|
||||
GraphDBPassword string
|
||||
}
|
||||
|
||||
func (wisski *Adapters) CreateDistilleryAdapter(ctx context.Context, server *phpx.Server, adapter DistilleryAdapter) error {
|
||||
return wisski.Dependencies.PHP.ExecScript(
|
||||
ctx, server, nil, adaptersPHP,
|
||||
"create_distillery_adapter",
|
||||
adapter.Label, adapter.MachineName, adapter.Description, adapter.InstanceDomain, adapter.GraphDBRepository, adapter.GraphDBUsername, adapter.GraphDBPassword,
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue