ultisuite-backend/internal/api/drive/blank_office.go
R3D347HR4Y 0466a1c169
Some checks are pending
CI / Go tests (push) Waiting to run
CI / Integration tests (push) Waiting to run
CI / DB migrations (push) Waiting to run
wow
2026-06-11 01:22:52 +02:00

31 lines
783 B
Go

package drive
import _ "embed"
//go:embed testdata/blank.docx
var blankDocx []byte
//go:embed testdata/blank.xlsx
var blankXlsx []byte
//go:embed testdata/blank.pptx
var blankPptx []byte
//go:embed testdata/blank.excalidraw
var blankExcalidraw []byte
func blankOfficeFile(kind NewFileKind) ([]byte, string) {
switch kind {
case NewFileDocument:
return blankDocx, "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
case NewFileSpreadsheet:
return blankXlsx, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
case NewFilePresentation:
return blankPptx, "application/vnd.openxmlformats-officedocument.presentationml.presentation"
case NewFileDrawing:
return blankExcalidraw, "application/json"
default:
return nil, ""
}
}