Documentation ¶
Index ¶
- func NoResponse(_ *binding_context.Context, _ int, _ any, _ error)
- func SendIDResponse[T IDType](c *binding_context.Context, statusCode int, id T, err error)
- func SendInfoResponse[T any](c *binding_context.Context, statusCode int, info T, err error)
- func SendInfosResponse[T any](c *binding_context.Context, statusCode int, data InfosData[T], err error)
- func SendMapResponse(c *binding_context.Context, statusCode int, data map[string]any, err error)
- func SendMsgResponse(c *binding_context.Context, statusCode int, _ any, err error)
- func SendString(c *binding_context.Context, statusCode int, data string, err error)
- func SendWXOrderResponse(c *binding_context.Context, statusCode int, _ any, err error)
- func StructToMap(originStruct any) map[string]any
- func WSSendMessage(groupID string, obj any)
- func WriteBytes(c *binding_context.Context, statusCode int, bytes []byte, err error)
- type IDResponse
- type IDType
- type InfoResponse
- type InfosData
- type InfosResponse
- type MsgResponse
- type SendFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoResponse ¶ added in v1.1.3
func NoResponse(_ *binding_context.Context, _ int, _ any, _ error)
func SendIDResponse ¶
func SendIDResponse[T IDType](c *binding_context.Context, statusCode int, id T, err error)
func SendInfoResponse ¶
func SendInfoResponse[T any](c *binding_context.Context, statusCode int, info T, err error)
func SendInfosResponse ¶
func SendMapResponse ¶
func SendMsgResponse ¶
func SendMsgResponse(c *binding_context.Context, statusCode int, _ any, err error)
func SendString ¶ added in v1.1.2
func SendString(c *binding_context.Context, statusCode int, data string, err error)
func SendWXOrderResponse ¶ added in v1.1.5
func SendWXOrderResponse(c *binding_context.Context, statusCode int, _ any, err error)
func StructToMap ¶
func WSSendMessage ¶
func WriteBytes ¶ added in v1.1.2
func WriteBytes(c *binding_context.Context, statusCode int, bytes []byte, err error)
Types ¶
type IDResponse ¶
type IDResponse[T IDType] struct { MsgResponse ID T `json:"id"` }
type InfoResponse ¶
type InfoResponse[T any] struct { MsgResponse Info T `json:"info"` }
type InfosResponse ¶
type InfosResponse[T any] struct { MsgResponse InfosData[T] }
type MsgResponse ¶
Click to show internal directories.
Click to hide internal directories.