Skip to content

Commit

Permalink
Merge pull request #96 from CodeKaio/91-package-by-feature
Browse files Browse the repository at this point in the history
♻️ : package by feature
  • Loading branch information
cdubuisson authored Aug 13, 2019
2 parents d22b4f4 + 7bfbd9a commit a7c5860
Show file tree
Hide file tree
Showing 64 changed files with 184 additions and 309 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>io.codeka</groupId>
<artifactId>gaia</artifactId>
<version>1.1.0</version>
<version>1.2.0-SNAPSHOT</version>
<name>gaia</name>
<description>gaia runs yours terraform modules</description>

Expand Down
11 changes: 0 additions & 11 deletions src/main/java/io/codeka/gaia/Gaia.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
package io.codeka.gaia;

import io.codeka.gaia.bo.Stack;
import io.codeka.gaia.bo.TerraformModule;
import io.codeka.gaia.bo.TerraformVariable;
import io.codeka.gaia.repository.StackRepository;
import io.codeka.gaia.repository.TerraformModuleRepository;
import io.codeka.gaia.repository.TerraformStateRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;

import java.util.List;

@SpringBootApplication
@EnableMongoRepositories
public class Gaia {
Expand Down
20 changes: 0 additions & 20 deletions src/main/java/io/codeka/gaia/bo/TerraformBackend.java

This file was deleted.

16 changes: 0 additions & 16 deletions src/main/java/io/codeka/gaia/bo/backend/Backend.java

This file was deleted.

13 changes: 0 additions & 13 deletions src/main/java/io/codeka/gaia/bo/backend/Http.java

This file was deleted.

16 changes: 0 additions & 16 deletions src/main/java/io/codeka/gaia/bo/backend/Terraform.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.codeka.gaia.controller;
package io.codeka.gaia.dashboard.controller;

import io.codeka.gaia.bo.StackState;
import io.codeka.gaia.repository.StackRepository;
import io.codeka.gaia.repository.TerraformModuleRepository;
import io.codeka.gaia.modules.repository.TerraformModuleRepository;
import io.codeka.gaia.stacks.bo.StackState;
import io.codeka.gaia.stacks.repository.StackRepository;
import io.codeka.gaia.teams.bo.Team;
import io.codeka.gaia.teams.bo.User;
import org.springframework.stereotype.Controller;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.modules.bo;

import io.codeka.gaia.teams.bo.Team;
import io.codeka.gaia.teams.bo.User;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.modules.bo;

/**
* Represents a module variable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.codeka.gaia.controller;
package io.codeka.gaia.modules.controller;

import io.codeka.gaia.bo.TerraformModule;
import io.codeka.gaia.repository.TerraformModuleRepository;
import io.codeka.gaia.modules.bo.TerraformModule;
import io.codeka.gaia.modules.repository.TerraformModuleRepository;
import io.codeka.gaia.teams.bo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.annotation.Secured;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.codeka.gaia.controller;
package io.codeka.gaia.modules.controller;

import io.codeka.gaia.bo.TerraformModule;
import io.codeka.gaia.repository.TerraformModuleGitRepository;
import io.codeka.gaia.repository.TerraformModuleRepository;
import io.codeka.gaia.modules.bo.TerraformModule;
import io.codeka.gaia.modules.repository.TerraformModuleGitRepository;
import io.codeka.gaia.modules.repository.TerraformModuleRepository;
import io.codeka.gaia.teams.bo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.codeka.gaia.controller;
package io.codeka.gaia.modules.controller;

import io.codeka.gaia.repository.TerraformCLIRepository;
import io.codeka.gaia.modules.repository.TerraformCLIRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.repository;
package io.codeka.gaia.modules.repository;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.codeka.gaia.repository;
package io.codeka.gaia.modules.repository;

import io.codeka.gaia.bo.TerraformModule;
import io.codeka.gaia.repository.strategy.GitHubStrategy;
import io.codeka.gaia.repository.strategy.GitLabStrategy;
import io.codeka.gaia.repository.strategy.GitPlatformStrategy;
import io.codeka.gaia.modules.bo.TerraformModule;
import io.codeka.gaia.modules.repository.strategy.GitHubStrategy;
import io.codeka.gaia.modules.repository.strategy.GitLabStrategy;
import io.codeka.gaia.modules.repository.strategy.GitPlatformStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.codeka.gaia.repository;
package io.codeka.gaia.modules.repository;

import io.codeka.gaia.bo.TerraformModule;
import io.codeka.gaia.modules.bo.TerraformModule;
import io.codeka.gaia.teams.bo.Team;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.repository.strategy;
package io.codeka.gaia.modules.repository.strategy;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.repository.strategy;
package io.codeka.gaia.modules.repository.strategy;

import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.repository.strategy;
package io.codeka.gaia.modules.repository.strategy;

import org.apache.commons.lang.StringUtils;

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/codeka/gaia/runner/StackCommandBuilder.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.codeka.gaia.runner;

import com.github.mustachejava.Mustache;
import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.bo.Stack;
import io.codeka.gaia.bo.TerraformModule;
import io.codeka.gaia.bo.mustache.TerraformScript;
import io.codeka.gaia.settings.bo.Settings;
import io.codeka.gaia.stacks.bo.Stack;
import io.codeka.gaia.modules.bo.TerraformModule;
import io.codeka.gaia.stacks.bo.mustache.TerraformScript;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/io/codeka/gaia/runner/StackRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
import com.spotify.docker.client.DockerClient;
import com.spotify.docker.client.exceptions.DockerException;
import com.spotify.docker.client.messages.ContainerConfig;
import io.codeka.gaia.bo.*;
import io.codeka.gaia.repository.JobRepository;
import io.codeka.gaia.repository.StackRepository;
import io.codeka.gaia.modules.bo.TerraformModule;
import io.codeka.gaia.settings.bo.Settings;
import io.codeka.gaia.stacks.repository.JobRepository;
import io.codeka.gaia.stacks.repository.StackRepository;
import io.codeka.gaia.stacks.bo.Job;
import io.codeka.gaia.stacks.bo.JobType;
import io.codeka.gaia.stacks.bo.Stack;
import io.codeka.gaia.stacks.bo.StackState;
import org.apache.commons.io.output.WriterOutputStream;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.spotify.docker.client.DockerClient;
import com.spotify.docker.client.messages.ContainerConfig;
import com.spotify.docker.client.messages.HostConfig;
import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.settings.bo.Settings;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.settings.bo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.codeka.gaia.controller;
package io.codeka.gaia.settings.controller;

import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.repository.SettingsRepository;
import io.codeka.gaia.settings.bo.Settings;
import io.codeka.gaia.settings.repository.SettingsRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.codeka.gaia.repository;
package io.codeka.gaia.settings.repository;

import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.settings.bo.Settings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.stacks.bo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.codeka.gaia.teams.bo.User;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.stacks.bo;

public enum JobStatus {
RUNNING, FINISHED, FAILED
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.stacks.bo;

public enum JobType {
PREVIEW, RUN, STOP
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.stacks.bo;

import io.codeka.gaia.teams.bo.Team;
import io.codeka.gaia.teams.bo.User;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.stacks.bo;

/**
* Represents the state of a Stack.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.stacks.bo;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo.mustache;
package io.codeka.gaia.stacks.bo.mustache;

/**
* Object matching the terraform mustache template
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.codeka.gaia.controller;
package io.codeka.gaia.stacks.controller;

import io.codeka.gaia.bo.Job;
import io.codeka.gaia.repository.JobRepository;
import io.codeka.gaia.stacks.bo.Job;
import io.codeka.gaia.stacks.repository.JobRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
Expand Down
Loading

0 comments on commit a7c5860

Please sign in to comment.