- rename domain entities into controller

This commit is contained in:
naudachu 2023-06-21 21:01:48 +05:00
parent a19263e97e
commit 2b6b7b5d4a
1 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ type WorkflowController struct {
type IWorkflowController interface { type IWorkflowController interface {
Workflow(name string) (string, error) Workflow(name string) (string, error)
CreateRepo(name string, param uint) (string, error) CreateRepo(name string, param uint) (string, error)
CreateFolder(name string) (*d.Cloud, error) CreateFolder(name string) (*d.Folder, error)
} }
func NewWorkflowController( func NewWorkflowController(
@ -53,7 +53,7 @@ func (wc *WorkflowController) Workflow(name string) (string, error) {
if issue != nil { if issue != nil {
var ( var (
git, gitBuild string git, gitBuild string
cloud *d.Cloud cloud *d.Folder
) )
var wg sync.WaitGroup var wg sync.WaitGroup
@ -69,7 +69,7 @@ func (wc *WorkflowController) Workflow(name string) (string, error) {
gitBuild, _ = wc.CreateRepo(issue.Key+"-build", 1) gitBuild, _ = wc.CreateRepo(issue.Key+"-build", 1)
}() }()
go func(ref **d.Cloud) { go func(ref **d.Folder) {
defer wg.Done() defer wg.Done()
*ref, _ = wc.CreateFolder(issue.Key + " - " + issue.Summary) *ref, _ = wc.CreateFolder(issue.Key + " - " + issue.Summary)
}(&cloud) }(&cloud)
@ -103,12 +103,12 @@ func (wc *WorkflowController) CreateRepo(name string, param uint) (string, error
return "", err return "", err
} }
func (wc *WorkflowController) CreateFolder(name string) (*d.Cloud, error) { func (wc *WorkflowController) CreateFolder(name string) (*d.Folder, error) {
//Create ownCloud folder w/ iCloud interface; //Create ownCloud folder w/ iCloud interface;
cloud, err := wc.iCloud.CreateFolder(name) cloud, err := wc.iCloud.CreateFolder(name)
if cloud == nil { if cloud == nil {
return cloud, err return nil, err
} }
/* [ ] Experimental call: /* [ ] Experimental call: