Documentation ¶
Index ¶
- func Debug() func(*Cortexbot) error
- func IsDNSName(str string) bool
- func IsHash(str string) bool
- func SetCortex(client *cortex.Client) func(*Cortexbot) error
- func SetCortexTimeout(t time.Duration) func(*Cortexbot) error
- func SetDBPath(n string) func(*Cortexbot) error
- func SetPAP(pap cortex.PAP) func(*Cortexbot) error
- func SetTLP(tlp cortex.TLP) func(*Cortexbot) error
- func SetupChatbot(token string, client *http.Client) func(*Cortexbot) error
- type Client
- type Cortexbot
- type User
- Bugs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDNSName ¶
IsDNSName is a modified version of function IsDNSName from https://github.com/asaskevich/govalidator/blob/master/patterns.go
func IsHash ¶
IsHash checks if a given string is a hash BUG(ilyaglow): not supported hashes are hashes shorter 32 letters and ssdeep
func SetCortexTimeout ¶ added in v1.0.0
SetCortexTimeout will set the timeout that the client will wait for a response from Cortex at most.
Types ¶
type Client ¶
type Client Cortexbot
Client defines bot's abilities to interact with services. Deprecated: use Cortexbot instead.
type Cortexbot ¶ added in v1.0.0
type Cortexbot struct { Bot *tgbotapi.BotAPI Cortex *cortex.Client Password string DB *sql.DB TLP cortex.TLP PAP cortex.PAP Timeout time.Duration Debug bool // contains filtered or unexported fields }
Cortexbot defines bot's abilities to interact with services.
func NewFromEnv ¶ added in v1.0.0
NewFromEnv bootstraps Cortexbot from environment variables.
func (*Cortexbot) CheckAdmin ¶ added in v1.0.0
CheckAdmin checks if user is an admin.
Notes ¶
Bugs ¶
not supported hashes are hashes shorter 32 letters and ssdeep