UserService

module
v0.0.0-...-1080be4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: Apache-2.0

README

User Service

Go Report Card codecov

ABOUT

This repo contains a go module that exposes a User Microservice using MongoDB as a datastore

Prerequisites
SWAGGER HUB

https://app.swaggerhub.com/apis/jackmcguire1/User-Service/1.0.2

SETUP

setup your mongo connection details in docker-compose.yaml

environment:
    - MONGO_HOST=mongodb+srv://****
    - MONGO_DATABASE=***
    - MONGO_USERS_COLLECTION=users
run the docker-compose stack
docker-compose up -d && docker compose watch
Environment Variables
  • EVENTS_URL - external HTTP endpoint provided by interested services
  • LOG_VERBOSITY - warn | error | info | debug
  • MONGO_HOST - your mongo host url
  • MONGO_DATABASE - your mongo database
  • MONGO_USERS_COLLECTION - your mongo user's collection

REQUIREMENTS

The service must allow you to:

  • add a new User
  • modify an existing User
  • remove a User
  • return a list of the Users, allowing for filtering by certain criteria (e.g. all Users with the country "GB")

The service must include:

  • A sensible storage mechanism for the Users
  • The ability to send events to notify other interested services of changes to User entities

Thanks

This project exists thanks to ME!.

Donations

All donations are appreciated!

Donate

Directories

Path Synopsis
api
cmd
api
dom
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL