http

package
v1.0.42 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FilterPath = map[string]bool{
		"/pong": true,
	}
)

Functions

func AddUserToken

func AddUserToken(w http.ResponseWriter, r *http.Request)

func ClearAllVectorData added in v1.0.30

func ClearAllVectorData(w http.ResponseWriter, r *http.Request)

func ComWechatComm

func ComWechatComm(w http.ResponseWriter, r *http.Request)

func Communicate

func Communicate(w http.ResponseWriter, r *http.Request)

Communicate handles the Server-Sent Events

func CompareFlagsWithStructTags

func CompareFlagsWithStructTags(cfg interface{}) string

func CreateCron added in v1.0.34

func CreateCron(w http.ResponseWriter, r *http.Request)

func CreateRagFile added in v1.0.30

func CreateRagFile(w http.ResponseWriter, r *http.Request)

func DashboardHandler

func DashboardHandler(w http.ResponseWriter, r *http.Request)

func DeleteCron added in v1.0.34

func DeleteCron(w http.ResponseWriter, r *http.Request)

func DeleteMCPConf

func DeleteMCPConf(w http.ResponseWriter, r *http.Request)

func DeleteRagFile added in v1.0.30

func DeleteRagFile(w http.ResponseWriter, r *http.Request)

func DisableMCPConf

func DisableMCPConf(w http.ResponseWriter, r *http.Request)

func GetCommand

func GetCommand(w http.ResponseWriter, r *http.Request)

func GetConf

func GetConf(w http.ResponseWriter, r *http.Request)

func GetCronByID added in v1.0.34

func GetCronByID(w http.ResponseWriter, r *http.Request)

func GetCrons added in v1.0.34

func GetCrons(w http.ResponseWriter, r *http.Request)

func GetMCPConf

func GetMCPConf(w http.ResponseWriter, r *http.Request)

func GetRagFile added in v1.0.30

func GetRagFile(w http.ResponseWriter, r *http.Request)

func GetRagFileContent added in v1.0.30

func GetRagFileContent(w http.ResponseWriter, r *http.Request)

func GetRecords

func GetRecords(w http.ResponseWriter, r *http.Request)

func GetUsers

func GetUsers(w http.ResponseWriter, r *http.Request)

func InitHTTP

func InitHTTP()

func InsertUserRecords added in v1.0.25

func InsertUserRecords(w http.ResponseWriter, r *http.Request)

func Log added in v1.0.26

func Log(w http.ResponseWriter, r *http.Request)

func OneBot added in v1.0.32

func OneBot(w http.ResponseWriter, r *http.Request)

func PongHandler

func PongHandler(w http.ResponseWriter, r *http.Request)

func QQBotComm added in v1.0.19

func QQBotComm(w http.ResponseWriter, r *http.Request)

func Restart added in v1.0.23

func Restart(w http.ResponseWriter, r *http.Request)

func Stop added in v1.0.26

func Stop(w http.ResponseWriter, r *http.Request)

func SyncMCPConf

func SyncMCPConf(w http.ResponseWriter, r *http.Request)

func UpdateConf

func UpdateConf(w http.ResponseWriter, r *http.Request)

func UpdateCron added in v1.0.34

func UpdateCron(w http.ResponseWriter, r *http.Request)

func UpdateCronStatus added in v1.0.34

func UpdateCronStatus(w http.ResponseWriter, r *http.Request)

func UpdateMCPConf

func UpdateMCPConf(w http.ResponseWriter, r *http.Request)

func WechatComm added in v1.0.19

func WechatComm(w http.ResponseWriter, r *http.Request)

func WithRequestContext added in v1.0.27

func WithRequestContext(next http.Handler) http.Handler

Types

type CronRequest added in v1.0.34

type CronRequest struct {
	ID       int64  `json:"id"`
	CronName string `json:"cron_name"`
	CronSpec string `json:"cron_spec"`
	TargetID string `json:"target_id"`
	GroupID  string `json:"group_id"`
	Command  string `json:"command"`
	Prompt   string `json:"prompt"`
	Type     string `json:"type"`
	CreateBy string `json:"create_by"`
}

type HTTPServer

type HTTPServer struct {
	Addr string
}

func NewHTTPServer

func NewHTTPServer(addr string) *HTTPServer

NewHTTPServer create http server, listen 36060 port.

func (*HTTPServer) Start

func (p *HTTPServer) Start()

Start pprof server

type RagFile added in v1.0.30

type RagFile struct {
	FileName string `json:"file_name"`
	Content  string `json:"content"`
}

type UpdateConfParam

type UpdateConfParam struct {
	Type  string      `json:"type"`
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

type UserToken

type UserToken struct {
	UserID string `json:"user_id"`
	Token  int    `json:"token"`
}

Jump to

Keyboard shortcuts

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