portal-jabar-services
所属分类:GO语言编程
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2023-10-20 09:15:52
上 传 者:
sh-1993
说明: 门户Jabar服务为西爪哇省政府提供公共服务信息、新闻和信息。,
(Portal Jabar services provides public service information, news, and information for the West Java Provincial Government.,)
文件列表:
LICENSE (1078, 2023-12-18)
core-service/ (0, 2023-12-18)
core-service/.env.example (1031, 2023-12-18)
core-service/Makefile (2404, 2023-12-18)
core-service/captain-definition (68, 2023-12-18)
core-service/docker-compose.yaml (1063, 2023-12-18)
core-service/docker/ (0, 2023-12-18)
core-service/docker/Dockerfile (580, 2023-12-18)
core-service/docker/config/ (0, 2023-12-18)
core-service/docker/config/redis.conf (81476, 2023-12-18)
core-service/src/ (0, 2023-12-18)
core-service/src/cmd/ (0, 2023-12-18)
core-service/src/cmd/main.go (757, 2023-12-18)
core-service/src/cmd/migrater/ (0, 2023-12-18)
core-service/src/cmd/migrater/main.go (21559, 2023-12-18)
core-service/src/cmd/server/ (0, 2023-12-18)
core-service/src/cmd/server/handler.go (8306, 2023-12-18)
core-service/src/cmd/server/repository.go (9981, 2023-12-18)
core-service/src/cmd/server/usecase.go (9394, 2023-12-18)
core-service/src/config/ (0, 2023-12-18)
core-service/src/config/app.go (869, 2023-12-18)
core-service/src/config/aws.go (701, 2023-12-18)
core-service/src/config/config.go (1152, 2023-12-18)
core-service/src/config/cors.go (357, 2023-12-18)
core-service/src/config/db.go (874, 2023-12-18)
core-service/src/config/elastic.go (585, 2023-12-18)
core-service/src/config/external.go (341, 2023-12-18)
core-service/src/config/google.go (451, 2023-12-18)
core-service/src/config/jwt.go (804, 2023-12-18)
core-service/src/config/mail.go (648, 2023-12-18)
... ...
[![Go Report Card](https://goreportcard.com/badge/github.com/jabardigitalservice/portal-jabar-services)](https://goreportcard.com/report/github.com/jabardigitalservice/portal-jabar-services)
[![Maintainability](https://api.codeclimate.com/v1/badges/e1b0eb219c1b35f76491/maintainability)](https://codeclimate.com/github/jabardigitalservice/portal-jabar-services/maintainability)
![ci workflow](https://github.com/jabardigitalservice/portal-jabar-services/actions/workflows/ci.yml/badge.svg)
[![GitHub issues](https://img.shields.io/github/issues/jabardigitalservice/portal-jabar-services)](https://github.com/jabardigitalservice/portal-jabar-services/issues)
[![GitHub stars](https://img.shields.io/github/stars/jabardigitalservice/portal-jabar-services)](https://github.com/jabardigitalservice/portal-jabar-services/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/jabardigitalservice/portal-jabar-services)](https://github.com/jabardigitalservice/portal-jabar-services/network)
# core-service
The core of jabar portal services
## Tech Stacks
- **Golang** -
- **Echo Framework** -
- **Elasticsearch** -
- **MySQL** -
- **Redis** -
- **AWS** -
## Description
This project has 4 Domain layer :
* Domain Layer
* Repository Layer
* Usecase Layer
* Delivery Layer
## Repo Structure core-service
```
├── .github/ * all workflows github actions
└── workflows/
├── docker/
├── src/
└── cmd/ * all the command of app here.
└── config/ * contains config like db, aws, redis, etc.
└── database/ * database migrations etc.
└── domain/ * all the contract, struct, interface etc.
└── helpers/ * contains a helpers function etc.
└── utils/ * contains utilities of email, conn, apm etc.
└── policies/ * policies of authorized user.
└── middleware/ * request's middleware.
└── modules/ * contains modules of application.
└──
└──
└── _handler.go * contains file of delivery handler.
└──
└──
└── _mysql.go * contains file of repository mysql, etc.
└──
└── _ucase.go * contains file of busines logic / usecase.
└── ...
```
### How To Run This Project
Since the project already use Go Module, I recommend to put the source code in any folder but GOPATH.
#### Run the Testing
```bash
$ make test
```
#### Run the Applications
Here is the steps to run it with `docker-compose`
```bash
#move to directory
$ cd workspace
# Clone into YOUR $GOPATH/src
$ git@github.com:jabardigitalservice/portal-jabar-api.git
#move to project
$ cd core-service
# Build the docker image first
$ make docker
# Run the application
$ make run
# check if the containers are running
$ docker ps
# Execute the call
$ curl localhost:7070
# Stop
$ make stop
```
# service-worker
The worker for provided core-service some cron-job process
## Description
Currently this service have 2 jobs :
* Archiving News
* Publishing News
## Repo Structure service-worker
```
├── docker/
├── src/
└── cmd/ * all the command of app here.
└── config/ * contains config like db, aws, redis, etc.
└── job/ * job functions.
└── utils/ * contains utilities of email, conn, apm etc.
```
### How To Run This Project
Since the project already use Go Module, I recommend to put the source code in any folder but GOPATH.
#### Run the Applications
Here is the steps to run it with `docker-compose`
```bash
#move to directory
$ cd workspace
#move to project
$ cd service-worker
# Build the docker image first
$ make docker
# Run the application
$ make run
# Stop
$ make stop
```
近期下载者:
相关文件:
收藏者: