Documentation ¶
Index ¶
Constants ¶
View Source
const ( WHITELIST_IP_SLASH_COMMAND = "/whitelist_ip" STAGING_WHITELIST_IP_SLASH_COMMAND = "/staging_whitelist_ip" WHITELIST_EMAIL_SLASH_COMMAND = "/whitelist_email" STAGING_WHITELIST_EMAIL_SLASH_COMMAND = "/staging_whitelist_email" SECOPS_911_COMMAND = "/secops911" STAGING_SECOPS_911_COMMAND = "/staging_secops911" DEFAULT_EXPIRATION_DURATION = time.Hour * 24 DURATION_DOC = "FoxsecBot uses Go's time.ParseDuration internally " + "with some custom checks. Examples: '72h' or '2h45m'. " + "Valid time units are 'm' and 'h'. If you omit a duration, " + "the default (24 hours) is used. If your duration is under " + "5 minutes, it is increased to 5 minutes. If you do not want the " + "whitelisted IP to expire, put 'never' as the expiration. This " + "will make the expiration duration roughly ten years from now." FOURTEEN_DAYS_AGO = time.Hour * 24 * 14 )
Variables ¶
View Source
var ( DB *common.DBClient ALLOWED_COMMANDS = []string{ WHITELIST_IP_SLASH_COMMAND, STAGING_WHITELIST_IP_SLASH_COMMAND, WHITELIST_EMAIL_SLASH_COMMAND, STAGING_WHITELIST_EMAIL_SLASH_COMMAND, SECOPS_911_COMMAND, STAGING_SECOPS_911_COMMAND, } )
View Source
var ROUGHLY_TEN_YEARS_FROM_NOW = time.Hour * 24 * 30 * 12 * 10
Functions ¶
func InitConfig ¶
func InitConfig()
Types ¶
Click to show internal directories.
Click to hide internal directories.