initial commit
This commit is contained in:
61
src/OutputServiceRDBServer.kt
Normal file
61
src/OutputServiceRDBServer.kt
Normal 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()
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user