api

package
v0.0.0-...-c5df17d Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupRouter

func SetupRouter(router *gin.Engine)

SetupRouter 设置API路由

Types

type CheckRequest

type CheckRequest struct {
	Content     string            `json:"content" binding:"required"`
	ContentType model.ContentType `json:"content_type" binding:"required"`
}

CheckRequest 检查请求

type ConfigRequest

type ConfigRequest struct {
	Level filter.FilterLevel `json:"level" binding:"required"`
}

ConfigRequest 配置请求

type ContentFilterHandler

type ContentFilterHandler struct {
	// contains filtered or unexported fields
}

ContentFilterHandler 内容过滤处理器

func NewContentFilterHandler

func NewContentFilterHandler() *ContentFilterHandler

NewContentFilterHandler 创建新的内容过滤处理器

func (*ContentFilterHandler) AddPattern

func (h *ContentFilterHandler) AddPattern(c *gin.Context)

AddPattern 添加正则表达式模式

func (*ContentFilterHandler) CheckContent

func (h *ContentFilterHandler) CheckContent(c *gin.Context)

CheckContent 检查内容

func (*ContentFilterHandler) RegisterRoutes

func (h *ContentFilterHandler) RegisterRoutes(router *gin.Engine)

RegisterRoutes 注册路由

func (*ContentFilterHandler) UpdateConfig

func (h *ContentFilterHandler) UpdateConfig(c *gin.Context)

UpdateConfig 更新配置

func (*ContentFilterHandler) UpdateSensitiveWords

func (h *ContentFilterHandler) UpdateSensitiveWords(c *gin.Context)

UpdateSensitiveWords 更新敏感词列表

type MatchingHandler

type MatchingHandler struct {
	// contains filtered or unexported fields
}

func NewMatchingHandler

func NewMatchingHandler() *MatchingHandler

func (*MatchingHandler) GetRecommendations

func (h *MatchingHandler) GetRecommendations(c *gin.Context)

GetRecommendations 获取推荐匹配

func (*MatchingHandler) GetUserProfile

func (h *MatchingHandler) GetUserProfile(c *gin.Context)

GetUserProfile 获取用户画像

func (*MatchingHandler) RegisterRoutes

func (h *MatchingHandler) RegisterRoutes(router *gin.Engine)

RegisterRoutes 注册路由

func (*MatchingHandler) UpdateUserProfile

func (h *MatchingHandler) UpdateUserProfile(c *gin.Context)

UpdateUserProfile 更新用户画像

type PatternRequest

type PatternRequest struct {
	Pattern string `json:"pattern" binding:"required"`
}

PatternRequest 正则表达式模式请求

type SensitiveWordsRequest

type SensitiveWordsRequest struct {
	Words []string `json:"words" binding:"required"`
}

SensitiveWordsRequest 敏感词请求

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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