Skip to content

A golang microservice to interact with redis messaging queue and SFTP server

Notifications You must be signed in to change notification settings

jiteshchawla1511/go-redis-messaging-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Go-redis-messaging-api

A Go lang microservice to interact with redis messaging queue and SFTP server

Prerequisites

  • Go installed on your system.
  • A running Redis instance.
  • A running SFTP instance
  • AWS SNS Service

Installation

  1. Clone the repository:

    git clone https://github.com/jiteshchawla1511/go-redis-messaging-api.git
  2. Navigate to the project directory:

    cd go-redis-messaging-api
  3. Install the necessary dependencies:

    go mod download
  4. Run the Redis Server

    redis-server
  5. Run the SFTP Docker file (using Docker App or terminal)

    docker run -p 22:22 -d atmoz/sftp foo:pass:::upload
  6. Run the main file

  1. Terminal 1
cd go-redis-publisher
go run main.go
  1. Terminal 2
cd go-redis-sftp-sync
go run main.go

API Endpoints

POST : "http://localhost:3000/submit"

JSON DATA FORMAT

  type User struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Age      int64  `json:"age"`
	Location string `json:"location"`
}

Example

{
  "name": "John Doe",
  "email": "[email protected]",
  "age": 30,
  "location": "New York"
}

ENV FILE

SFTP_USER=

SFTP_PASSWORD=

SFTP_HOST=localhost

REDIS_ADDR=localhost:6379

SMTP_FROM=

SMTP_PASS=

SMTP_HOST=

SMTP_PORT=587

SNS_ARN=

AWS_REGION=

END VERDICT

You will recieve the data from your api to your email or phone number whichever you have configured in your aws sns service

Thankyou 😄

About

A golang microservice to interact with redis messaging queue and SFTP server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages