Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ERR_CAPTCHA_SECRET_IS_EMPTY = errors.New("secret: secret is empty") ERR_FAILED_CREATE_REQUEST = errors.New("secret: failed to create http request") ERR_FAILED_FIND_META_DATA_WITH_HEADER_KEY = errors.New("captcha: failed to get metadata from context") ERR_FAILED_FIND_HEADER_IN_META_DATA = errors.New("captcha: failed to find header key in metadata") )
Functions ¶
This section is empty.
Types ¶
type Captcha ¶
type Captcha struct {
// contains filtered or unexported fields
}
func NewCaptcha ¶
func NewCaptcha(googleRecaptchaSecret, cloudflareRecaptchaSecret, hCaptchaSecret, customHeaderKey string) *Captcha
NewCaptcha create captcha object for access to middleware method
func (*Captcha) StreamServerInterceptor ¶
func (c *Captcha) StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor captcha validator for stream server interceptor
func (*Captcha) UnaryServerInterceptor ¶
func (c *Captcha) UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor captcha validator for unary server interceptor
Click to show internal directories.
Click to hide internal directories.