PdfToJpeg provides optimal configuration of package size and product count for shipping with RestAPI or Web UI. You can run it locally or as a container.
It has been developed with Domain Driven Design (Hex-Arc) architecture and allows you to be included in the domain and perform external operations in all microservice infrastructures without additional development processes.
Do you want to learn more information about Domain Driven Design and Hex-Arc?
git clone https://github.com/husamettinarabaci/go-pdftojpeg.git
cd go-pdftojpeg
go mod download
Test
go test -v ./...
Usage
You can use with;\
RestAPI\
POST http://localhost:16080/api/converter HTTP/1.1
content-type: application/json
{
"item": 250
}
Local Run
export LOCAL=true && go run cmd/main.go
Docker Build & Run
docker build -t {DOCKER_USERNAME}/{YOUR_REPO} -f script/Dockerfile .
docker tag {DOCKER_USERNAME}/{YOUR_REPO} {DOCKER_USERNAME}/{YOUR_REPO}:latest
docker push {DOCKER_USERNAME}/{YOUR_REPO}:latest
docker run -p 16080:16080 {DOCKER_USERNAME}/{YOUR_REPO}:latest
Kubernetes Deploy
kubectl apply -f script/k8s.yml
Github Actions
Fork the project and create the below secrets in your repo.
DOCKERHUB_USERNAME
DOCKERHUB_TOKEN
Create "release" branch and create a pull request to "release" branch and merge it. Github Actions will build and push docker image to your dockerhub repo.
If you want to trigger DevSecOps action for SAST, you can create a pull request to "devsecops" branch and merge it. Github Actions will run SAST action.