Help us shape the future of Go! Take the 2026 Go Developer Survey

content

package
v2.1.14 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	*context.Context
}

Content 内容安全

func NewContent

func NewContent(ctx *context.Context) *Content

NewContent 内容安全接口

func (*Content) CheckImage

func (content *Content) CheckImage(media string) error

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

func (*Content) CheckText

func (content *Content) CheckText(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