mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
25 lines
518 B
Go
25 lines
518 B
Go
package db_lib
|
|
|
|
import (
|
|
"github.com/ansible-semaphore/semaphore/db"
|
|
"github.com/ansible-semaphore/semaphore/lib"
|
|
)
|
|
|
|
func CreateApp(template db.Template, repository db.Repository, logger lib.Logger) LocalApp {
|
|
switch template.App {
|
|
case db.TemplateAnsible:
|
|
return &AnsibleApp{
|
|
Template: template,
|
|
Repository: repository,
|
|
Logger: logger,
|
|
Playbook: &AnsiblePlaybook{
|
|
TemplateID: template.ID,
|
|
Repository: repository,
|
|
Logger: logger,
|
|
},
|
|
}
|
|
default:
|
|
panic("unknown app")
|
|
}
|
|
}
|