50 lines
1.3 KiB
Go
50 lines
1.3 KiB
Go
package sms
|
|
|
|
import (
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
)
|
|
|
|
type SendFeiShuWebHookRequest struct {
|
|
*requests.JsonRequest
|
|
Do string `position:"Json" field:"do"`
|
|
Token string `position:"Json" field:"token"`
|
|
Content string `position:"Json" field:"content"`
|
|
Title string `position:"Json" field:"title"`
|
|
TitleColor string `position:"Json" field:"title_color"`
|
|
}
|
|
|
|
type SendFeiShuWebHookResponse struct {
|
|
*responses.BaseResponse
|
|
FeishuData string `json:"feishu_data"`
|
|
}
|
|
|
|
type SendFeiShuWebHookParam struct {
|
|
Do string
|
|
Token string
|
|
Content string
|
|
Title string
|
|
TitleColor string
|
|
}
|
|
|
|
func CreateSendFeiShuWebHookRequest(param SendFeiShuWebHookParam) (req *SendFeiShuWebHookRequest) {
|
|
req = &SendFeiShuWebHookRequest{
|
|
JsonRequest: &requests.JsonRequest{},
|
|
Do: param.Do,
|
|
Token: param.Token,
|
|
Content: param.Content,
|
|
Title: param.Title,
|
|
TitleColor: param.TitleColor,
|
|
}
|
|
req.InitWithApiInfo(HOST, VERSION, "/feishu/webhook_send")
|
|
req.Method = requests.POST
|
|
return
|
|
}
|
|
|
|
func CreateSendFeiShuWebHookResponse() (resp *SendFeiShuWebHookResponse) {
|
|
resp = &SendFeiShuWebHookResponse{
|
|
BaseResponse: &responses.BaseResponse{},
|
|
}
|
|
return
|
|
}
|