Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthResponse ¶
type AuthResponse struct {
Token string `json:"token"`
}
type Config ¶
type Config struct { // Disabled disables the plugin. Disabled bool `json:"disabled"` // Debug enables debug logging, be prepared for flooding. Debug bool `json:"debug"` // QueueSize defines the size of queue, i.e. the amount of events that are waiting to be submitted to Umami. QueueSize int `json:"queueSize"` // UmamiHost is the URL of the Umami instance. UmamiHost string `json:"umamiHost"` // UmamiToken is an API KEY, which is optional, but either UmamiToken or Websites should be set. UmamiToken string `json:"umamiToken"` // UmamiUsername could be provided as an alternative to UmamiToken, used to retrieve the token. UmamiUsername string `json:"umamiUsername"` // UmamiPassword is required if UmamiUsername is set. UmamiPassword string `json:"umamiPassword"` // UmamiTeamId defines a team, which will be used to retrieve the websites. UmamiTeamId string `json:"umamiTeamId"` // Websites is a map of domain to websiteId, which is required if UmamiToken is not set. // If both UmamiToken and Websites are set, Websites will override/extend domains retrieved from the API. Websites map[string]string `json:"websites"` // CreateNewWebsites when set to true, the plugin will create new websites using API, UmamiToken is required. CreateNewWebsites bool `json:"createNewWebsites"` // TrackErrors defines whether errors (status codes >= 400) should be tracked. TrackErrors bool `json:"trackErrors"` // TrackAllResources defines whether all requests for any resource should be tracked. // By default, only requests that are believed to contain content are tracked. TrackAllResources bool `json:"trackAllResources"` // TrackExtensions defines an alternative list of file extensions that should be tracked. TrackExtensions []string `json:"trackExtensions"` // IgnoreUserAgents is a list of user agents to ignore. IgnoreUserAgents []string `json:"ignoreUserAgents"` // IgnoreURLs is a list of request urls to ignore, each string is converted to RegExp and urls matched against it. IgnoreURLs []string `json:"ignoreURLs"` // IgnoreIPs is a list of IPs or CIDRs to ignore. IgnoreIPs []string `json:"ignoreIPs"` // headerIp Header associated to real IP HeaderIp string `json:"headerIp"` }
Config the plugin configuration.
func CreateConfig ¶
func CreateConfig() *Config
CreateConfig creates the default plugin configuration.
type ResponseWriter ¶ added in v1.2.0
type ResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
ResponseWriter is used to wrap given response writers.
func (*ResponseWriter) Flush ¶ added in v1.2.0
func (rw *ResponseWriter) Flush()
func (*ResponseWriter) Hijack ¶ added in v1.2.0
func (rw *ResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
func (*ResponseWriter) WriteHeader ¶ added in v1.2.0
func (rw *ResponseWriter) WriteHeader(code int)
WriteHeader adds custom handling to the wrapped WriterHeader method.
type SendBody ¶
type SendBody struct { Payload SendPayload `json:"payload"` Type string `json:"type"` }
type SendPayload ¶
type UmamiFeeder ¶
type UmamiFeeder struct {
// contains filtered or unexported fields
}
UmamiFeeder a UmamiFeeder plugin.
func (*UmamiFeeder) ServeHTTP ¶
func (h *UmamiFeeder) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type UmamiPayload ¶ added in v1.2.0
type UmamiPayload struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.