message

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(service *Service) *Handler

func (*Handler) Detail

func (h *Handler) Detail(c *gin.Context)

Detail handles the request to get message details

func (*Handler) Get

func (h *Handler) Get(c *gin.Context)

Get alias for route compatibility

func (*Handler) List

func (h *Handler) List(c *gin.Context)

List handles the request to list messages

func (*Handler) Read

func (h *Handler) Read(c *gin.Context)

Read handles the request to mark a message as read

func (*Handler) Send

func (h *Handler) Send(c *gin.Context)

Send handles the request to send a message

func (*Handler) Stream

func (h *Handler) Stream(c *gin.Context)

Stream handles the request to stream messages

func (*Handler) UnreadCount

func (h *Handler) UnreadCount(c *gin.Context)

UnreadCount handles the request to get unread message count

type MessageDetailRequest

type MessageDetailRequest struct {
	ID string `uri:"id"`
}

type MessageDetailResponse

type MessageDetailResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type MessageReadRequest

type MessageReadRequest struct {
	ID string `uri:"id"`
}

type MessageReadResponse

type MessageReadResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type MessageSendRequest

type MessageSendRequest struct {
	To      string      `json:"to"`
	Type    string      `json:"type"`
	Title   string      `json:"title"`
	Content string      `json:"content"`
	Data    interface{} `json:"data"`
}

type MessageSendResponse

type MessageSendResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type MessagesListRequest

type MessagesListRequest struct {
	Page     int    `form:"page"`
	PageSize int    `form:"pageSize"`
	Type     string `form:"type"`
	Status   string `form:"status"`
}

type MessagesListResponse

type MessagesListResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type MessagesUnreadCountRequest

type MessagesUnreadCountRequest struct{}

type MessagesUnreadCountResponse

type MessagesUnreadCountResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type Service

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

func NewService

func NewService(svcCtx *svc.ServiceContext) *Service

func (*Service) Detail

Detail returns the details of a message

func (*Service) List

List returns the list of messages

func (*Service) Read

Read marks a message as read

func (*Service) Send

Send sends a new message

func (*Service) Stream

Stream returns recent messages for streaming

func (*Service) UnreadCount

UnreadCount returns the count of unread messages

type StreamMessagesRequest

type StreamMessagesRequest struct {
}

StreamMessagesRequest is for streaming messages

type StreamMessagesResponse

type StreamMessagesResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

StreamMessagesResponse is for streaming messages response

Jump to

Keyboard shortcuts

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