http

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefalutHTTPAddr = "127.0.0.1:5030"
)

Variables

View Source
var EFS embed.FS

EFS holds embedded file system data for static assets.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(ctx *ctx.Context, db *database.Service, mcp *mcp.Service) *Service

func (*Service) GetChatRooms added in v0.0.2

func (s *Service) GetChatRooms(c *gin.Context)

func (*Service) GetChatlog

func (s *Service) GetChatlog(c *gin.Context)

func (*Service) GetContacts added in v0.0.2

func (s *Service) GetContacts(c *gin.Context)

func (*Service) GetFile added in v0.0.5

func (s *Service) GetFile(c *gin.Context)

func (*Service) GetImage added in v0.0.5

func (s *Service) GetImage(c *gin.Context)

func (*Service) GetMedia added in v0.0.5

func (s *Service) GetMedia(c *gin.Context, _type string)

func (*Service) GetMediaData added in v0.0.5

func (s *Service) GetMediaData(c *gin.Context)

func (*Service) GetRouter

func (s *Service) GetRouter() *gin.Engine

func (*Service) GetSessions added in v0.0.2

func (s *Service) GetSessions(c *gin.Context)

func (*Service) GetVideo added in v0.0.5

func (s *Service) GetVideo(c *gin.Context)

func (*Service) GetVoice added in v0.0.10

func (s *Service) GetVoice(c *gin.Context)

func (*Service) HandleDatFile added in v0.0.5

func (s *Service) HandleDatFile(c *gin.Context, path string)

func (*Service) HandleVoice added in v0.0.10

func (s *Service) HandleVoice(c *gin.Context, data []byte)

func (*Service) ListenAndServe added in v0.0.12

func (s *Service) ListenAndServe() error

func (*Service) NoRoute

func (s *Service) NoRoute(c *gin.Context)

NoRoute handles 404 Not Found errors. If the request URL starts with "/api" or "/static", it responds with a JSON error. Otherwise, it redirects to the root path.

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop() error

Jump to

Keyboard shortcuts

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