Skip to content

Commit 48c885f

Browse files
ianmiellChris Vermeulen
andauthored
Rename configuration-service => api (#243)
Co-authored-by: Chris Vermeulen <chris.vermeulen@container-solutions.com>
1 parent 03ee959 commit 48c885f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+188
-188
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ __debug_*
1717
local.go
1818
resolver.go
1919

20-
configuration-service
20+
api
2121

2222
*.pem

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ COPY . ./
3232
RUN make swag
3333

3434
# Build it
35-
RUN GOOS=linux go build -o /configuration-service
35+
RUN GOOS=linux go build -o /api
3636

3737
FROM golang:1.23 AS production
3838
WORKDIR /
3939

40-
COPY --from=builder /configuration-service /configuration-service
40+
COPY --from=builder /api /api
4141
# Open port 8080 to traffic
4242
EXPOSE 8080
4343

4444
# Specify the command to run on container start.
45-
CMD ["/configuration-service", "run"]
45+
CMD ["/api", "run"]
4646

4747
FROM production

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ check-diff: reviewable # Ensure branch is clean.
120120

121121
.PHONY: build
122122
build: ## Build the service in Docker Compose
123-
@docker compose -f docker-compose.yml build configuration-service
123+
@docker compose -f docker-compose.yml build api
124124

125125
.PHONY: dev
126126
up: ## Run the service in Docker Compose
@@ -142,4 +142,4 @@ generate-keys:
142142
@$(OK) keys generated
143143

144144
tag: ## Build and tag a production-based image of the service
145-
@docker build -t ghcr.io/compliance-framework/configuration-service:latest_local .
145+
@docker build -t ghcr.io/compliance-framework/api:latest_local .

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Configuration Service
1+
# API
22

33
## Overview
44

5-
The Configuration service is a core component of The Continuous Compliance Framework. It manages all the data and
5+
The API is a core component of the Continuous Compliance Framework. It manages all the data and
66
aggregation for compliance, and agent-collected data.
77

88
The data structures in the service are heavily based on OSCAL (Open Security Controls Assessment Language), with the
@@ -20,16 +20,16 @@ goal of full support.
2020
This will also start the required auxiliary services.
2121

2222
```shell
23-
make up
23+
make up
2424
# OR podman-compose up -d
25-
# OR docker compose up -d
25+
# OR docker compose up -d
2626

2727
curl http://localhost:8080
2828
```
2929

3030
### The command line
3131

32-
The Configuration Service ships with a built in CLI, which can be used to run administrative tasks within.
32+
The API ships with a built in CLI, which can be used to run administrative tasks within.
3333

3434
Some examples include:
3535
```shell
@@ -50,15 +50,15 @@ $ go run main.go help # Learn more about all the available commands
5050
> [!IMPORTANT]
5151
> Make sure you run `make swag` when first cloning the repository (either locally or in CI steps) otherwise the build will fail
5252
53-
The configuration service exposes all of its endpoints using Swagger.
53+
The API exposes all of its endpoints using Swagger.
5454

5555
Swagger artefacts (docs.json/docs.yaml) are not stored within the repository as it is automatically generated using the [swag cli tool](https://github.com/swaggo/swag) and stored in the `docs/` directory. A helper function `make swag` can be run anytime to generate the most up to date swagger docs.
5656

5757
You can access the Swagger documentation to test and interact with the API at: [http://localhost:8080/swagger/index.html](http://localhost:8080/swagger/index.html)
5858

5959
## Configuration
6060

61-
You can configure configuration-service using environment variables or a `.env` file.
61+
You can configure the API using environment variables or a `.env` file.
6262

6363
Available variables are shown in [`.env.example`](./.env.example)
6464

@@ -69,14 +69,14 @@ cp .env.example .env
6969

7070
## Contributing
7171

72-
We welcome contributions to configuration-service!
72+
We welcome contributions to the API!
7373

7474
## Testing
7575

7676
### Integration Tests
7777

78-
The Configuration Service contains integration tests, which will run tests against a real database, ensuring the service
79-
works as expected.
78+
The API contains integration tests, which will run tests against a real database, ensuring the service
79+
works as expected.
8080

8181
The tests are marked with special build markers to avoid running them during normal development.
8282

cmd/migrate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package cmd
22

33
import (
44
"context"
5-
"github.com/compliance-framework/configuration-service/internal/config"
6-
"github.com/compliance-framework/configuration-service/internal/service"
5+
"github.com/compliance-framework/api/internal/config"
6+
"github.com/compliance-framework/api/internal/service"
77
"github.com/spf13/cobra"
88
"go.uber.org/zap"
99
"log"

cmd/oscal/import.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ package oscal
33
import (
44
"context"
55
"encoding/json"
6-
"github.com/compliance-framework/configuration-service/internal/service/relational"
6+
"github.com/compliance-framework/api/internal/service/relational"
77
oscalTypes_1_1_3 "github.com/defenseunicorns/go-oscal/src/types/oscal-1-1-3"
88
"gorm.io/gorm"
99
"io"
1010
"log"
1111
"os"
1212
"path"
1313

14-
"github.com/compliance-framework/configuration-service/internal/config"
15-
"github.com/compliance-framework/configuration-service/internal/service"
14+
"github.com/compliance-framework/api/internal/config"
15+
"github.com/compliance-framework/api/internal/service"
1616
"github.com/spf13/cobra"
1717
"go.uber.org/zap"
1818
)

cmd/root.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import (
55
"fmt"
66
"os"
77

8-
"github.com/compliance-framework/configuration-service/cmd/oscal"
9-
"github.com/compliance-framework/configuration-service/cmd/seed"
10-
"github.com/compliance-framework/configuration-service/cmd/users"
8+
"github.com/compliance-framework/api/cmd/oscal"
9+
"github.com/compliance-framework/api/cmd/seed"
10+
"github.com/compliance-framework/api/cmd/users"
1111
"github.com/joho/godotenv"
1212
"github.com/spf13/cobra"
1313
"github.com/spf13/viper"
1414
)
1515

1616
var (
1717
rootCmd = &cobra.Command{
18-
Use: "conf-service",
19-
Short: "Compliance Framework Configuration Service",
18+
Use: "api",
19+
Short: "Compliance Framework API",
2020
}
2121
)
2222

cmd/run.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ import (
44
"context"
55
"log"
66

7-
"github.com/compliance-framework/configuration-service/internal/api"
8-
"github.com/compliance-framework/configuration-service/internal/api/handler"
9-
"github.com/compliance-framework/configuration-service/internal/api/handler/auth"
10-
"github.com/compliance-framework/configuration-service/internal/api/handler/oscal"
11-
"github.com/compliance-framework/configuration-service/internal/config"
12-
"github.com/compliance-framework/configuration-service/internal/service"
7+
"github.com/compliance-framework/api/internal/api"
8+
"github.com/compliance-framework/api/internal/api/handler"
9+
"github.com/compliance-framework/api/internal/api/handler/auth"
10+
"github.com/compliance-framework/api/internal/api/handler/oscal"
11+
"github.com/compliance-framework/api/internal/config"
12+
"github.com/compliance-framework/api/internal/service"
1313
"github.com/spf13/cobra"
1414
"go.uber.org/zap"
1515
)
1616

1717
var (
1818
RunCmd = &cobra.Command{
1919
Use: "run",
20-
Short: "Run the configuration service API",
20+
Short: "Run the compliance framework API",
2121
Run: RunServer,
2222
}
2323
)

cmd/seed/evidence.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package seed
33
import (
44
"context"
55
"fmt"
6-
"github.com/compliance-framework/configuration-service/internal"
7-
"github.com/compliance-framework/configuration-service/internal/service/relational"
6+
"github.com/compliance-framework/api/internal"
7+
"github.com/compliance-framework/api/internal/service/relational"
88
oscalTypes_1_1_3 "github.com/defenseunicorns/go-oscal/src/types/oscal-1-1-3"
99
"github.com/google/uuid"
1010
"github.com/schollz/progressbar/v3"
@@ -14,8 +14,8 @@ import (
1414
"sync"
1515
"time"
1616

17-
"github.com/compliance-framework/configuration-service/internal/config"
18-
"github.com/compliance-framework/configuration-service/internal/service"
17+
"github.com/compliance-framework/api/internal/config"
18+
"github.com/compliance-framework/api/internal/service"
1919
"github.com/spf13/cobra"
2020
"go.uber.org/zap"
2121
)

cmd/seed/heartbeat.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"sync"
99
"time"
1010

11-
"github.com/compliance-framework/configuration-service/internal/config"
12-
"github.com/compliance-framework/configuration-service/internal/service"
11+
"github.com/compliance-framework/api/internal/config"
12+
"github.com/compliance-framework/api/internal/service"
1313
"github.com/spf13/cobra"
1414
"go.uber.org/zap"
1515
)

0 commit comments

Comments
 (0)