text-event-service

module
v0.0.0-...-760f05f Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: GPL-3.0

README

Text Event Service

Description

This service is responsible for handling text events in Domesticity Smart Home Organizer project.

Getting started
Prerequisites

To build this project locally one have to install:

  • Golang - min. version: 1.15.3
  • MongoDB - min. version: 4.2.0

When using Docker containers then one should install:

  • Docker - min. version: 19.03.13
Running service
  1. clone repository
  2. navigate to services/text-event-service directory
  3. invoke:
    • MongoDB (has to be installed first):
      mongod --bind_ip 0.0.0.0
      
    • build service application:
      make build
      
    • run service application
      ./bin/text-event-service
      
  4. alternatively one can use Docker
    • use standalone Docker image (MongoDB has to be manually installed)
      make docker-build && make docker-run
      
    • or invoke Docker compose
      make docker-up
      
Stopping service

Service can be stopped by using Ctrl + C shortkey.

When using docker one can use below command to stop and clean all downloaded data

make docker-stop && make docker-clean

Alternatively when using docker compose one can stop service with command

make docker-down
Endpoints

All endpoint documentation in more detailed manner is present after hitting /docs endpoint in running service.

  • GET
    • /docs - load detailed documentation
    • /events - read all events
    • /events/{id} - read an event with specified id
  • POST
    • /events - add a new event
  • PUT
    • /events/{id} - update an event with specified id
  • DELETE
    • /events/{id} - delete an event with specified id
Roadmap
  • add swagger documentation
  • host swagger documentation as an service endpoint
  • add filtering to MongoDB dataservice
  • add configuration script support
  • add missing unit tests
  • update home page with basic service information
  • add docker containers and docker compose features
  • think about adding event types to this service (instead of creating new one)
  • configure CI process

Developed with 💗 by PNK @ 2020 🖖

Directories

Path Synopsis
sdk
src
docs
Package docs Domesticity Text Event Service API
Package docs Domesticity Text Event Service API

Jump to

Keyboard shortcuts

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