common

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const EmptyURLPath = ""

EmptyURLPath represents the empty URL path.

View Source
const HealthCheckURLPath = "/ping"

HealthCheckURLPath represents the URL path for health check.

View Source
const HttpHeaderContentType = "Content-Type"

HttpHeaderContentType represents the HTTP header key for Content-Type.

View Source
const HttpHeaderJSONContentTypeValue = binding.MIMEJSON

HttpHeaderJSONContentTypeValue represents the value for JSON Content-Type.

View Source
const HttpHeaderJavascriptContentTypeValue = "application/javascript"

HttpHeaderJavascriptContentTypeValue represents the value for JavaScript Content-Type.

View Source
const HttpHeaderPXMLContentTypeValue = binding.MIMEXML2

HttpHeaderPXMLContentTypeValue represents the value for Test XML Content-Type.

View Source
const HttpHeaderRequestID = "X-Request-Id"

HttpHeaderRequestID represents the HTTP header key for Request ID.

View Source
const HttpHeaderTOMLContentTypeValue = binding.MIMETOML

HttpHeaderTOMLContentTypeValue represents the value for TOML Content-Type.

View Source
const HttpHeaderTextContentTypeValue = binding.MIMEPlain

HttpHeaderTextContentTypeValue represents the value for Plain Text Content-Type.

View Source
const HttpHeaderXMLContentTypeValue = binding.MIMEXML

HttpHeaderXMLContentTypeValue represents the value for XML Content-Type.

View Source
const HttpHeaderYAMLContentTypeValue = binding.MIMEYAML

HttpHeaderYAMLContentTypeValue represents the value for YAML Content-Type.

View Source
const OrbitName = "orbit"
View Source
const PprofURLPath = "/debug/pprof"

PprofURLPath represents the URL path for pprof debugging.

View Source
const PromMetricURLPath = "/metrics"

PromMetricURLPath represents the URL path for Prometheus metrics.

View Source
const RequestBodyBufferKey = "REQUEST_BODY_zdiT5HaFaMF7ZfO556rZRYqn"

RequestBodyBufferKey represents the key for request body buffer.

View Source
const RequestErrorCode int64 = 10

RequestErrorCode represents the error code for a request.

View Source
const RequestLoggerKey = "REQUEST_LOGGER_3Z3opcTKBSe2O5yZQnSGD"

RequestLoggerKey represents the key for request logger.

View Source
const RequestOK = "success"

RequestOK represents the success message for a request.

View Source
const RequestOKCode int64 = 0

RequestOKCode represents the success code for a request.

View Source
const ResponseBodyBufferKey = "RESPONSE_BODY_DT6IKLsNULVD3bTgnz1QJbeN"

ResponseBodyBufferKey represents the key for response body buffer.

View Source
const RootURLPath = "/"

RootURLPath represents the root URL path.

View Source
const SwaggerURLPath = "/docs"

SwaggerURLPath represents the URL path for Swagger documentation.

Variables

View Source
var DefaultConsoleLogger = log.NewLogger(nil)

DefaultConsoleLogger is the default console logger.

View Source
var DefaultSugeredLogger = DefaultConsoleLogger.GetZapSugaredLogger().Named(log.DefaultLoggerName)

DefaultSugeredLogger is the default sugared logger.

View Source
var LogEventPool = bp.NewLogEventPool()

LogEventPool is a pool for log events.

View Source
var RequestBodyBufferPool = bp.NewBufferPool(0)

RequestBodyBufferPool is a buffer pool for request bodies.

View Source
var ResponseBodyBufferPool = bp.NewBufferPool(0)

ResponseBodyBufferPool is a buffer pool for response bodies.

Functions

This section is empty.

Types

type LogEventFunc

type LogEventFunc func(logger *zap.SugaredLogger, event *log.LogEvent)

LogEventFunc represents a function for logging events.

Jump to

Keyboard shortcuts

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