Sign inSign up

ctfl/moc

By ctfl

•Updated over 7 years ago

Message Operation Center

Image
0

951

ctfl/moc repository overview

⁠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

Tag summary

Content type

Image

Digest

Size

15.9 MB

Last updated

over 7 years ago

docker pull ctfl/moc