Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BlacklistKeywords = strings.Split(strings.ReplaceAll(string(keywords.Blacklist), "\r", ""), "\n")
Functions ¶
func BotHandler ¶
func BotHandler(w http.ResponseWriter, r *http.Request)
func ChallengeHandler ¶
func ChallengeHandler(w http.ResponseWriter, r *http.Request)
func ContainsAny ¶
func VerifyWebappData ¶
func VerifyWebappData(webappData string, joinData JoinReqData) (isValid bool)
Types ¶
type JoinReqData ¶
type JoinReqData struct { UserID int64 `json:"user_id"` ChatID int64 `json:"chat_id"` Time int64 `json:"time"` Type int `json:"type"` }
func VerifyJWT ¶
func VerifyJWT(tokenString string) (isValid bool, data JoinReqData)
type VerifyResp ¶
type VerifyResp struct { Success bool `json:"success"` ChallengeTs time.Time `json:"challenge_ts"` Hostname string `json:"hostname"` Credit bool `json:"credit"` }
func VerifyReCaptcha ¶
func VerifyReCaptcha(token string) (r VerifyResp)
func VerifyhCaptcha ¶
func VerifyhCaptcha(token string) (r VerifyResp)
Click to show internal directories.
Click to hide internal directories.