malscan/rest.go
Yvan Janssens db7740c685
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Stub malscan API service
2023-04-07 13:57:58 +02:00

34 lines
660 B
Go

package main
import "github.com/gin-gonic/gin"
type status_response struct {
cvdVersion int `json:"cvd_version"`
sanity_check bool `json:"sanity_check"`
scanning_engine string `json:"scanning_engine"`
}
type scan_response struct {
malware_detected bool `json:"malware_detected"`
malware_name string `json:"malware_name"`
engine status_response `json:"engine"`
}
func scan_api(c *gin.Context) {
}
func status_api(c *gin.Context) {
}
func start_api() {
//gin.SetMode(gin.ReleaseMode)
router := gin.Default()
router.PUT("/scan", scan_api)
router.GET("/status", status_api)
router.Run(":8080")
}