Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvancedResponseWriter ¶
type AdvancedResponseWriter struct {
http.ResponseWriter
// contains filtered or unexported fields
}
AdvancedResponseWriter provide method to write response and effective ways to get response with more details
func NewAdvancedResponseWriter ¶
func NewAdvancedResponseWriter(w http.ResponseWriter) *AdvancedResponseWriter
func (AdvancedResponseWriter) Status ¶
func (h AdvancedResponseWriter) Status() int
func (*AdvancedResponseWriter) WriteHeader ¶
func (h *AdvancedResponseWriter) WriteHeader(code int)
type RequestAttributes ¶
type RequestAttributes struct {
ServiceCode string `json:"service_code"`
StatusCode int `json:"status"`
ExecutionTime time.Duration `json:"duration_ms"`
Uri string `json:"uri"`
Query string `json:"query"`
Mapping string `json:"mapping"`
Url string `json:"url"`
Method string `json:"method"`
CallerId string `json:"caller_id"`
DeviceId string `json:"device_id"`
DeviceSessionId string `json:"device_session_id"`
CorrelationId string `json:"correlation_id"`
ClientIpAddress string `json:"client_ip_address"`
UserAgent string `json:"user_agent"`
SecurityAttributes SecurityAttributes `json:"security_attributes"`
}
func GetOrCreateRequestAttributes ¶
func GetOrCreateRequestAttributes(r *http.Request) *RequestAttributes
func GetRequestAttributes ¶
func GetRequestAttributes(ctx context.Context) *RequestAttributes
type SecurityAttributes ¶
type WrappingResponseWriter ¶
type WrappingResponseWriter interface {
Writer() http.ResponseWriter
}
Click to show internal directories.
Click to hide internal directories.