content

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	*context2.Context
}

Content 内容安全

func NewContent

func NewContent(ctx *context2.Context) *Content

NewContent 内容安全接口

func (*Content) CheckImage

func (content *Content) CheckImage(ctx context.Context, media string) error

CheckImage 检测图片 所传参数为要检测的图片文件的绝对路径,图片格式支持PNG、JPEG、JPG、GIF, 像素不超过 750 x 1334,同时文件大小以不超过 300K 为宜,否则可能报错 @media 图片文件的绝对路径 Deprecated 采用 security.ImageCheckV1 替代,返回值更加丰富

func (*Content) CheckText

func (content *Content) CheckText(ctx context.Context, text string) error

CheckText 检测文字 @text 需要检测的文字 Deprecated 采用 security.MsgCheckV1 替代,返回值更加丰富

Jump to

Keyboard shortcuts

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