storage.go 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package storage
  2. import (
  3. "dashoo.cn/opms_libary/multipart"
  4. "dashoo.cn/opms_libary/plugin/dingtalk/base"
  5. "dashoo.cn/opms_libary/plugin/dingtalk/context"
  6. )
  7. const (
  8. FormSchemasUrl = "/v1.0/workflow/forms/schemas/processCodes"
  9. ProcessInstanceUrl = "/v1.0/workflow/processInstances"
  10. )
  11. //Storage OA审批
  12. type Storage struct {
  13. base.Base
  14. }
  15. //NewStorage init
  16. func NewStorage(context *context.Context) *Storage {
  17. material := new(Storage)
  18. material.Context = context
  19. return material
  20. }
  21. //QueryFileUploadInfo 获取文件上传信息
  22. func (w *Storage) QueryFileUploadInfo(spaceId, unionId string) (response QueryFileUploadInfoResponse, err error) {
  23. return response, err
  24. }
  25. //UploadFile 使用OSS的header加签方式上传文件息
  26. func (w *Storage) UploadFile(url string, headers map[string]string, file *multipart.MultipartFile) (code int64, err error) {
  27. return 0, err
  28. }
  29. //CommitFile 提交文件
  30. func (w *Storage) CommitFile(uploadKey, filename, parentId string) (response CommitFileResponse, err error) {
  31. return response, err
  32. }