复制项目

This commit is contained in:
kim.dev.6789
2026-01-14 22:35:45 +08:00
parent 305d526110
commit b7f8db7d08
297 changed files with 81784 additions and 0 deletions

11
pkg/botstruct/check.go Normal file
View File

@@ -0,0 +1,11 @@
package botstruct
import (
"strings"
"git.imall.cloud/openim/chat/pkg/common/constant"
)
func IsAgentUserID(userID string) bool {
return strings.HasPrefix(userID, constant.AgentUserIDPrefix)
}

11
pkg/botstruct/const.go Normal file
View File

@@ -0,0 +1,11 @@
package botstruct
const (
Key = "key"
AgentIDPrefix = "agent_"
)
const (
RoleDeveloper = "developer"
RoleUser = "user"
)

13
pkg/botstruct/msg.go Normal file
View File

@@ -0,0 +1,13 @@
package botstruct
// see openim-sdk-core\sdk_struct\sdk_struct.go
type TextElem struct {
Content string `json:"content"`
}
type AtElem struct {
Text string `mapstructure:"text"`
AtUserList []string `mapstructure:"atUserList" validate:"required,max=1000"`
IsAtSelf bool `mapstructure:"isAtSelf"`
}