diff --git a/go/repositories/actioner.go b/go/repositories/actioner.go deleted file mode 100644 index 3cbd209..0000000 --- a/go/repositories/actioner.go +++ /dev/null @@ -1,5 +0,0 @@ -package repositories - -type Actioner interface { - Execute() error -} diff --git a/go/repositories/ee.go b/go/repositories/ee.go deleted file mode 100644 index eed87e7..0000000 --- a/go/repositories/ee.go +++ /dev/null @@ -1,71 +0,0 @@ -package repositories - -import ( - "fmt" - "ocl/portainer-devtool/commands" - "ocl/portainer-devtool/utils" -) - -const ( - ACTION_EE_BUILD_ALL int = iota + 1 - ACTION_EE_RUN_FRONTEND - ACTION_EE_RUN_BACKEND - ACTION_EE_VALIDATE_ALL - ACTION_EE_VALIDATE_FRONTEND - ACTION_EE_VALIDATE_BACKEND - ACTION_EE_RUN_UNIT_TEST_ALL - ACTION_EE_RUN_UNIT_TEST_FRONTEND - ACTION_EE_RUN_UNIT_TEST_BACKEND -) - -type PortainerEE struct { - WorkDir string - FrontendDir string - BackendDir string -} - -func NewPortainerEERepository() *PortainerEE { - repo := &PortainerEE{ - WorkDir: "/home/oscarzhou/source/github.com/portainer/portainer-ee", - } - - utils.HighlightPrint("Your portainer EE repository work directory is ") - fmt.Println(repo.WorkDir) - - return repo -} - -func (repo *PortainerEE) Execute() error { - err := commands.ListBranches(repo.WorkDir) - if err != nil { - return err - } - - if !utils.PromptContinue() { - return nil - } - - option := utils.PromptMenu(repo.listSubMenu) - switch option { - case ACTION_EE_BUILD_ALL: - - case ACTION_EE_RUN_FRONTEND: - commands.RunPortainerClient(repo.WorkDir) - - } - - return nil -} - -func (repo *PortainerEE) listSubMenu() { - utils.MenuPrint("Do you want?", ` - 1. Build both front-end and backend - 2. Run front-end only - 3. Run backend only - 4. Validate both fornt-end and backend before commit - 5. Validate front-end only before commit - 6. Validate backend only before commit - 7. Run unit tests for both front-end and backend - 8. Run unit tests for front-end only - 9. Run unit tests for backend only`) -}