anti_spam

package
v0.0.0-...-476b199 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2023 License: LGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AntiSpamReplaceKeywords *[]string

Functions

func Akismet

func Akismet(params *AkismetParams, key string) (isPass bool, err error)

@link https://akismet.com/development/api/#comment-check

func SyncSpamCheck

func SyncSpamCheck(comment *model.Comment, echoCtx echo.Context)

Types

type AkismetParams

type AkismetParams struct {
	Blog      string `name:"blog"`       // required
	UserIP    string `name:"user_ip"`    // required
	UserAgent string `name:"user_agent"` // required

	CommentType        string `name:"comment_type"`
	CommentAuthor      string `name:"comment_author"`
	CommentAuthorEmail string `name:"comment_author_email"`
	CommentAuthorURL   string `name:"comment_author_url"`
	CommentContent     string `name:"comment_content"`

	UserRole    string `name:"user_role"`
	Referrer    string `name:"referrer"`
	Permalink   string `name:"permalink"`
	BlogLang    string `name:"blog_lang"`
	BlogCharset string `name:"blog_charset"`
}

type AliyunParams

type AliyunParams struct {
	AccessKeyID     string
	AccessKeySecret string
	Region          string

	Content   string
	CommentID uint
}

type TencentParams

type TencentParams struct {
	SecretID  string
	SecretKey string
	Region    string

	Content   string
	CommentID uint

	UserName string
	UserID   uint
	UserIP   string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL