Skip to content

promptlabth/ms-payments

Repository files navigation

MS-Payments Promptlab AI

The MS-Payments Service is a microservice designed to handle payment transactions. Written in Go, this service utilizes the Gin framework and adheres to the principles of clean architecture.

Features

  • Accept and process payment transactions
  • Maintain payment history and records
  • Support multiple payment methods

Installation

1. Clone the Repository

git clone https://github.com/promptlabth/ms-payments.git
cd ms-payments

2. Install Dependencies

go mod tidy

3. Build

go build -o ms-payments

Running Locally

1. Start the Service

./ms-payments

2. Health Check

To verify the service is running smoothly, navigate to the /health endpoint.

Testing

To run unit tests, execute:

go test ./...

Swaggle

http://localhost:8080/docs/index.html

in this code will split to 5 part of the code

  1. entities it will be create a entity and struct for the code
  2. repositories it will be for manage a database of the struct => select, insert, update, delete etc.
  3. usecases it will contain a business usecase of the repository => before select should do something ? before insert should before do some thing ?
  4. controllers it will be for validate a data and prepare a data before send a data to business usecase
  5. routes is for define a routing url

Note Deployment

LOCAL state : state Local Development

DEV state: state Dev on cloud Dev Mode [EX: Test on Cloud run]

STATING state : state same in prod mode but not release [Ex: Test Delopyment but not release]

PROD state: State Release on Production

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages