initial commit

This commit is contained in:
2020-04-04 18:47:24 +02:00
commit 97b5923c1e
22 changed files with 1333 additions and 0 deletions

View File

@ -0,0 +1,61 @@
package com.kmalbz
import io.ktor.application.*
import io.ktor.response.*
import io.ktor.routing.*
import java.util.*
import io.ktor.swagger.experimental.*
import io.ktor.auth.*
import io.ktor.http.*
/**
* Output Service - RDB
*
* This is the output interface of the Birbnetes system.
*/
class OutputServiceRDBServer() {
/**
* output
*/
fun Routing.registerOutput() {
get("/output/filter/negative") {
if (false) httpException(HttpStatusCode.NotFound)
call.respond(listOf())
}
get("/output/filter/positive") {
if (false) httpException(HttpStatusCode.NotFound)
call.respond(listOf())
}
get("/output/after/{dateAfter}") {
val dateAfter = call.getPath<Date>("dateAfter")
if (false) httpException(HttpStatusCode.NotFound)
call.respond(listOf())
}
get("/output/before/{dateBefore}") {
val dateBefore = call.getPath<Date>("dateBefore")
if (false) httpException(HttpStatusCode.NotFound)
call.respond(listOf())
}
get("/output/{tagID}") {
val tagID = call.getPath<Int>("tagID")
if (false) httpException(HttpStatusCode.NotFound)
call.respond(OutputObject(
tag = "tag",
decison = false,
date = Date()
))
}
}
}