-
Notifications
You must be signed in to change notification settings - Fork 0
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
7caabd0
commit 39116ba
Showing
13 changed files
with
75 additions
and
21 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
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
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
4 changes: 3 additions & 1 deletion
4
composeApp/src/commonMain/kotlin/domain/imageGeneration/data/ImageGenerationRepository.kt
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,5 +1,7 @@ | ||
package domain.imageGeneration.data | ||
|
||
import domain.imageGeneration.data.model.ImageResultData | ||
|
||
interface ImageGenerationRepository { | ||
suspend fun generateImage(prompt: String): String | ||
suspend fun generateImage(prompt: String): ImageResultData | ||
} |
6 changes: 6 additions & 0 deletions
6
composeApp/src/commonMain/kotlin/domain/imageGeneration/data/model/ImageResultData.kt
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package domain.imageGeneration.data.model | ||
|
||
sealed interface ImageResultData { | ||
data class ImageResultSuccess(val imageUrl: String) : ImageResultData | ||
data class ImageResultError(val errorMessage: String) : ImageResultData | ||
} |
3 changes: 2 additions & 1 deletion
3
composeApp/src/commonMain/kotlin/domain/imageGeneration/entity/ImageResult.kt
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,6 +1,7 @@ | ||
package domain.imageGeneration.entity | ||
|
||
data class ImageResult( | ||
val image: String, | ||
val imageUrl: String?, | ||
val imagePrompt: String, | ||
val errorMessage: String?, | ||
) |
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
3 changes: 2 additions & 1 deletion
3
composeApp/src/commonMain/kotlin/domain/imageGeneration/ui/model/ImageResultUi.kt
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,6 +1,7 @@ | ||
package domain.imageGeneration.ui.model | ||
|
||
data class ImageResultUi( | ||
val image: String, | ||
val imageUrl: String?, | ||
val imagePrompt: String, | ||
val errorMessage: String?, | ||
) |
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
3 changes: 2 additions & 1 deletion
3
...App/src/commonMain/kotlin/presentation/imageGeneration/model/ImageGenerationResultItem.kt
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,7 +1,8 @@ | ||
package presentation.imageGeneration.model | ||
|
||
data class ImageGenerationResultItem( | ||
val image: String, | ||
val image: String?, | ||
val imageInput: String, | ||
val onReset: () -> Unit, | ||
val errorMessage: String?, | ||
) |
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