Documentation ¶
Overview ¶
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : config.go # Created : 2019/1/14 19:42 # Last Modified : 2019/1/14 19:42 # Describe : # # ====================================================
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : handler.go # Created : 2019/1/11 14:53 # Last Modified : 2019/1/11 14:53 # Describe : 通用的组件,用来解析提交的数据,传给各个不同的handler # # ====================================================
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : sms.go # Created : 2019/1/11 12:01 # Last Modified : 2019/1/11 12:01 # Describe : 处理和短信操作有关的数据 # # ====================================================
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : template.go # Created : 2019/1/15 15:01 # Last Modified : 2019/1/15 15:01 # Describe : # # ====================================================
====================================================
# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : validate.go # Created : 2019/1/15 11:21 # Last Modified : 2019/1/15 11:21 # Describe : # # ====================================================
Index ¶
- func JsonHandler(sh BodyHandler) http.HandlerFunc
- func MsgCancel(ctx context.Context, d map[string]string) (res []byte, err error)
- func MsgCancelByKey(ctx context.Context, d map[string]string) (res []byte, err error)
- func MsgDetailByKey(ctx context.Context, d map[string]string) (res []byte, err error)
- func MsgDetailByTo(ctx context.Context, d map[string]string) (res []byte, err error)
- func MsgEdit(ctx context.Context, body []byte) (res []byte, err error)
- func MsgIDDetail(ctx context.Context, d map[string]string) (res []byte, err error)
- func MsgProducer(ctx context.Context, body []byte) (res []byte, err error)
- func TemplateAdd(ctx context.Context, data []byte) (res []byte, err error)
- func URLHandler(sh PathHandler) http.HandlerFunc
- type BodyHandler
- type PathHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JsonHandler ¶
func JsonHandler(sh BodyHandler) http.HandlerFunc
JsonHandler 针对需要从request.Body中取json的handler
func MsgCancelByKey ¶
@router(DELETE,"/msg/key/{key}")
func MsgDetailByKey ¶
@router(GET,"/msg/key/{key}/page/{p}")
func MsgDetailByTo ¶
@router(GET,"/msg/to/{to}/page/{p}")
func MsgIDDetail ¶
MsgIDDetail 根据id或取消消息的具体信息 @router(GET,"/msg/{id}")
func MsgProducer ¶
@router(POST,"/msg") MsgProducer 接收用户提交的json,并将json转化成消息插入到消息队列
func TemplateAdd ¶
@router("POST","/version/template") TemplateAdd 添加模板
Types ¶
type BodyHandler ¶
BodyHandler 需要从request.Body中取数据的func