Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Client stripe.RequestPerformer
// DeviceName is the name of the device sent to Stripe to help identify the device
DeviceName string
// Filters for API request logs
Filters *LogFilters
// Info, error, etc. logger. Unrelated to API request logs.
Log *log.Logger
// Force use of unencrypted ws:// protocol instead of wss://
NoWSS bool
// OutCh is the channel to send logs and statuses to for processing in other packages
OutCh chan websocket.IElement
}
Config provides the configuration of a log tailer
type EventPayload ¶
type EventPayload struct {
CreatedAt int `json:"created_at"`
Livemode bool `json:"livemode"`
Method string `json:"method"`
RequestID string `json:"request_id"`
Status int `json:"status"`
URL string `json:"url"`
Error RedactedError `json:"error"`
}
EventPayload is the mapping for fields in event payloads from request log tailing
type LogFilters ¶
type LogFilters struct {
FilterAccount []string `json:"filter_account,omitempty"`
FilterIPAddress []string `json:"filter_ip_address,omitempty"`
FilterHTTPMethod []string `json:"filter_http_method,omitempty"`
FilterRequestPath []string `json:"filter_request_path,omitempty"`
FilterRequestStatus []string `json:"filter_request_status,omitempty"`
FilterSource []string `json:"filter_source,omitempty"`
FilterStatusCode []string `json:"filter_status_code,omitempty"`
FilterStatusCodeType []string `json:"filter_status_code_type,omitempty"`
}
LogFilters contains all of the potential user-provided filters for log tailing
type RedactedError ¶ added in v0.6.11
type RedactedError struct {
Type string `json:"type"`
Charge string `json:"charge"`
Code string `json:"code"`
DeclineCode string `json:"decline_code"`
Message string `json:"message"`
Param string `json:"param"`
ErrorInsight string `json:"error_insight"`
}
RedactedError is the mapping for fields in error from an EventPayload
Click to show internal directories.
Click to hide internal directories.