2022-06-08 14:05:52 +00:00
|
|
|
package types
|
|
|
|
|
|
|
|
const ApiKeyAuthType = "api-key"
|
|
|
|
const TlsAuthType = "tls"
|
|
|
|
const PasswordAuthType = "password"
|
2023-01-31 13:47:44 +00:00
|
|
|
|
2023-03-03 12:46:28 +00:00
|
|
|
const PAPIBaseURL = "https://papi.api.crowdsec.net/"
|
|
|
|
const PAPIVersion = "v1"
|
|
|
|
const PAPIPollUrl = "/decisions/stream/poll"
|
|
|
|
const PAPIPermissionsUrl = "/permissions"
|
|
|
|
|
2023-01-31 13:47:44 +00:00
|
|
|
const CAPIBaseURL = "https://api.crowdsec.net/"
|
|
|
|
|
|
|
|
const CscliOrigin = "cscli"
|
|
|
|
const CrowdSecOrigin = "crowdsec"
|
|
|
|
const ConsoleOrigin = "console"
|
|
|
|
const CscliImportOrigin = "cscli-import"
|
|
|
|
const ListOrigin = "lists"
|
|
|
|
const CAPIOrigin = "CAPI"
|
2023-09-20 09:56:00 +00:00
|
|
|
const CommunityBlocklistPullSourceScope = "crowdsecurity/community-blocklist"
|
2023-01-31 13:47:44 +00:00
|
|
|
|
2023-02-06 13:06:14 +00:00
|
|
|
const DecisionTypeBan = "ban"
|
|
|
|
|
2023-01-31 13:47:44 +00:00
|
|
|
func GetOrigins() []string {
|
|
|
|
return []string{
|
|
|
|
CscliOrigin,
|
|
|
|
CrowdSecOrigin,
|
|
|
|
ConsoleOrigin,
|
|
|
|
CscliImportOrigin,
|
|
|
|
ListOrigin,
|
|
|
|
CAPIOrigin,
|
|
|
|
}
|
|
|
|
}
|
2023-03-16 15:25:50 +00:00
|
|
|
|
|
|
|
// Leakybucket can be in mode LIVE or TIMEMACHINE
|
|
|
|
const (
|
|
|
|
LIVE = iota
|
|
|
|
TIMEMACHINE
|
|
|
|
)
|