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

  1. package cos
  2. import (
  3. "encoding/json"
  4. )
  5. type PicOperations struct {
  6. IsPicInfo int `json:"is_pic_info,omitempty"`
  7. Rules []PicOperationsRules `json:"rules,omitemtpy"`
  8. }
  9. type PicOperationsRules struct {
  10. Bucket string `json:"bucket,omitempty"`
  11. FileId string `json:"fileid"`
  12. Rule string `json:"rule"`
  13. }
  14. func EncodePicOperations(pic *PicOperations) string {
  15. bs, err := json.Marshal(pic)
  16. if err != nil {
  17. return ""
  18. }
  19. return string(bs)
  20. }