Documentation ¶
Index ¶
Constants ¶
View Source
const Namespace = "github_com/zean00/lognats"
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(logger logging.Logger, config config.ExtraConfig) gin.HandlerFunc
New create middleware
Types ¶
type NatsConfig ¶
type NatsConfig struct { NatsURL string ClusterName string ClientName string EventName string LogPayload bool LogHeader bool // contains filtered or unexported fields }
NatsConfig log nats config
type Payload ¶
type Payload struct { Method string `json:"method,omitempty" mapstructure:"method"` Path string `json:"path,omitempty" mapstructure:"path"` URL string `json:"url,omitempty" mapstructure:"url"` Data interface{} `json:"data,omitempty" mapstructure:"data"` Headers interface{} `json:"headers,omitempty" mapstructure:"headers"` Requestor interface{} `json:"requestor,omitempty" mapstructure:"requestor"` StatusCode int `json:"status_code,omitempty" mapstructure:"status_code"` IPAddress string `json:"ip_address,omitempty" mapstructure:"ip_address"` ForwardedIP string `json:"ip_forwarded,omitempty" mapstructure:"ip_forwarded"` }
Payload message payload
Click to show internal directories.
Click to hide internal directories.