package
0.0.0-20240409194056-4ee81b461db4
Repository: https://github.com/kotletta-tt/monogo.git
Documentation: pkg.go.dev
# Functions
CompressMiddleware is a middleware function that compresses the response body if the client supports gzip compression.
GetJSONMetric returns a Gin handler function that retrieves a JSON metric.
GetMetric returns a Gin handler function that retrieves a metric from the specified repository.
HashSignMiddleWare is a middleware function that adds a HMAC hash sign to the request body and verifies it.
ListMetrics returns a function that handles the request to list metrics.
RunServer NewRouter creates a new gin.Engine instance and configures it with the provided repository and config.
NewValidationError creates a new instance of ValidationError.
PingDB returns a function that pings the database and writes the appropriate status code to the response writer.
RequestResponseLogging returns a gin.HandlerFunc that logs the request and response details.
SetBatchJSONMetric returns a Gin handler function that sets a batch of JSON metrics in the repository.
SetJSONMetric returns a function that handles a JSON metric and stores it in the repository.
SetMetric is a function that returns a Gin handler function for setting a metric.
No description provided by the author
ValidateBatchJSON validates and processes a batch of JSON metrics.
ValidateJSON validates the JSON data received in the request body and returns a Metrics object or an error.
ValidateNameTypeParams validates the name and type parameters of the request.
ValidateParams validates the parameters of the given *gin.Context and returns a *common.Metrics object and an error.
ValidateValue validates the value parameter of a metric in a Gin context.
# Structs
No description provided by the author
No description provided by the author