-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64b7211
commit 5e1dbe6
Showing
10 changed files
with
122 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
src/context/offline-drive/contents/application/OfflineContentsPathCalculator.ts
This file was deleted.
Oops, something went wrong.
89 changes: 17 additions & 72 deletions
89
src/context/offline-drive/contents/application/OfflineContentsUploader.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rive/contents/domain/OfflineContentsId.ts → ...ve/contents/domain/OfflineContentsName.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { Uuid } from '../../../shared/domain/value-objects/Uuid'; | ||
|
||
export class OfflineContentsId extends Uuid {} | ||
export class OfflineContentsName extends Uuid {} |
10 changes: 6 additions & 4 deletions
10
src/context/offline-drive/contents/domain/OfflineContentsRepository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
import { Readable } from 'stream'; | ||
import { OfflineFile } from '../../files/domain/OfflineFile'; | ||
import { OfflineContents } from './OfflineContents'; | ||
import { OfflineContentsName } from './OfflineContentsName'; | ||
|
||
export interface OfflineContentsRepository { | ||
writeToFile(id: OfflineFile['id'], buffer: Buffer): Promise<void>; | ||
|
||
createEmptyFile(id: OfflineFile['id']): Promise<void>; | ||
|
||
getAbsolutePath(id: OfflineFile['id']): Promise<string>; | ||
getAbsolutePath(id: OfflineContentsName): Promise<string>; | ||
|
||
provide: (path: string) => Promise<{ | ||
contents: Readable; | ||
size: number; | ||
read: (offlineContentsName: OfflineContentsName) => Promise<{ | ||
contents: OfflineContents; | ||
stream: Readable; | ||
abortSignal: AbortSignal; | ||
}>; | ||
} |
9 changes: 2 additions & 7 deletions
9
src/context/offline-drive/contents/infrastructure/EnvironmentOfflineContentsUploader.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.