Documentation ¶
Index ¶
- Variables
- func CheckAPI(c *gin.Context, urlAction string, key string) error
- func GetSecretID(c *gin.Context) string
- func SendDelete(config DataSendConfigType) ([]byte, error)
- func SendDo(config DataSendConfigType) ([]byte, error)
- func SendGet(config DataSendConfigType) ([]byte, error)
- func SendPATCH(config DataSendConfigType) ([]byte, error)
- func SendPost(config DataSendConfigType) ([]byte, error)
- func SendPut(config DataSendConfigType) ([]byte, error)
- func SendSimpleCheck(c *gin.Context, urlAction string) error
- func SendSimpleDelete(getURL string, params url.Values, action string) ([]byte, error)
- func SendSimpleDo(data DataSendConfigType) ([]byte, error)
- func SendSimpleGet(getURL string, action string) ([]byte, error)
- func SendSimplePATCH(getURL string, params url.Values, action string) ([]byte, error)
- func SendSimplePost(getURL string, params url.Values, action string) ([]byte, error)
- func SendSimplePut(getURL string, params url.Values, action string) ([]byte, error)
- func SendSimpleToStatus(data []byte) bool
- type DataSendConfigType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //Key值 SimpleSendKey string )
Functions ¶
func CheckAPI ¶
CheckAPI 从header解析并验证密钥 必须给定secretID param c *gin.Context param urlAction string 验证的URL动作 param key string 私钥 return error
func SendDo ¶
func SendDo(config DataSendConfigType) ([]byte, error)
发送请求封装 param config SendConfigType return []byte 反馈数据 return error 错误
func SendSimpleCheck ¶
从header解析密钥 secretID按照空值处理 key认定为GlobKey param c *gin.Context param urlAction string 验证的URL动作 return error
func SendSimpleDelete ¶
发起删除动作
func SendSimpleDo ¶
func SendSimpleDo(data DataSendConfigType) ([]byte, error)
发送请求封装 内部通用密钥调用 param data SendConfigType return []byte 反馈数据 return error 错误
func SendSimplePATCH ¶
发起局部更新
func SendSimplePost ¶
Post
func SendSimplePut ¶
发起put全量更新
func SendSimpleToStatus ¶
解析常用status结果集 主要用于判断动作是否完成,其他请自行根据业务逻辑解析 param data []byte 需要解析结果集 return error 错误代码
Types ¶
Click to show internal directories.
Click to hide internal directories.