Move types into simplenotes-types module
This commit is contained in:
parent
4c9ac8944e
commit
c2eaf3d0cc
1
pom.xml
1
pom.xml
@ -13,6 +13,7 @@
|
|||||||
<module>simplenotes-domain</module>
|
<module>simplenotes-domain</module>
|
||||||
<module>simplenotes-shared</module>
|
<module>simplenotes-shared</module>
|
||||||
<module>simplenotes-search</module>
|
<module>simplenotes-search</module>
|
||||||
|
<module>simplenotes-types</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|||||||
@ -2,8 +2,8 @@ package be.simplenotes.app.api
|
|||||||
|
|
||||||
import be.simplenotes.app.extensions.auto
|
import be.simplenotes.app.extensions.auto
|
||||||
import be.simplenotes.app.utils.parseSearchTerms
|
import be.simplenotes.app.utils.parseSearchTerms
|
||||||
import be.simplenotes.domain.model.PersistedNote
|
import be.simplenotes.types.PersistedNote
|
||||||
import be.simplenotes.domain.model.PersistedNoteMetadata
|
import be.simplenotes.types.PersistedNoteMetadata
|
||||||
import be.simplenotes.domain.security.JwtPayload
|
import be.simplenotes.domain.security.JwtPayload
|
||||||
import be.simplenotes.domain.usecases.NoteService
|
import be.simplenotes.domain.usecases.NoteService
|
||||||
import kotlinx.serialization.Contextual
|
import kotlinx.serialization.Contextual
|
||||||
|
|||||||
@ -2,8 +2,8 @@ package be.simplenotes.app.views
|
|||||||
|
|
||||||
import be.simplenotes.app.utils.StaticFileResolver
|
import be.simplenotes.app.utils.StaticFileResolver
|
||||||
import be.simplenotes.app.views.components.*
|
import be.simplenotes.app.views.components.*
|
||||||
import be.simplenotes.domain.model.PersistedNote
|
import be.simplenotes.types.PersistedNote
|
||||||
import be.simplenotes.domain.model.PersistedNoteMetadata
|
import be.simplenotes.types.PersistedNoteMetadata
|
||||||
import be.simplenotes.domain.security.JwtPayload
|
import be.simplenotes.domain.security.JwtPayload
|
||||||
import io.konform.validation.ValidationError
|
import io.konform.validation.ValidationError
|
||||||
import kotlinx.html.*
|
import kotlinx.html.*
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package be.simplenotes.app.views.components
|
package be.simplenotes.app.views.components
|
||||||
|
|
||||||
import be.simplenotes.app.utils.toTimeAgo
|
import be.simplenotes.app.utils.toTimeAgo
|
||||||
import be.simplenotes.domain.model.PersistedNoteMetadata
|
import be.simplenotes.types.PersistedNoteMetadata
|
||||||
import kotlinx.html.*
|
import kotlinx.html.*
|
||||||
import kotlinx.html.ButtonType.submit
|
import kotlinx.html.ButtonType.submit
|
||||||
import kotlinx.html.FormMethod.post
|
import kotlinx.html.FormMethod.post
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package be.simplenotes.app.views.components
|
package be.simplenotes.app.views.components
|
||||||
|
|
||||||
import be.simplenotes.app.utils.toTimeAgo
|
import be.simplenotes.app.utils.toTimeAgo
|
||||||
import be.simplenotes.domain.model.PersistedNoteMetadata
|
import be.simplenotes.types.PersistedNoteMetadata
|
||||||
import kotlinx.html.*
|
import kotlinx.html.*
|
||||||
import kotlinx.html.ThScope.col
|
import kotlinx.html.ThScope.col
|
||||||
|
|
||||||
|
|||||||
@ -24,14 +24,14 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.arrow-kt</groupId>
|
|
||||||
<artifactId>arrow-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.koin</groupId>
|
<groupId>org.koin</groupId>
|
||||||
<artifactId>koin-core</artifactId>
|
<artifactId>koin-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.arrow-kt</groupId>
|
||||||
|
<artifactId>arrow-core</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.natpryce</groupId>
|
<groupId>com.natpryce</groupId>
|
||||||
<artifactId>hamkrest</artifactId>
|
<artifactId>hamkrest</artifactId>
|
||||||
@ -83,15 +83,17 @@
|
|||||||
<artifactId>owasp-java-html-sanitizer</artifactId>
|
<artifactId>owasp-java-html-sanitizer</artifactId>
|
||||||
<version>20200713.1</version>
|
<version>20200713.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.jetbrains.kotlinx</groupId>
|
|
||||||
<artifactId>kotlinx-serialization-json-jvm</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-compress</artifactId>
|
<artifactId>commons-compress</artifactId>
|
||||||
<version>1.20</version>
|
<version>1.20</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>be.simplenotes</groupId>
|
||||||
|
<artifactId>simplenotes-types</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package be.simplenotes.domain.security
|
package be.simplenotes.domain.security
|
||||||
|
|
||||||
import be.simplenotes.domain.model.PersistedUser
|
import be.simplenotes.types.PersistedUser
|
||||||
import com.auth0.jwt.exceptions.JWTVerificationException
|
import com.auth0.jwt.exceptions.JWTVerificationException
|
||||||
|
|
||||||
data class JwtPayload(val userId: Int, val username: String) {
|
data class JwtPayload(val userId: Int, val username: String) {
|
||||||
|
|||||||
@ -2,9 +2,9 @@ package be.simplenotes.domain.usecases
|
|||||||
|
|
||||||
import arrow.core.Either
|
import arrow.core.Either
|
||||||
import arrow.core.extensions.fx
|
import arrow.core.extensions.fx
|
||||||
import be.simplenotes.domain.model.Note
|
import be.simplenotes.types.Note
|
||||||
import be.simplenotes.domain.model.PersistedNote
|
import be.simplenotes.types.PersistedNote
|
||||||
import be.simplenotes.domain.model.PersistedNoteMetadata
|
import be.simplenotes.types.PersistedNoteMetadata
|
||||||
import be.simplenotes.domain.security.HtmlSanitizer
|
import be.simplenotes.domain.security.HtmlSanitizer
|
||||||
import be.simplenotes.domain.usecases.markdown.MarkdownConverter
|
import be.simplenotes.domain.usecases.markdown.MarkdownConverter
|
||||||
import be.simplenotes.domain.usecases.markdown.MarkdownParsingError
|
import be.simplenotes.domain.usecases.markdown.MarkdownParsingError
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package be.simplenotes.domain.usecases.export
|
package be.simplenotes.domain.usecases.export
|
||||||
|
|
||||||
import be.simplenotes.domain.model.ExportedNote
|
import be.simplenotes.types.ExportedNote
|
||||||
import be.simplenotes.domain.usecases.repositories.NoteRepository
|
import be.simplenotes.domain.usecases.repositories.NoteRepository
|
||||||
import kotlinx.serialization.builtins.ListSerializer
|
import kotlinx.serialization.builtins.ListSerializer
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import arrow.core.Either
|
|||||||
import arrow.core.extensions.fx
|
import arrow.core.extensions.fx
|
||||||
import arrow.core.left
|
import arrow.core.left
|
||||||
import arrow.core.right
|
import arrow.core.right
|
||||||
import be.simplenotes.domain.model.NoteMetadata
|
import be.simplenotes.types.NoteMetadata
|
||||||
import be.simplenotes.domain.validation.NoteValidations
|
import be.simplenotes.domain.validation.NoteValidations
|
||||||
import com.vladsch.flexmark.ext.gfm.tasklist.TaskListExtension
|
import com.vladsch.flexmark.ext.gfm.tasklist.TaskListExtension
|
||||||
import com.vladsch.flexmark.html.HtmlRenderer
|
import com.vladsch.flexmark.html.HtmlRenderer
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package be.simplenotes.domain.usecases.repositories
|
package be.simplenotes.domain.usecases.repositories
|
||||||
|
|
||||||
import be.simplenotes.domain.model.ExportedNote
|
import be.simplenotes.types.ExportedNote
|
||||||
import be.simplenotes.domain.model.Note
|
import be.simplenotes.types.Note
|
||||||
import be.simplenotes.domain.model.PersistedNote
|
import be.simplenotes.types.PersistedNote
|
||||||
import be.simplenotes.domain.model.PersistedNoteMetadata
|
import be.simplenotes.types.PersistedNoteMetadata
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
interface NoteRepository {
|
interface NoteRepository {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package be.simplenotes.domain.usecases.repositories
|
package be.simplenotes.domain.usecases.repositories
|
||||||
|
|
||||||
import be.simplenotes.domain.model.PersistedUser
|
import be.simplenotes.types.PersistedUser
|
||||||
import be.simplenotes.domain.model.User
|
import be.simplenotes.types.User
|
||||||
|
|
||||||
interface UserRepository {
|
interface UserRepository {
|
||||||
fun create(user: User): PersistedUser?
|
fun create(user: User): PersistedUser?
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package be.simplenotes.domain.usecases.search
|
package be.simplenotes.domain.usecases.search
|
||||||
|
|
||||||
import be.simplenotes.domain.model.PersistedNote
|
import be.simplenotes.types.PersistedNote
|
||||||
import be.simplenotes.domain.model.PersistedNoteMetadata
|
import be.simplenotes.types.PersistedNoteMetadata
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
data class SearchTerms(val title: String?, val tag: String?, val content: String?, val all: String?)
|
data class SearchTerms(val title: String?, val tag: String?, val content: String?, val all: String?)
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package be.simplenotes.domain.usecases.users.register
|
|||||||
import arrow.core.Either
|
import arrow.core.Either
|
||||||
import arrow.core.filterOrElse
|
import arrow.core.filterOrElse
|
||||||
import arrow.core.leftIfNull
|
import arrow.core.leftIfNull
|
||||||
import be.simplenotes.domain.model.PersistedUser
|
import be.simplenotes.types.PersistedUser
|
||||||
import be.simplenotes.domain.security.PasswordHash
|
import be.simplenotes.domain.security.PasswordHash
|
||||||
import be.simplenotes.domain.usecases.repositories.UserRepository
|
import be.simplenotes.domain.usecases.repositories.UserRepository
|
||||||
import be.simplenotes.domain.validation.UserValidations
|
import be.simplenotes.domain.validation.UserValidations
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package be.simplenotes.domain.usecases.users.register
|
package be.simplenotes.domain.usecases.users.register
|
||||||
|
|
||||||
import arrow.core.Either
|
import arrow.core.Either
|
||||||
import be.simplenotes.domain.model.PersistedUser
|
import be.simplenotes.types.PersistedUser
|
||||||
import be.simplenotes.domain.usecases.users.login.LoginForm
|
import be.simplenotes.domain.usecases.users.login.LoginForm
|
||||||
import io.konform.validation.ValidationErrors
|
import io.konform.validation.ValidationErrors
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package be.simplenotes.domain.validation
|
package be.simplenotes.domain.validation
|
||||||
|
|
||||||
import arrow.core.*
|
import arrow.core.*
|
||||||
import be.simplenotes.domain.model.NoteMetadata
|
import be.simplenotes.types.NoteMetadata
|
||||||
import be.simplenotes.domain.usecases.markdown.ValidationError
|
import be.simplenotes.domain.usecases.markdown.ValidationError
|
||||||
import io.konform.validation.Validation
|
import io.konform.validation.Validation
|
||||||
import io.konform.validation.jsonschema.maxItems
|
import io.konform.validation.jsonschema.maxItems
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package be.simplenotes.domain.validation
|
|||||||
import arrow.core.Either
|
import arrow.core.Either
|
||||||
import arrow.core.left
|
import arrow.core.left
|
||||||
import arrow.core.right
|
import arrow.core.right
|
||||||
import be.simplenotes.domain.model.User
|
import be.simplenotes.types.User
|
||||||
import be.simplenotes.domain.usecases.users.delete.DeleteError
|
import be.simplenotes.domain.usecases.users.delete.DeleteError
|
||||||
import be.simplenotes.domain.usecases.users.delete.DeleteForm
|
import be.simplenotes.domain.usecases.users.delete.DeleteForm
|
||||||
import be.simplenotes.domain.usecases.users.login.InvalidLoginForm
|
import be.simplenotes.domain.usecases.users.login.InvalidLoginForm
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package be.simplenotes.domain.usecases.users.login
|
package be.simplenotes.domain.usecases.users.login
|
||||||
|
|
||||||
import be.simplenotes.domain.model.PersistedUser
|
import be.simplenotes.types.PersistedUser
|
||||||
import be.simplenotes.domain.security.BcryptPasswordHash
|
import be.simplenotes.domain.security.BcryptPasswordHash
|
||||||
import be.simplenotes.domain.security.SimpleJwt
|
import be.simplenotes.domain.security.SimpleJwt
|
||||||
import be.simplenotes.domain.usecases.repositories.UserRepository
|
import be.simplenotes.domain.usecases.repositories.UserRepository
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package be.simplenotes.domain.usecases.users.register
|
package be.simplenotes.domain.usecases.users.register
|
||||||
|
|
||||||
import be.simplenotes.domain.model.PersistedUser
|
import be.simplenotes.types.PersistedUser
|
||||||
import be.simplenotes.domain.security.BcryptPasswordHash
|
import be.simplenotes.domain.security.BcryptPasswordHash
|
||||||
import be.simplenotes.domain.usecases.repositories.UserRepository
|
import be.simplenotes.domain.usecases.repositories.UserRepository
|
||||||
import be.simplenotes.shared.testutils.assertions.isLeftOfType
|
import be.simplenotes.shared.testutils.assertions.isLeftOfType
|
||||||
|
|||||||
@ -20,6 +20,11 @@
|
|||||||
<artifactId>simplenotes-domain</artifactId>
|
<artifactId>simplenotes-domain</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>be.simplenotes</groupId>
|
||||||
|
<artifactId>simplenotes-types</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>be.simplenotes</groupId>
|
<groupId>be.simplenotes</groupId>
|
||||||
<artifactId>simplenotes-shared</artifactId>
|
<artifactId>simplenotes-shared</artifactId>
|
||||||
@ -33,6 +38,11 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.koin</groupId>
|
||||||
|
<artifactId>koin-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.assertj</groupId>
|
<groupId>org.assertj</groupId>
|
||||||
<artifactId>assertj-core</artifactId>
|
<artifactId>assertj-core</artifactId>
|
||||||
|
|||||||
@ -3,9 +3,7 @@ package be.simplenotes.persistance
|
|||||||
import be.simplenotes.domain.usecases.repositories.NoteRepository
|
import be.simplenotes.domain.usecases.repositories.NoteRepository
|
||||||
import be.simplenotes.domain.usecases.repositories.UserRepository
|
import be.simplenotes.domain.usecases.repositories.UserRepository
|
||||||
import be.simplenotes.persistance.converters.NoteConverter
|
import be.simplenotes.persistance.converters.NoteConverter
|
||||||
import be.simplenotes.persistance.converters.NoteConverterImpl
|
|
||||||
import be.simplenotes.persistance.converters.UserConverter
|
import be.simplenotes.persistance.converters.UserConverter
|
||||||
import be.simplenotes.persistance.converters.UserConverterImpl
|
|
||||||
import be.simplenotes.persistance.notes.NoteRepositoryImpl
|
import be.simplenotes.persistance.notes.NoteRepositoryImpl
|
||||||
import be.simplenotes.persistance.users.UserRepositoryImpl
|
import be.simplenotes.persistance.users.UserRepositoryImpl
|
||||||
import be.simplenotes.shared.config.DataSourceConfig
|
import be.simplenotes.shared.config.DataSourceConfig
|
||||||
@ -15,6 +13,7 @@ import me.liuwj.ktorm.database.Database
|
|||||||
import org.koin.dsl.bind
|
import org.koin.dsl.bind
|
||||||
import org.koin.dsl.module
|
import org.koin.dsl.module
|
||||||
import org.koin.dsl.onClose
|
import org.koin.dsl.onClose
|
||||||
|
import org.mapstruct.factory.Mappers
|
||||||
import javax.sql.DataSource
|
import javax.sql.DataSource
|
||||||
|
|
||||||
private fun hikariDataSource(conf: DataSourceConfig): HikariDataSource {
|
private fun hikariDataSource(conf: DataSourceConfig): HikariDataSource {
|
||||||
@ -34,8 +33,8 @@ val migrationModule = module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val persistanceModule = module {
|
val persistanceModule = module {
|
||||||
single<NoteConverter> { NoteConverterImpl() }
|
single { Mappers.getMapper(NoteConverter::class.java) }
|
||||||
single<UserConverter> { UserConverterImpl() }
|
single { Mappers.getMapper(UserConverter::class.java) }
|
||||||
single<UserRepository> { UserRepositoryImpl(get(), get()) }
|
single<UserRepository> { UserRepositoryImpl(get(), get()) }
|
||||||
single<NoteRepository> { NoteRepositoryImpl(get(), get()) }
|
single<NoteRepository> { NoteRepositoryImpl(get(), get()) }
|
||||||
single { hikariDataSource(get()) } bind DataSource::class onClose { it?.close() }
|
single { hikariDataSource(get()) } bind DataSource::class onClose { it?.close() }
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package be.simplenotes.persistance.converters
|
package be.simplenotes.persistance.converters
|
||||||
|
|
||||||
import be.simplenotes.domain.model.*
|
import be.simplenotes.types.*
|
||||||
import be.simplenotes.persistance.notes.NoteEntity
|
import be.simplenotes.persistance.notes.NoteEntity
|
||||||
import me.liuwj.ktorm.entity.Entity
|
import me.liuwj.ktorm.entity.Entity
|
||||||
import org.mapstruct.Mapper
|
import org.mapstruct.Mapper
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package be.simplenotes.persistance.converters
|
package be.simplenotes.persistance.converters
|
||||||
|
|
||||||
import be.simplenotes.domain.model.PersistedUser
|
import be.simplenotes.types.PersistedUser
|
||||||
import be.simplenotes.domain.model.User
|
import be.simplenotes.types.User
|
||||||
import be.simplenotes.persistance.users.UserEntity
|
import be.simplenotes.persistance.users.UserEntity
|
||||||
import me.liuwj.ktorm.entity.Entity
|
import me.liuwj.ktorm.entity.Entity
|
||||||
import org.mapstruct.Mapper
|
import org.mapstruct.Mapper
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package be.simplenotes.persistance.notes
|
package be.simplenotes.persistance.notes
|
||||||
|
|
||||||
import be.simplenotes.domain.model.ExportedNote
|
import be.simplenotes.types.ExportedNote
|
||||||
import be.simplenotes.domain.model.Note
|
import be.simplenotes.types.Note
|
||||||
import be.simplenotes.domain.model.PersistedNote
|
import be.simplenotes.types.PersistedNote
|
||||||
import be.simplenotes.domain.model.PersistedNoteMetadata
|
import be.simplenotes.types.PersistedNoteMetadata
|
||||||
import be.simplenotes.domain.usecases.repositories.NoteRepository
|
import be.simplenotes.domain.usecases.repositories.NoteRepository
|
||||||
import be.simplenotes.persistance.converters.NoteConverter
|
import be.simplenotes.persistance.converters.NoteConverter
|
||||||
import me.liuwj.ktorm.database.Database
|
import me.liuwj.ktorm.database.Database
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package be.simplenotes.persistance.users
|
package be.simplenotes.persistance.users
|
||||||
|
|
||||||
import be.simplenotes.domain.model.PersistedUser
|
import be.simplenotes.types.PersistedUser
|
||||||
import be.simplenotes.domain.model.User
|
import be.simplenotes.types.User
|
||||||
import be.simplenotes.domain.usecases.repositories.UserRepository
|
import be.simplenotes.domain.usecases.repositories.UserRepository
|
||||||
import be.simplenotes.persistance.converters.UserConverter
|
import be.simplenotes.persistance.converters.UserConverter
|
||||||
import me.liuwj.ktorm.database.Database
|
import me.liuwj.ktorm.database.Database
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package be.simplenotes.persistance.converters
|
package be.simplenotes.persistance.converters
|
||||||
|
|
||||||
import be.simplenotes.domain.model.*
|
import be.simplenotes.types.*
|
||||||
import be.simplenotes.persistance.notes.NoteEntity
|
import be.simplenotes.persistance.notes.NoteEntity
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
import org.assertj.core.api.Assertions.assertThat
|
||||||
import org.junit.jupiter.api.DisplayName
|
import org.junit.jupiter.api.DisplayName
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package be.simplenotes.persistance.converters
|
package be.simplenotes.persistance.converters
|
||||||
|
|
||||||
import be.simplenotes.domain.model.PersistedUser
|
import be.simplenotes.types.PersistedUser
|
||||||
import be.simplenotes.domain.model.User
|
import be.simplenotes.types.User
|
||||||
import be.simplenotes.persistance.users.UserEntity
|
import be.simplenotes.persistance.users.UserEntity
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
import org.assertj.core.api.Assertions.assertThat
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package be.simplenotes.persistance.notes
|
package be.simplenotes.persistance.notes
|
||||||
|
|
||||||
import be.simplenotes.domain.model.*
|
import be.simplenotes.types.*
|
||||||
import be.simplenotes.domain.usecases.repositories.NoteRepository
|
import be.simplenotes.domain.usecases.repositories.NoteRepository
|
||||||
import be.simplenotes.domain.usecases.repositories.UserRepository
|
import be.simplenotes.domain.usecases.repositories.UserRepository
|
||||||
import be.simplenotes.persistance.DbMigrations
|
import be.simplenotes.persistance.DbMigrations
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package be.simplenotes.persistance.users
|
package be.simplenotes.persistance.users
|
||||||
|
|
||||||
import be.simplenotes.domain.model.User
|
import be.simplenotes.types.User
|
||||||
import be.simplenotes.domain.usecases.repositories.UserRepository
|
import be.simplenotes.domain.usecases.repositories.UserRepository
|
||||||
import be.simplenotes.persistance.DbMigrations
|
import be.simplenotes.persistance.DbMigrations
|
||||||
import be.simplenotes.persistance.migrationModule
|
import be.simplenotes.persistance.migrationModule
|
||||||
|
|||||||
@ -16,6 +16,11 @@
|
|||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>be.simplenotes</groupId>
|
||||||
|
<artifactId>simplenotes-types</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>be.simplenotes</groupId>
|
<groupId>be.simplenotes</groupId>
|
||||||
<artifactId>simplenotes-domain</artifactId>
|
<artifactId>simplenotes-domain</artifactId>
|
||||||
@ -41,6 +46,10 @@
|
|||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.koin</groupId>
|
||||||
|
<artifactId>koin-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package be.simplenotes.search
|
package be.simplenotes.search
|
||||||
|
|
||||||
import be.simplenotes.domain.model.PersistedNote
|
import be.simplenotes.types.PersistedNote
|
||||||
import be.simplenotes.domain.model.PersistedNoteMetadata
|
import be.simplenotes.types.PersistedNoteMetadata
|
||||||
import org.apache.lucene.document.Document
|
import org.apache.lucene.document.Document
|
||||||
import org.apache.lucene.document.Field
|
import org.apache.lucene.document.Field
|
||||||
import org.apache.lucene.document.StringField
|
import org.apache.lucene.document.StringField
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package be.simplenotes.search
|
package be.simplenotes.search
|
||||||
|
|
||||||
import be.simplenotes.domain.model.PersistedNote
|
import be.simplenotes.types.PersistedNote
|
||||||
import be.simplenotes.domain.usecases.search.NoteSearcher
|
import be.simplenotes.domain.usecases.search.NoteSearcher
|
||||||
import be.simplenotes.domain.usecases.search.SearchTerms
|
import be.simplenotes.domain.usecases.search.SearchTerms
|
||||||
import be.simplenotes.search.utils.rmdir
|
import be.simplenotes.search.utils.rmdir
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package be.simplenotes.search
|
package be.simplenotes.search
|
||||||
|
|
||||||
import be.simplenotes.domain.model.NoteMetadata
|
import be.simplenotes.types.NoteMetadata
|
||||||
import be.simplenotes.domain.model.PersistedNote
|
import be.simplenotes.types.PersistedNote
|
||||||
import be.simplenotes.domain.model.PersistedNoteMetadata
|
import be.simplenotes.types.PersistedNoteMetadata
|
||||||
import be.simplenotes.domain.usecases.search.SearchTerms
|
import be.simplenotes.domain.usecases.search.SearchTerms
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
import org.assertj.core.api.Assertions.assertThat
|
||||||
import org.intellij.lang.annotations.Language
|
import org.intellij.lang.annotations.Language
|
||||||
|
|||||||
21
simplenotes-types/pom.xml
Normal file
21
simplenotes-types/pom.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>simplenotes-parent</artifactId>
|
||||||
|
<groupId>be.simplenotes</groupId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>simplenotes-types</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlinx</groupId>
|
||||||
|
<artifactId>kotlinx-serialization-json-jvm</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package be.simplenotes.domain.model
|
package be.simplenotes.types
|
||||||
|
|
||||||
import kotlinx.serialization.Contextual
|
import kotlinx.serialization.Contextual
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package be.simplenotes.domain.model
|
package be.simplenotes.types
|
||||||
|
|
||||||
data class User(val username: String, val password: String)
|
data class User(val username: String, val password: String)
|
||||||
data class PersistedUser(val username: String, val password: String, val id: Int)
|
data class PersistedUser(val username: String, val password: String, val id: Int)
|
||||||
Loading…
x
Reference in New Issue
Block a user