You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
467 B

package cos
import (
"encoding/json"
)
type PicOperations struct {
IsPicInfo int `json:"is_pic_info,omitempty"`
Rules []PicOperationsRules `json:"rules,omitemtpy"`
}
type PicOperationsRules struct {
Bucket string `json:"bucket,omitempty"`
FileId string `json:"fileid"`
Rule string `json:"rule"`
}
func EncodePicOperations(pic *PicOperations) string {
bs, err := json.Marshal(pic)
if err != nil {
return ""
}
return string(bs)
}