api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(host string, port int, token string) *Server

func (*Server) SetChatHandler

func (s *Server) SetChatHandler(fn func(ctx context.Context, sessionKey, content string) (string, error))

func (*Server) SetChatHistoryHandler

func (s *Server) SetChatHistoryHandler(fn func(sessionKey string) []map[string]interface{})

func (*Server) SetConfigAfterHook

func (s *Server) SetConfigAfterHook(fn func(forceRuntimeReload bool) error)

func (*Server) SetConfigPath

func (s *Server) SetConfigPath(path string)

func (*Server) SetCronHandler

func (s *Server) SetCronHandler(fn func(action string, args map[string]interface{}) (interface{}, error))

func (*Server) SetGatewayVersion

func (s *Server) SetGatewayVersion(v string)

func (*Server) SetLogFilePath

func (s *Server) SetLogFilePath(path string)

func (*Server) SetProtectedRoute

func (s *Server) SetProtectedRoute(path string, handler http.Handler)

func (*Server) SetToken

func (s *Server) SetToken(token string)

func (*Server) SetToolsCatalogHandler

func (s *Server) SetToolsCatalogHandler(fn func() interface{})

func (*Server) SetWeixinChannel added in v1.0.1

func (s *Server) SetWeixinChannel(ch *channels.WeixinChannel)

func (*Server) SetWhatsAppBridge

func (s *Server) SetWhatsAppBridge(service *channels.WhatsAppBridgeService, basePath string)

func (*Server) SetWorkspacePath

func (s *Server) SetWorkspacePath(path string)

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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