ultisuite-backend/internal/api/drive/path_ref.go
R3D347HR4Y 1d063237b9
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
feat(transcription): integrate Faster Whisper for Jitsi transcriptions
- Added support for Faster Whisper transcription via Jigasi and Skynet.
- Updated .env.example to include new environment variables for transcription settings.
- Enhanced Jitsi Docker Compose configuration to include Skynet and Jigasi services.
- Introduced new API endpoints for managing organizational folders in the drive service.
- Updated Nextcloud initialization script to enable external file mounting.
- Improved error handling and response structures in the drive API.
- Added new properties for organization settings related to transcription and agenda management.
2026-06-12 19:10:18 +02:00

46 lines
1.4 KiB
Go

package drive
import (
"github.com/ultisuite/ulti-backend/internal/driveroot"
)
func pathRefFromParts(rootKind, rootID, path string) (driveroot.Ref, error) {
kind, err := driveroot.ParseKind(rootKind)
if err != nil {
return driveroot.Ref{}, ErrInvalid
}
return driveroot.Ref{Kind: kind, RootID: rootID, Path: path}, nil
}
func pathRefFromMoveSource(req *moveRequest) (driveroot.Ref, error) {
return pathRefFromParts(req.SourceRoot, req.SourceRootID, req.Source)
}
func pathRefFromMoveDestination(req *moveRequest) (driveroot.Ref, error) {
return pathRefFromParts(req.DestinationRoot, req.DestinationRootID, req.Destination)
}
func pathRefFromCopySource(req *copyRequest) (driveroot.Ref, error) {
return pathRefFromParts(req.SourceRoot, req.SourceRootID, req.Source)
}
func pathRefFromCopyDestination(req *copyRequest) (driveroot.Ref, error) {
return pathRefFromParts(req.DestinationRoot, req.DestinationRootID, req.Destination)
}
func pathRefFromRename(req *renameRequest) (driveroot.Ref, error) {
return pathRefFromParts(req.Root, req.RootID, req.Path)
}
func pathRefFromFavorite(req *favoriteRequest) (driveroot.Ref, error) {
return pathRefFromParts(req.Root, req.RootID, req.Path)
}
func pathRefFromShare(req *createShareRequest) (driveroot.Ref, error) {
return pathRefFromParts(req.Root, req.RootID, req.Path)
}
func usesAlternateRoot(ref driveroot.Ref) bool {
return ref.Kind != driveroot.KindPersonal && ref.Kind != ""
}