common

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package common is to handle REST API for common funcitonalities

Package common is to handle REST API for common funcitonalities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckHTTPVersion added in v0.2.2

func CheckHTTPVersion(c echo.Context) error

CheckHTTPVersion godoc @ID CheckHTTPVersion @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 @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {object} SimpleMessage @Failure 404 {object} SimpleMessage @Failure 500 {object} SimpleMessage @Router /httpVersion [get]

func GetReadyz added in v0.2.2

func GetReadyz(c echo.Context) error

GetReadyz godoc @ID GetReadyz @Summary Check Beetle is ready @Description Check Beetle is ready @Tags [Admin] System management @Accept json @Produce json @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {object} SimpleMessage @Failure 503 {object} SimpleMessage @Router /readyz [get]

func Send

func Send(c echo.Context, httpCode int, json interface{}) error

func SendExistence

func SendExistence(c echo.Context, httpCode int, existence bool) error

func SendMessage

func SendMessage(c echo.Context, httpCode int, msg string) error

func TestTracing added in v0.2.2

func TestTracing(c echo.Context) error

TestTracing godoc @ID TestTracing @Summary Test tracing to Tumblebug @Description Test tracing to Tumblebug @Tags [Test] Utility @Accept json @Produce json @Param X-Request-Id header string false "Custom request ID (NOTE: It will be used as a trace ID.)" @Success 200 {object} SimpleMessage @Failure 503 {object} SimpleMessage @Router /test/tracing [get]

func Validate

func Validate(c echo.Context, params []string) error

Types

type Existence

type Existence struct {
	Exists bool `json:"exists"`
}

type SimpleMessage added in v0.2.1

type SimpleMessage struct {
	common.SimpleMsg
}

type Status

type Status struct {
	Message string `json:"message"`
}

type TbConnectionName

type TbConnectionName struct {
	ConnectionName string `json:"connectionName"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL