62 lines
1.4 KiB
Kotlin
62 lines
1.4 KiB
Kotlin
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()
|
|
))
|
|
}
|
|
}
|
|
}
|