Documentation
¶
Index ¶
- func RestCheckNs(c echo.Context) error
- func RestDelAllConfig(c echo.Context) error
- func RestDelAllNs(c echo.Context) error
- func RestDelNs(c echo.Context) error
- func RestDeleteObject(c echo.Context) error
- func RestDeleteObjects(c echo.Context) error
- func RestGetAllConfig(c echo.Context) error
- func RestGetAllNs(c echo.Context) error
- func RestGetConfig(c echo.Context) error
- func RestGetConnConfig(c echo.Context) error
- func RestGetConnConfigList(c echo.Context) error
- func RestGetHealth(c echo.Context) error
- func RestGetNs(c echo.Context) error
- func RestGetObject(c echo.Context) error
- func RestGetObjects(c echo.Context) error
- func RestGetRegion(c echo.Context) error
- func RestGetRegionList(c echo.Context) error
- func RestPostConfig(c echo.Context) error
- func RestPostNs(c echo.Context) error
- func RestPutNs(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 ObjectList
- type RestGetAllConfigResponse
- type RestGetAllNsResponse
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RestCheckNs ¶
func RestDelAllConfig ¶
RestDelAllConfig godoc @Summary Delete all configs @Description Delete all configs @Tags Config @Accept json @Produce json @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /config [delete]
func RestDelAllNs ¶
RestDelAllNs godoc @Summary Delete all namespaces @Description Delete all namespaces @Tags Namespace @Accept json @Produce json @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns [delete]
func RestDelNs ¶
RestDelNs godoc @Summary Delete namespace @Description Delete namespace @Tags Namespace @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Router /ns/{nsId} [delete]
func RestDeleteObject ¶ added in v0.3.3
func RestDeleteObject is a rest api wrapper for DeleteObject. RestDeleteObject godoc @Summary Delete an object @Description Delete an object @Tags Admin @Accept json @Produce json @Param key query string true "delete object value by key" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /object [delete]
func RestDeleteObjects ¶ added in v0.3.3
func RestDeleteObjects is a rest api wrapper for DeleteObjects. RestDeleteObjects godoc @Summary Delete child objects along with the given object @Description Delete child objects along with the given object @Tags Admin @Accept json @Produce json @Param key query string true "Delete child objects based on the given key string" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /objects [delete]
func RestGetAllConfig ¶
RestGetAllConfig godoc @Summary List all configs @Description List all configs @Tags Config @Accept json @Produce json @Success 200 {object} RestGetAllConfigResponse @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /config [get]
func RestGetAllNs ¶
RestGetAllNs godoc @Summary List all namespaces @Description List all namespaces @Tags Namespace @Accept json @Produce json @Success 200 {object} RestGetAllNsResponse @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns [get]
func RestGetConfig ¶
RestGetConfig godoc @Summary Get config @Description Get config @Tags Config @Accept json @Produce json @Param configId path string true "Config ID" @Success 200 {object} common.ConfigInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /config/{configId} [get]
func RestGetConnConfig ¶
func RestGetConnConfigList ¶
func RestGetHealth ¶
func RestGetNs ¶
RestGetNs godoc @Summary Get namespace @Description Get namespace @Tags Namespace @Accept json @Produce json @Param nsId path string true "Namespace ID" @Success 200 {object} common.NsInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /ns/{nsId} [get]
func RestGetObject ¶ added in v0.3.3
func RestGetObject is a rest api wrapper for GetObject. RestGetObject godoc @Summary Get value of an object @Description Get value of an object @Tags Admin @Accept json @Produce json @Param key query string true "get object value by key" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /object [get]
func RestGetObjects ¶ added in v0.3.3
func RestGetObjects is a rest api wrapper for GetObjectList. RestGetObjects godoc @Summary List all objects for a given key @Description List all objects for a given key @Tags Admin @Accept json @Produce json @Param key query string true "retrieve objects by key" @Success 200 {object} common.SimpleMsg @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /objects [get]
func RestGetRegion ¶
func RestGetRegionList ¶
func RestPostConfig ¶
RestPostConfig godoc @Summary Create or Update config @Description Create or Update config (SPIDER_REST_URL, DRAGONFLY_REST_URL, ...) @Tags Config @Accept json @Produce json @Param config body common.ConfigInfo true "Key and Value for configuration" @Success 200 {object} common.ConfigInfo @Failure 404 {object} common.SimpleMsg @Failure 500 {object} common.SimpleMsg @Router /config [post]
func RestPostNs ¶
RestPostNs godoc @Summary Create namespace @Description Create namespace @Tags Namespace @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]
func RestPutNs ¶
function RestPutNs not yet implemented
// RestPutNs godoc // @Summary Update namespace // @Description Update namespace // @Tags Namespace // @Accept json // @Produce json // @Param namespace body common.NsInfo true "Details to update existing namespace" // @Success 200 {object} common.NsInfo // @Failure 404 {object} common.SimpleMsg // @Failure 500 {object} common.SimpleMsg // @Router /ns/{nsId} [put]
Types ¶
type ObjectList ¶ added in v0.3.3
type ObjectList struct {
Object []string `json:"object"`
}
ObjectList struct consists of object IDs
type RestGetAllConfigResponse ¶
type RestGetAllConfigResponse struct {
//Name string `json:"name"`
Config []common.ConfigInfo `json:"config"`
}
Response structure for RestGetAllConfig
type RestGetAllNsResponse ¶
Response structure for RestGetAllNs