Documentation ¶
Index ¶
Constants ¶
View Source
const ( RECAPTCHA_SECRET_KEY string = "RECAPTCHA_SECRET_KEY" RECAPTCHA_THRESHOLD string = "RECAPTCHA_THRESHOLD" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recaptcha ¶
type Recaptcha struct {
// contains filtered or unexported fields
}
func NewRecaptcha ¶
func NewRecaptcha(httpExecutor u_http_client.HttpExecutor) (*Recaptcha, error)
type SiteVerifyResponse ¶
type SiteVerifyResponse struct { Success bool `json:"success"` Score float64 `json:"score"` Action string `json:"action"` ChallengeTS time.Time `json:"challenge_ts"` Hostname string `json:"hostname"` ErrorCodes []string `json:"error-codes"` }
func (SiteVerifyResponse) Validate ¶
func (res SiteVerifyResponse) Validate(threshold float64) error
Click to show internal directories.
Click to hide internal directories.