file_copy.go 709 B

12345678910111213141516171819202122232425
  1. package file_copy
  2. import (
  3. "github.com/ente-io/museum/ente"
  4. "github.com/ente-io/museum/pkg/controller"
  5. "github.com/ente-io/museum/pkg/utils/auth"
  6. "github.com/ente-io/museum/pkg/utils/s3config"
  7. "github.com/gin-gonic/gin"
  8. )
  9. type FileCopyController struct {
  10. S3Config *s3config.S3Config
  11. FileController *controller.FileController
  12. CollectionCtrl *controller.CollectionController
  13. }
  14. func (fc *FileCopyController) CopyFiles(c *gin.Context, req ente.CopyFileSyncRequest) (interface{}, error) {
  15. userID := auth.GetUserID(c.Request.Header)
  16. err := fc.CollectionCtrl.IsCopyAllowed(c, userID, req)
  17. if err != nil {
  18. return nil, err
  19. }
  20. return nil, ente.NewInternalError("yet to implement actual copy")
  21. }