moc

command module
v0.0.0-...-1a3755f Latest Latest
Warning

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

Go to latest
Published: May 7, 2019 License: MIT Imports: 3 Imported by: 0

README

moc

The Message Operation Center stores messages up to 160 characters long and delivers them to "clients" who deliver them to subscribers via services such as Twitter, IRC or e-mail.

API

The complete API specifications are documented in the swagger.yaml. This can also be used to generate a client SDK with swagger. A simple import into Postman is also possible.

# Get messages

curl https://moc.example.com/messages
# Add message

curl -X POST \
	--header "Authorization: Bearer <operatorToken>" \
	--header "Content-Type: application/json" \
	--data '{"message": "Meine Nachricht"}' \
	https://moc.example.com/messages

Configuration

SQLite3 Config
DATABASE_DRIVER=sqlite3
DATABASE_PATH=test.sqlite3
Operator Token
OPERATOR_TOKEN=1234

The shared secret with an operator for this microservice. Used to verify requests have been proxied through the operator and the payload values can be trusted.

Usage

moc --migrate --seed

Docker Compose

version: '3'
services:
  moc:
    image: ctfl/moc
    env_file:
      - .env
    ports:
      - 80:80

ToDo:

  • Get Limit Messages & start date
  • Prometheus Endpunkt

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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