Documentation ¶
Index ¶
- Constants
- func EchoBind(c echo.Context, req interface{}, contextList []string)
- func EchoGatewayLogger(c echo.Context, funcName string)
- func EchoGatewayLoggerV2(c echo.Context, funcName string, reqMap map[string]interface{})
- func GatewayLogger(c *gin.Context, funcName string)
- func GetRequest(c *gin.Context, reqMap map[string]interface{}, getMethodVarNames []string)
- func LineOABoardcastMessages(channelAccessToken string, message []string)
- func ReturnServiceError() []byte
- func ReturnValidationError() []byte
- func SendResponse(success bool, message *string, data interface{}) []byte
- func SendResponseV2(success bool, message *string, data interface{}, errors []string, ...) []byte
- func SendResponseV3(success bool, message *string, data interface{}, errors []string, ...) []byte
- func ServiceCommunicator(dataMap map[string]interface{}, serviceName string, topicName string, ...) (map[string]interface{}, bool)
- func ServiceCommunicatorV2(dataMap map[string]interface{}, serviceName string, topicName string, ...) (map[string]interface{}, bool)
- func SetResponseLogger(printStatus bool)
- func SetResponseLoggerLimit(limit uint32)
- func TypeValidator(varType int, dataMap map[string]interface{}, varNames []string) bool
Constants ¶
const ( // NoPrint : Setting to no print type NoPrint = false // Print : Setting to print type Print = true )
const ( // StringType : string type symbol StringType = 1 // IntType : int type symbol IntType = 2 // Int8Type : int8 type symbol Int8Type = 3 // Int16Type : int16 type symbol Int16Type = 4 // Int32Type : int32 type symbol Int32Type = 5 // Int64Type : int64 type symbol Int64Type = 6 // UIntType : uint type symbol UIntType = 7 // UInt8Type : uint8 type symbol UInt8Type = 8 // UInt16Type : uint16 type symbol UInt16Type = 9 // UInt32Type : uint32 type symbol UInt32Type = 10 // UInt64Type : uint64 type symbol UInt64Type = 11 // Float32Type : float32 type symbol Float32Type = 12 // Float64Type : float64 type symbol Float64Type = 13 // ObjectType : map[string]interface{} type symbol ObjectType = 14 // ArrayType : []interface{} type symbol ArrayType = 15 // ArrayObjectType : []map[string]interface{} type symbol ArrayObjectType = 16 // BooleanType : bool type symbol BooleanType = 17 )
Variables ¶
This section is empty.
Functions ¶
func EchoBind ¶
func EchoBind(c echo.Context, req interface{}, contextList []string)
EchoBind : Bind all request payload and addition data in echo context
func EchoGatewayLogger ¶
func EchoGatewayLogger(c echo.Context, funcName string)
EchoGatewayLogger : Gateway log with physical path, function name, client IP and request time for echo library
func EchoGatewayLoggerV2 ¶
EchoGatewayLoggerV2 : Gateway log with physical path, function name, client IP, request time and request payload for echo library
func GatewayLogger ¶
GatewayLogger : Gateway log with physical path, function name, client IP and request timefor gin-gonic library
func GetRequest ¶
GetRequest : Get payload request of all request method
func LineOABoardcastMessages ¶
func ReturnServiceError ¶
func ReturnServiceError() []byte
ReturnServiceError : Return error response when somethong wrong about service communication
func ReturnValidationError ¶
func ReturnValidationError() []byte
ReturnValidationError : Return error response when something wrong about validate variable
func SendResponse ¶
SendResponse : Standard response form in my projects
func SendResponseV2 ¶
func SendResponseV2(success bool, message *string, data interface{}, errors []string, pages *uint32) []byte
SendResponseV2 : Standard response form in my projects - add errors, pages key
func SendResponseV3 ¶
func SendResponseV3(success bool, message *string, data interface{}, errors []string, custom map[string]interface{}) []byte
SendResponseV3 : Standard response form in my projects - update can customize response key-value with map
func ServiceCommunicator ¶
func ServiceCommunicator(dataMap map[string]interface{}, serviceName string, topicName string, data amqp.Delivery, clientRPC func([]byte, string, string, string) []byte) (map[string]interface{}, bool)
ServiceCommunicator : Service communicator function for rabbitmq
func ServiceCommunicatorV2 ¶
func ServiceCommunicatorV2(dataMap map[string]interface{}, serviceName string, topicName string, data amqp.Delivery, clientRPC func([]byte, string, string, amqp.Delivery) []byte) (map[string]interface{}, bool)
ServiceCommunicatorV2 : Service communicator with tracing function for rabbitmq
func SetResponseLogger ¶
func SetResponseLogger(printStatus bool)
SetResponseLogger : Set logger status to print or no print in SendResponse function
func SetResponseLoggerLimit ¶
func SetResponseLoggerLimit(limit uint32)
SetResponseLogger : Set maximum text length of log printer
Types ¶
This section is empty.