Documentation
¶
Index ¶
Constants ¶
View Source
const ( ContextKeyRequestInfo = common.ContextKeyAPIRequestInfo ContextKeyResponseInfo = common.ContextKeyAPIResponseInfo ContextKeyError = common.ContextKeyAPIError ContextKeyCredential = common.ContextKeyCredential ContextKeySession = common.ContextKeySession ContextKeyTrace = common.ContextKeyTrace ContextKeyDB = common.ContextKeyDB ContextKeyLogger = common.ContextKeyLogger CookiesKeySession = "JSESSIONID" HeaderKeyTrace = "X-TRACE-ID" HeaderKeyFile = "X-FILE-ID" HeaderKeyJob = "X-JOB-ID" HeaderKeySession = "X-SESSION-ID" HeaderKeyAPIToken = "X-API-KEY" HeaderKeyAgentID = "X-AGENT-ID" HeaderKeyClientCert = "X-Ssl-Certificate" // from nginx proxy_set_header $ssl_client_escaped_cert HeaderKeyClientVerify = "X-Ssl-Certificate-Verify" // from nginx proxy_set_header $ssl_client_verify QueryParamSession = "sid" QueryParamJob = "job" LabelKeySession = "session" LabelKeyNamespace = "namespace" LabelKeyUsername = "username" )
View Source
const ( MethodAny = "ANY" MethodWS = "WS" )
View Source
const ErrorSourceUnknown = "Unknown"
Variables ¶
This section is empty.
Functions ¶
func StatusCode ¶
Types ¶
type ClientTLS ¶
type ClientTLS struct {
CertBundle certutil.CertBundle
AuthType tls.ClientAuthType
}
type Endpoint ¶
func NewEndpoint ¶
type ErrorBody ¶
type ErrorBody struct {
Origin error `json:"-"` // keep the original error to trace the stack
Source string `json:"source,omitempty"` // source
Status int `json:"status,omitempty"` // http status code
Code string `json:"code,omitempty"` // customized error code
Kind string `json:"kind,omitempty"` // error category
Message string `json:"message,omitempty"`
Details labels.Set `json:"details,omitempty"`
}
type HandlerGroup ¶
type HandlerKey ¶
HandlerKey uniquely identifies a handler within a server.
func NewHandlerKey ¶ added in v0.3.16
func NewHandlerKey(g *HandlerGroup, h *Handler) HandlerKey
NewHandlerKey creates a HandlerKey from a HandlerGroup and Handler.
func (HandlerKey) String ¶ added in v0.3.16
func (k HandlerKey) String() string
type Middleware ¶
type Middleware interface {
common.Service
Func(echo.HandlerFunc) echo.HandlerFunc
}
type RequestInfo ¶
type RequestInfo struct {
Server string
URI string
Method string
Path string
RawPath string
TraceID string
IP string
StartedAt time.Time
Handler *Handler
HandlerGroup *HandlerGroup
}
func (*RequestInfo) Key ¶
func (s *RequestInfo) Key(prefix string) HandlerKey
type ResponseInfo ¶
type ServerTLS ¶
type ServerTLS struct {
CertBundle certutil.CertBundle
AuthEnabled bool
}
type Stats ¶
type Stats struct {
RequestInfo
ResponseInfo
}
type ThrottleConfig ¶
type WebSocketHandlerFunc ¶ added in v0.3.16
WebSocketHandlerFunc is a handler for WebSocket connections. The server upgrades the HTTP connection and passes the resulting conn. Returning an error closes the connection with an internal error status.
Click to show internal directories.
Click to hide internal directories.