7
0
gaore-common-sdk-go/services/oss/upload_put.go

38 lines
789 B
Go
Raw Normal View History

2024-05-30 18:40:57 +08:00
package oss
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type PutOssRequest struct {
*requests.StreamRequest
BucketName string `position:"Query" field:"bucket_name" default:"image"`
FileStream []byte
}
type PutOssResponse struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
Url string `json:"url"`
}
}
func CreatePutOssRequest() (req *PutOssRequest) {
req = &PutOssRequest{
StreamRequest: &requests.StreamRequest{},
}
req.InitWithApiInfo(HOST, VERSION, "api/upload/put")
req.Method = requests.POST
return
}
func CreatePutOssResponse() (resp *PutOssResponse) {
return &PutOssResponse{
BaseResponse: &responses.BaseResponse{},
}
}