Documentation
¶
Overview ¶
Package common is to handle REST API for common funcitonalities
Package common is to handle REST API for common funcitonalities ¶
Package common is to handle REST API for common funcitonalities
Index ¶
- func RestCheckHTTPVersion(c echo.Context) error
- func RestDeleteNs(c echo.Context) error
- func RestGetAllNs(c echo.Context) error
- func RestGetNs(c echo.Context) error
- func RestGetReadyz(c echo.Context) error
- func RestPostNs(c echo.Context) error
- func Send(c echo.Context, httpCode int, json interface{}) error
- func SendExistence(c echo.Context, httpCode int, existence bool) error
- func SendMessage(c echo.Context, httpCode int, msg string) error
- func Validate(c echo.Context, params []string) error
- type Existence
- type JSONResult
- type Status
- type TbConnectionName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RestCheckHTTPVersion ¶
RestCheckHTTPVersion godoc @Summary Check HTTP version of incoming request @Description Checks and logs the HTTP version of the incoming request to the server console. @Tags [Admin] System management @Accept json @Produce json @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /httpVersion [get]
func RestDeleteNs ¶ added in v0.1.1
RestDeleteNs godoc @Summary Delete namespace @Description Delete namespace @Tags [Namespace] Namespace management (To be used) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId} [delete]
func RestGetAllNs ¶
RestGetAllNs godoc @Summary List all namespaces or namespaces' ID @Description List all namespaces or namespaces' ID @Tags [Namespace] Namespace management (To be used) @Accept json @Produce json @Success 200 {object} JSONResult{[DEFAULT]=RestGetAllNsResponse,[ID]=common.IdList} "Different return structures by the given option param" @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns [get]
func RestGetNs ¶
RestGetNs godoc @Summary Get namespace @Description Get namespace @Tags [Namespace] Namespace management (To be used) @Accept json @Produce json @Param nsId path string true "Namespace ID" default(ns01) @Success 200 {object} common.NsInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId} [get]
func RestGetReadyz ¶ added in v0.1.1
RestGetReadyz func check if CM-Beetle server is ready or not. RestGetReadyz godoc @Summary Check Beetle is ready @Description Check Beetle is ready @Tags [Admin] System management @Accept json @Produce json @Success 200 {object} common.SimpleMsg @Failure 503 {object} common.SimpleMsg @Router /readyz [get]
func RestPostNs ¶
RestPostNs godoc @Summary Create namespace @Description Create namespace @Tags [Namespace] Namespace management (To be used) @Accept json @Produce json @Param nsReq body common.NsReq true "Details for a new namespace" @Success 200 {object} common.NsInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns [post]
Types ¶
type JSONResult ¶
type JSONResult struct {
}
JSONResult's data field will be overridden by the specific type
type TbConnectionName ¶
type TbConnectionName struct {
ConnectionName string `json:"connectionName"`
}