This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| // Name of the struct tag used in examples | |
| const tagName = "validate" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Chain INPUT (policy DROP) | |
| target prot opt source destination | |
| ufw-before-logging-input all -- anywhere anywhere | |
| ufw-before-input all -- anywhere anywhere | |
| ufw-after-input all -- anywhere anywhere | |
| ufw-after-logging-input all -- anywhere anywhere | |
| ufw-reject-input all -- anywhere anywhere | |
| ufw-track-input all -- anywhere anywhere | |
| Chain FORWARD (policy DROP) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "json" | |
| require "digest" | |
| require "logger" | |
| class SlowQueryLogger | |
| def initialize(output = nil, opts = {}) | |
| # will log any query slower than 500 ms | |
| @threshold = opts.fetch(:threshold, "500").to_i | |
| @logger = Logger.new(output || STDOUT) |
OlderNewer