apis

package
v0.0.0-...-b925956 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CODEMAP map[string]string = map[string]string{
		"000000": "",
		"100001": "my_id is empty",
		"100003": "log_serial_no invaild",
		"100007": "robot_serial_no is empty",
	}
	AmrConvertServer string = "http://127.0.0.1:8299"
	ChatBotClient    *chatbot.Client
	MessagePublisher *rmqtool.PublisherTool
)
View Source
var (
	DB                        *gorm.DB              //数据库
	Logger                    *zap.Logger           //日志
	Client                    *uchatlib.UchatClient //uchat客户端
	Tool                      *utils.ReceiveTool
	DefaultApplyCodeAddMinute string = "10" //默认验证码有效时间
)

Functions

func AmrConver

func AmrConver(ctx echo.Context) error

func ApplyChatRoomQrCode

func ApplyChatRoomQrCode(ctx echo.Context) error

func ApplyCode

func ApplyCode(ctx echo.Context) error

RUSTAPI ApplyCode

`curl -vvv "http://host:prot/applycode" -X POST -d "my_id=xxx&sub_id=xxx"`

func ApplyWorkTemplate

func ApplyWorkTemplate(ctx echo.Context) error

func ChatRoomKicking

func ChatRoomKicking(ctx echo.Context) error

func ChatRoomMemberJoinWelcome

func ChatRoomMemberJoinWelcome(ctx echo.Context) error

func CmdTypeList

func CmdTypeList(ctx echo.Context) error

func CreateWorkTemplate

func CreateWorkTemplate(ctx echo.Context) error

func DeleteRobotJoin

func DeleteRobotJoin(ctx echo.Context) error

func EnusreWorkTemplateRule

func EnusreWorkTemplateRule(work *models.WorkTemplate)

func FetchApplyCode

func FetchApplyCode(db *gorm.DB, myId, subId, robotSerialNo, limit string) (*models.RobotApplyCode, error)

获取验证码

func GetChatRoomInfo

func GetChatRoomInfo(ctx echo.Context) error

func GetChatRoomTag

func GetChatRoomTag(ctx echo.Context) error

func GetChatRoomTemplates

func GetChatRoomTemplates(ctx echo.Context) error

func GetRobotJoinList

func GetRobotJoinList(ctx echo.Context) error

func GetValidRobot

func GetValidRobot(ctx echo.Context) error

func OpenChatRoom

func OpenChatRoom(ctx echo.Context) error

func OverChatRoom

func OverChatRoom(ctx echo.Context) error

func OverChatRoomV2

func OverChatRoomV2(ctx echo.Context) error

func ParseOrder

func ParseOrder(db *gorm.DB, input interface{}, allow []string, def []string) *gorm.DB

func ParseSearch

func ParseSearch(db *gorm.DB, input interface{}, allow []string) *gorm.DB

func PyRobotLoginQr

func PyRobotLoginQr(ctx echo.Context) error

func ReturnData

func ReturnData(ctx echo.Context, data interface{}) error

func ReturnError

func ReturnError(ctx echo.Context, code string, err error) error

func RobotAddUser

func RobotAddUser(ctx echo.Context) error

func SendMessage

func SendMessage(ctx echo.Context) error

func SendMessageV2

func SendMessageV2(ctx echo.Context) error

func SetWorkTemplateDefault

func SetWorkTemplateDefault(ctx echo.Context) error

func SyncChats

func SyncChats(ctx echo.Context) error

func SyncRobots

func SyncRobots(ctx echo.Context) error

func UpdateChatRoomRobotNickName

func UpdateChatRoomRobotNickName(ctx echo.Context) error

func UpdateRobotExpireTime

func UpdateRobotExpireTime(ctx echo.Context) error

func UpdateRobotInfo

func UpdateRobotInfo(ctx echo.Context) error

func UpdateWorkTemplate

func UpdateWorkTemplate(ctx echo.Context) error

func UploadQiuniu

func UploadQiuniu(filename string, data []byte) (storage.PutRet, error)

func WorkTemplate

func WorkTemplate(ctx echo.Context) error

func WorkTemplateList

func WorkTemplateList(ctx echo.Context) error

Types

type PyRobotLoginQrInput

type PyRobotLoginQrInput struct {
	RobotName string `json:"robot_name"`
	QrCode    string `json:"qr_code"`
}

type Result

type Result struct {
	Code  string      `json:"code"`
	Error string      `json:"error"`
	Data  interface{} `json:"data"`
}

type ReturnType

type ReturnType struct {
	Code  string      `json:"code"`
	Error string      `json:"error"`
	Data  interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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