Gestionnaire de jobs et workflows
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dune/internal/api/api.go

38 lines
972 B

/*
------------------------------------------------------------------------------------------------------------------------
####### dune ####### Copyright (c) 2021 losyme ##################################################### MIT License #######
------------------------------------------------------------------------------------------------------------------------
*/
package api
import (
"net/http"
"forge.chapril.org/eckmuhl/context"
"forge.chapril.org/eckmuhl/router"
"forge.chapril.org/dune/dune/internal/components"
)
type api struct {
cs *components.Components
}
func (api *api) status(c *context.Context) error {
c.Response.WriteHeader(http.StatusOK)
return nil
}
func Setup(cs *components.Components) {
api := &api{cs}
cs.Router.Group("/api", func(g *router.Group) {
// status
g.Get("/status", api.status)
})
}
/*
######################################################################################################## @(°_°)@ #######
*/