mirror of https://github.com/usbharu/Hideout.git
refactor: パッケージ構成を変更
This commit is contained in:
parent
89e1675611
commit
bfc341b28d
|
@ -66,7 +66,7 @@ tasks.create<GenerateTask>("openApiGenerateMastodonCompatibleApi", GenerateTask:
|
||||||
typeMappings.put("org.springframework.core.io.Resource", "org.springframework.web.multipart.MultipartFile")
|
typeMappings.put("org.springframework.core.io.Resource", "org.springframework.web.multipart.MultipartFile")
|
||||||
schemaMappings.put(
|
schemaMappings.put(
|
||||||
"StatusesRequest",
|
"StatusesRequest",
|
||||||
"dev.usbharu.hideout.domain.model.mastodon.StatusesRequest"
|
"dev.usbharu.hideout.mastodon.interfaces.api.status.StatusesRequest"
|
||||||
)
|
)
|
||||||
templateDir.set("$rootDir/templates")
|
templateDir.set("$rootDir/templates")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.exception.ap
|
package dev.usbharu.hideout.activitypub.domain.exception
|
||||||
|
|
||||||
import dev.usbharu.hideout.exception.FailedToGetResourcesException
|
import dev.usbharu.hideout.core.domain.exception.FailedToGetResourcesException
|
||||||
|
|
||||||
class FailedToGetActivityPubResourceException : FailedToGetResourcesException {
|
class FailedToGetActivityPubResourceException : FailedToGetResourcesException {
|
||||||
constructor() : super()
|
constructor() : super()
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception.ap
|
package dev.usbharu.hideout.activitypub.domain.exception
|
||||||
|
|
||||||
import java.io.Serial
|
import java.io.Serial
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception
|
package dev.usbharu.hideout.activitypub.domain.exception
|
||||||
|
|
||||||
import java.io.Serial
|
import java.io.Serial
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.ObjectDeserializer
|
||||||
|
|
||||||
open class Accept : Object {
|
open class Accept : Object {
|
||||||
@JsonDeserialize(using = ObjectDeserializer::class)
|
@JsonDeserialize(using = ObjectDeserializer::class)
|
|
@ -1,6 +1,8 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.ObjectDeserializer
|
||||||
|
|
||||||
open class Create : Object {
|
open class Create : Object {
|
||||||
@JsonDeserialize(using = ObjectDeserializer::class)
|
@JsonDeserialize(using = ObjectDeserializer::class)
|
|
@ -1,4 +1,6 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
|
||||||
open class Document : Object {
|
open class Document : Object {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
|
||||||
open class Emoji : Object {
|
open class Emoji : Object {
|
||||||
var updated: String? = null
|
var updated: String? = null
|
|
@ -1,4 +1,6 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
|
||||||
open class Follow : Object {
|
open class Follow : Object {
|
||||||
var `object`: String? = null
|
var `object`: String? = null
|
|
@ -1,4 +1,6 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
|
||||||
open class Image : Object {
|
open class Image : Object {
|
||||||
private var mediaType: String? = null
|
private var mediaType: String? = null
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect
|
import com.fasterxml.jackson.annotation.JsonAutoDetect
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator
|
import com.fasterxml.jackson.annotation.JsonCreator
|
|
@ -1,4 +1,6 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
|
||||||
open class Key : Object {
|
open class Key : Object {
|
||||||
var owner: String? = null
|
var owner: String? = null
|
|
@ -1,6 +1,8 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.ObjectDeserializer
|
||||||
|
|
||||||
open class Like : Object {
|
open class Like : Object {
|
||||||
var `object`: String? = null
|
var `object`: String? = null
|
|
@ -1,4 +1,6 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
|
||||||
open class Note : Object {
|
open class Note : Object {
|
||||||
var attributedTo: String? = null
|
var attributedTo: String? = null
|
|
@ -1,4 +1,6 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
|
||||||
open class Person : Object {
|
open class Person : Object {
|
||||||
var preferredUsername: String? = null
|
var preferredUsername: String? = null
|
|
@ -1,6 +1,8 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.ObjectDeserializer
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
|
||||||
open class Undo : Object {
|
open class Undo : Object {
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.domain.model.wellknown
|
package dev.usbharu.hideout.activitypub.domain.model.nodeinfo
|
||||||
|
|
||||||
data class Nodeinfo(
|
data class Nodeinfo(
|
||||||
val links: List<Links>
|
val links: List<Links>
|
|
@ -1,6 +1,6 @@
|
||||||
@file:Suppress("ClassName")
|
@file:Suppress("ClassName")
|
||||||
|
|
||||||
package dev.usbharu.hideout.domain.model.wellknown
|
package dev.usbharu.hideout.activitypub.domain.model.nodeinfo
|
||||||
|
|
||||||
@Suppress("ClassNaming")
|
@Suppress("ClassNaming")
|
||||||
data class Nodeinfo2_0(
|
data class Nodeinfo2_0(
|
|
@ -1,9 +1,10 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model.`object`
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonGenerator
|
import com.fasterxml.jackson.core.JsonGenerator
|
||||||
import com.fasterxml.jackson.databind.JsonSerializer
|
import com.fasterxml.jackson.databind.JsonSerializer
|
||||||
import com.fasterxml.jackson.databind.SerializerProvider
|
import com.fasterxml.jackson.databind.SerializerProvider
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.JsonLd
|
||||||
|
|
||||||
open class Object : JsonLd {
|
open class Object : JsonLd {
|
||||||
@JsonSerialize(using = TypeSerializer::class)
|
@JsonSerialize(using = TypeSerializer::class)
|
|
@ -1,10 +1,11 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model.`object`
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonParser
|
import com.fasterxml.jackson.core.JsonParser
|
||||||
import com.fasterxml.jackson.databind.DeserializationContext
|
import com.fasterxml.jackson.databind.DeserializationContext
|
||||||
import com.fasterxml.jackson.databind.JsonDeserializer
|
import com.fasterxml.jackson.databind.JsonDeserializer
|
||||||
import com.fasterxml.jackson.databind.JsonNode
|
import com.fasterxml.jackson.databind.JsonNode
|
||||||
import dev.usbharu.hideout.service.ap.ExtendedActivityVocabulary
|
import dev.usbharu.hideout.activitypub.domain.model.*
|
||||||
|
import dev.usbharu.hideout.activitypub.service.common.ExtendedActivityVocabulary
|
||||||
|
|
||||||
class ObjectDeserializer : JsonDeserializer<Object>() {
|
class ObjectDeserializer : JsonDeserializer<Object>() {
|
||||||
@Suppress("LongMethod", "CyclomaticComplexMethod")
|
@Suppress("LongMethod", "CyclomaticComplexMethod")
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.domain.model.ap
|
package dev.usbharu.hideout.activitypub.domain.model.`object`
|
||||||
|
|
||||||
open class ObjectValue : Object {
|
open class ObjectValue : Object {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.domain.model.wellknown
|
package dev.usbharu.hideout.activitypub.domain.model.webfinger
|
||||||
|
|
||||||
data class WebFinger(val subject: String, val links: List<Link>) {
|
data class WebFinger(val subject: String, val links: List<Link>) {
|
||||||
data class Link(val rel: String, val type: String, val href: String)
|
data class Link(val rel: String, val type: String, val href: String)
|
|
@ -1,11 +1,14 @@
|
||||||
package dev.usbharu.hideout.query.activitypub
|
package dev.usbharu.hideout.activitypub.infrastructure.exposedquery
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Document
|
import dev.usbharu.hideout.activitypub.domain.model.Document
|
||||||
import dev.usbharu.hideout.domain.model.ap.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Post
|
import dev.usbharu.hideout.activitypub.query.NoteQueryService
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Visibility
|
import dev.usbharu.hideout.activitypub.service.`object`.note.APNoteServiceImpl.Companion.public
|
||||||
import dev.usbharu.hideout.repository.*
|
import dev.usbharu.hideout.application.infrastructure.exposed.QueryMapper
|
||||||
import dev.usbharu.hideout.service.ap.APNoteServiceImpl.Companion.public
|
import dev.usbharu.hideout.core.domain.model.post.Post
|
||||||
|
import dev.usbharu.hideout.core.domain.model.post.PostRepository
|
||||||
|
import dev.usbharu.hideout.core.domain.model.post.Visibility
|
||||||
|
import dev.usbharu.hideout.core.infrastructure.exposedrepository.*
|
||||||
import org.jetbrains.exposed.sql.Query
|
import org.jetbrains.exposed.sql.Query
|
||||||
import org.jetbrains.exposed.sql.ResultRow
|
import org.jetbrains.exposed.sql.ResultRow
|
||||||
import org.jetbrains.exposed.sql.select
|
import org.jetbrains.exposed.sql.select
|
||||||
|
@ -24,7 +27,7 @@ class NoteQueryServiceImpl(private val postRepository: PostRepository, private v
|
||||||
.let { it.toNote() to postQueryMapper.map(it).first() }
|
.let { it.toNote() to postQueryMapper.map(it).first() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun ResultRow.toNote(mediaList: List<dev.usbharu.hideout.domain.model.hideout.entity.Media>): Note {
|
private suspend fun ResultRow.toNote(mediaList: List<dev.usbharu.hideout.core.domain.model.media.Media>): Note {
|
||||||
val replyId = this[Posts.replyId]
|
val replyId = this[Posts.replyId]
|
||||||
val replyTo = if (replyId != null) {
|
val replyTo = if (replyId != null) {
|
||||||
postRepository.findById(replyId).url
|
postRepository.findById(replyId).url
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.controller
|
package dev.usbharu.hideout.activitypub.interfaces.api.actor
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Person
|
import dev.usbharu.hideout.activitypub.domain.model.Person
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
||||||
import org.springframework.web.bind.annotation.GetMapping
|
import org.springframework.web.bind.annotation.GetMapping
|
||||||
import org.springframework.web.bind.annotation.PathVariable
|
import org.springframework.web.bind.annotation.PathVariable
|
|
@ -1,7 +1,7 @@
|
||||||
package dev.usbharu.hideout.controller
|
package dev.usbharu.hideout.activitypub.interfaces.api.actor
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Person
|
import dev.usbharu.hideout.activitypub.domain.model.Person
|
||||||
import dev.usbharu.hideout.service.ap.APUserService
|
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
||||||
import org.springframework.http.HttpStatus
|
import org.springframework.http.HttpStatus
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
||||||
import org.springframework.web.bind.annotation.RestController
|
import org.springframework.web.bind.annotation.RestController
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.domain.model
|
package dev.usbharu.hideout.activitypub.interfaces.api.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.JsonLd
|
import dev.usbharu.hideout.activitypub.domain.model.JsonLd
|
||||||
import dev.usbharu.hideout.util.HttpUtil.Activity
|
import dev.usbharu.hideout.util.HttpUtil.Activity
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.controller.wellknown
|
package dev.usbharu.hideout.activitypub.interfaces.api.hostmeta
|
||||||
|
|
||||||
import dev.usbharu.hideout.config.ApplicationConfig
|
import dev.usbharu.hideout.application.config.ApplicationConfig
|
||||||
import org.intellij.lang.annotations.Language
|
import org.intellij.lang.annotations.Language
|
||||||
import org.springframework.http.HttpStatus
|
import org.springframework.http.HttpStatus
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.controller
|
package dev.usbharu.hideout.activitypub.interfaces.api.inbox
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus
|
import org.springframework.http.HttpStatus
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.controller
|
package dev.usbharu.hideout.activitypub.interfaces.api.inbox
|
||||||
|
|
||||||
import dev.usbharu.hideout.service.ap.APService
|
import dev.usbharu.hideout.activitypub.service.common.APService
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.http.HttpStatus
|
import org.springframework.http.HttpStatus
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.usbharu.hideout.controller.wellknown
|
package dev.usbharu.hideout.activitypub.interfaces.api.nodeinfo
|
||||||
|
|
||||||
import dev.usbharu.hideout.config.ApplicationConfig
|
import dev.usbharu.hideout.activitypub.domain.model.nodeinfo.Nodeinfo
|
||||||
import dev.usbharu.hideout.domain.model.wellknown.Nodeinfo
|
import dev.usbharu.hideout.activitypub.domain.model.nodeinfo.Nodeinfo2_0
|
||||||
import dev.usbharu.hideout.domain.model.wellknown.Nodeinfo2_0
|
import dev.usbharu.hideout.application.config.ApplicationConfig
|
||||||
import org.springframework.http.HttpStatus
|
import org.springframework.http.HttpStatus
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
||||||
import org.springframework.web.bind.annotation.GetMapping
|
import org.springframework.web.bind.annotation.GetMapping
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.controller
|
package dev.usbharu.hideout.activitypub.interfaces.api.note
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
||||||
import org.springframework.security.core.annotation.CurrentSecurityContext
|
import org.springframework.security.core.annotation.CurrentSecurityContext
|
||||||
import org.springframework.security.core.context.SecurityContext
|
import org.springframework.security.core.context.SecurityContext
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.usbharu.hideout.controller
|
package dev.usbharu.hideout.activitypub.interfaces.api.note
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.service.api.NoteApApiService
|
import dev.usbharu.hideout.activitypub.service.`object`.note.NoteApApiService
|
||||||
import dev.usbharu.hideout.service.signature.HttpSignatureUser
|
import dev.usbharu.hideout.core.infrastructure.springframework.httpsignature.HttpSignatureUser
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
||||||
import org.springframework.security.core.annotation.CurrentSecurityContext
|
import org.springframework.security.core.annotation.CurrentSecurityContext
|
||||||
import org.springframework.security.core.context.SecurityContext
|
import org.springframework.security.core.context.SecurityContext
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.controller
|
package dev.usbharu.hideout.activitypub.interfaces.api.outbox
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus
|
import org.springframework.http.HttpStatus
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.controller
|
package dev.usbharu.hideout.activitypub.interfaces.api.outbox
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus
|
import org.springframework.http.HttpStatus
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.usbharu.hideout.controller.wellknown
|
package dev.usbharu.hideout.activitypub.interfaces.api.webfinger
|
||||||
|
|
||||||
import dev.usbharu.hideout.config.ApplicationConfig
|
import dev.usbharu.hideout.activitypub.domain.model.webfinger.WebFinger
|
||||||
import dev.usbharu.hideout.domain.model.wellknown.WebFinger
|
import dev.usbharu.hideout.activitypub.service.webfinger.WebFingerApiService
|
||||||
import dev.usbharu.hideout.service.api.WebFingerApiService
|
import dev.usbharu.hideout.application.config.ApplicationConfig
|
||||||
import dev.usbharu.hideout.util.AcctUtil
|
import dev.usbharu.hideout.util.AcctUtil
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
|
@ -0,0 +1,8 @@
|
||||||
|
package dev.usbharu.hideout.activitypub.query
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
|
import dev.usbharu.hideout.core.domain.model.post.Post
|
||||||
|
|
||||||
|
interface NoteQueryService {
|
||||||
|
suspend fun findById(id: Long): Pair<Note, Post>
|
||||||
|
}
|
|
@ -1,14 +1,14 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.activity.accept
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubResponse
|
import dev.usbharu.hideout.activitypub.domain.exception.IllegalActivityPubObjectException
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubStringResponse
|
import dev.usbharu.hideout.activitypub.domain.model.Accept
|
||||||
import dev.usbharu.hideout.domain.model.ap.Accept
|
import dev.usbharu.hideout.activitypub.domain.model.Follow
|
||||||
import dev.usbharu.hideout.domain.model.ap.Follow
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
||||||
import dev.usbharu.hideout.exception.ap.IllegalActivityPubObjectException
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
||||||
import dev.usbharu.hideout.query.FollowerQueryService
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.query.UserQueryService
|
import dev.usbharu.hideout.core.query.FollowerQueryService
|
||||||
import dev.usbharu.hideout.service.core.Transaction
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import dev.usbharu.hideout.service.user.UserService
|
import dev.usbharu.hideout.core.service.user.UserService
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
|
@ -1,11 +1,12 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.activity.create
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubResponse
|
import dev.usbharu.hideout.activitypub.domain.exception.IllegalActivityPubObjectException
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubStringResponse
|
import dev.usbharu.hideout.activitypub.domain.model.Create
|
||||||
import dev.usbharu.hideout.domain.model.ap.Create
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.domain.model.ap.Note
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
||||||
import dev.usbharu.hideout.exception.ap.IllegalActivityPubObjectException
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
||||||
import dev.usbharu.hideout.service.core.Transaction
|
import dev.usbharu.hideout.activitypub.service.`object`.note.APNoteService
|
||||||
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.service.ap.job
|
package dev.usbharu.hideout.activitypub.service.activity.follow
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.job.ReceiveFollowJob
|
import dev.usbharu.hideout.core.external.job.ReceiveFollowJob
|
||||||
import kjob.core.job.JobProps
|
import kjob.core.job.JobProps
|
||||||
|
|
||||||
interface APReceiveFollowJobService {
|
interface APReceiveFollowJobService {
|
|
@ -1,15 +1,15 @@
|
||||||
package dev.usbharu.hideout.service.ap.job
|
package dev.usbharu.hideout.activitypub.service.activity.follow
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import com.fasterxml.jackson.module.kotlin.readValue
|
import com.fasterxml.jackson.module.kotlin.readValue
|
||||||
import dev.usbharu.hideout.domain.model.ap.Accept
|
import dev.usbharu.hideout.activitypub.domain.model.Accept
|
||||||
import dev.usbharu.hideout.domain.model.ap.Follow
|
import dev.usbharu.hideout.activitypub.domain.model.Follow
|
||||||
import dev.usbharu.hideout.domain.model.job.ReceiveFollowJob
|
import dev.usbharu.hideout.activitypub.service.common.APRequestService
|
||||||
import dev.usbharu.hideout.query.UserQueryService
|
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
||||||
import dev.usbharu.hideout.service.ap.APRequestService
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.service.ap.APUserService
|
import dev.usbharu.hideout.core.external.job.ReceiveFollowJob
|
||||||
import dev.usbharu.hideout.service.core.Transaction
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import dev.usbharu.hideout.service.user.UserService
|
import dev.usbharu.hideout.core.service.user.UserService
|
||||||
import kjob.core.job.JobProps
|
import kjob.core.job.JobProps
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.beans.factory.annotation.Qualifier
|
import org.springframework.beans.factory.annotation.Qualifier
|
|
@ -1,11 +1,11 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.activity.follow
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubResponse
|
import dev.usbharu.hideout.activitypub.domain.model.Follow
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubStringResponse
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
||||||
import dev.usbharu.hideout.domain.model.ap.Follow
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
||||||
import dev.usbharu.hideout.domain.model.job.ReceiveFollowJob
|
import dev.usbharu.hideout.core.external.job.ReceiveFollowJob
|
||||||
import dev.usbharu.hideout.service.job.JobQueueParentService
|
import dev.usbharu.hideout.core.service.job.JobQueueParentService
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.beans.factory.annotation.Qualifier
|
import org.springframework.beans.factory.annotation.Qualifier
|
|
@ -1,7 +1,8 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.activity.follow
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Follow
|
import dev.usbharu.hideout.activitypub.domain.model.Follow
|
||||||
import dev.usbharu.hideout.domain.model.hideout.dto.SendFollowDto
|
import dev.usbharu.hideout.activitypub.service.common.APRequestService
|
||||||
|
import dev.usbharu.hideout.core.service.follow.SendFollowDto
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
interface APSendFollowService {
|
interface APSendFollowService {
|
|
@ -1,13 +1,15 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.activity.like
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubResponse
|
import dev.usbharu.hideout.activitypub.domain.exception.FailedToGetActivityPubResourceException
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubStringResponse
|
import dev.usbharu.hideout.activitypub.domain.exception.IllegalActivityPubObjectException
|
||||||
import dev.usbharu.hideout.domain.model.ap.Like
|
import dev.usbharu.hideout.activitypub.domain.model.Like
|
||||||
import dev.usbharu.hideout.exception.ap.FailedToGetActivityPubResourceException
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
||||||
import dev.usbharu.hideout.exception.ap.IllegalActivityPubObjectException
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
||||||
import dev.usbharu.hideout.query.PostQueryService
|
import dev.usbharu.hideout.activitypub.service.`object`.note.APNoteService
|
||||||
import dev.usbharu.hideout.service.core.Transaction
|
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
||||||
import dev.usbharu.hideout.service.reaction.ReactionService
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
|
import dev.usbharu.hideout.core.query.PostQueryService
|
||||||
|
import dev.usbharu.hideout.core.service.reaction.ReactionService
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
|
@ -1,13 +1,13 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.activity.like
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Reaction
|
import dev.usbharu.hideout.core.domain.model.reaction.Reaction
|
||||||
import dev.usbharu.hideout.domain.model.job.DeliverReactionJob
|
import dev.usbharu.hideout.core.external.job.DeliverReactionJob
|
||||||
import dev.usbharu.hideout.domain.model.job.DeliverRemoveReactionJob
|
import dev.usbharu.hideout.core.external.job.DeliverRemoveReactionJob
|
||||||
import dev.usbharu.hideout.query.FollowerQueryService
|
import dev.usbharu.hideout.core.query.FollowerQueryService
|
||||||
import dev.usbharu.hideout.query.PostQueryService
|
import dev.usbharu.hideout.core.query.PostQueryService
|
||||||
import dev.usbharu.hideout.query.UserQueryService
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import dev.usbharu.hideout.service.job.JobQueueParentService
|
import dev.usbharu.hideout.core.service.job.JobQueueParentService
|
||||||
import org.springframework.beans.factory.annotation.Qualifier
|
import org.springframework.beans.factory.annotation.Qualifier
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package dev.usbharu.hideout.service.ap.job
|
package dev.usbharu.hideout.activitypub.service.activity.like
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.job.DeliverReactionJob
|
import dev.usbharu.hideout.core.external.job.DeliverReactionJob
|
||||||
import dev.usbharu.hideout.domain.model.job.DeliverRemoveReactionJob
|
import dev.usbharu.hideout.core.external.job.DeliverRemoveReactionJob
|
||||||
import kjob.core.job.JobProps
|
import kjob.core.job.JobProps
|
||||||
|
|
||||||
interface ApReactionJobService {
|
interface ApReactionJobService {
|
|
@ -1,14 +1,14 @@
|
||||||
package dev.usbharu.hideout.service.ap.job
|
package dev.usbharu.hideout.activitypub.service.activity.like
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import com.fasterxml.jackson.module.kotlin.readValue
|
import com.fasterxml.jackson.module.kotlin.readValue
|
||||||
import dev.usbharu.hideout.config.ApplicationConfig
|
import dev.usbharu.hideout.activitypub.domain.model.Like
|
||||||
import dev.usbharu.hideout.domain.model.ap.Like
|
import dev.usbharu.hideout.activitypub.domain.model.Undo
|
||||||
import dev.usbharu.hideout.domain.model.ap.Undo
|
import dev.usbharu.hideout.activitypub.service.common.APRequestService
|
||||||
import dev.usbharu.hideout.domain.model.job.DeliverReactionJob
|
import dev.usbharu.hideout.application.config.ApplicationConfig
|
||||||
import dev.usbharu.hideout.domain.model.job.DeliverRemoveReactionJob
|
import dev.usbharu.hideout.core.external.job.DeliverReactionJob
|
||||||
import dev.usbharu.hideout.query.UserQueryService
|
import dev.usbharu.hideout.core.external.job.DeliverRemoveReactionJob
|
||||||
import dev.usbharu.hideout.service.ap.APRequestService
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import kjob.core.job.JobProps
|
import kjob.core.job.JobProps
|
||||||
import org.springframework.beans.factory.annotation.Qualifier
|
import org.springframework.beans.factory.annotation.Qualifier
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
|
@ -1,12 +1,13 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.activity.undo
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubResponse
|
import dev.usbharu.hideout.activitypub.domain.model.Follow
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubStringResponse
|
import dev.usbharu.hideout.activitypub.domain.model.Undo
|
||||||
import dev.usbharu.hideout.domain.model.ap.Follow
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
||||||
import dev.usbharu.hideout.domain.model.ap.Undo
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubStringResponse
|
||||||
import dev.usbharu.hideout.query.UserQueryService
|
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
||||||
import dev.usbharu.hideout.service.core.Transaction
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.service.user.UserService
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
|
import dev.usbharu.hideout.core.service.user.UserService
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Object
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.User
|
import dev.usbharu.hideout.core.domain.model.user.User
|
||||||
|
|
||||||
interface APRequestService {
|
interface APRequestService {
|
||||||
suspend fun <R : Object> apGet(url: String, signer: User? = null, responseClass: Class<R>): R
|
suspend fun <R : Object> apGet(url: String, signer: User? = null, responseClass: Class<R>): R
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import dev.usbharu.hideout.domain.model.ap.Object
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.User
|
import dev.usbharu.hideout.core.domain.model.user.User
|
||||||
import dev.usbharu.hideout.util.Base64Util
|
import dev.usbharu.hideout.util.Base64Util
|
||||||
import dev.usbharu.hideout.util.HttpUtil.Activity
|
import dev.usbharu.hideout.util.HttpUtil.Activity
|
||||||
import dev.usbharu.hideout.util.RsaUtil
|
import dev.usbharu.hideout.util.RsaUtil
|
|
@ -1,7 +1,7 @@
|
||||||
package dev.usbharu.hideout.service.ap.resource
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Object
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.User
|
import dev.usbharu.hideout.core.domain.model.user.User
|
||||||
|
|
||||||
interface APResourceResolveService {
|
interface APResourceResolveService {
|
||||||
suspend fun <T : Object> resolve(url: String, clazz: Class<T>, singer: User?): T
|
suspend fun <T : Object> resolve(url: String, clazz: Class<T>, singer: User?): T
|
|
@ -1,9 +1,8 @@
|
||||||
package dev.usbharu.hideout.service.ap.resource
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Object
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.User
|
import dev.usbharu.hideout.core.domain.model.user.User
|
||||||
import dev.usbharu.hideout.repository.UserRepository
|
import dev.usbharu.hideout.core.domain.model.user.UserRepository
|
||||||
import dev.usbharu.hideout.service.ap.APRequestService
|
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
@Service
|
@Service
|
|
@ -1,11 +1,16 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode
|
import com.fasterxml.jackson.databind.JsonNode
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import com.fasterxml.jackson.module.kotlin.readValue
|
import com.fasterxml.jackson.module.kotlin.readValue
|
||||||
import dev.usbharu.hideout.domain.model.ActivityPubResponse
|
import dev.usbharu.hideout.activitypub.domain.exception.JsonParseException
|
||||||
import dev.usbharu.hideout.domain.model.ap.Follow
|
import dev.usbharu.hideout.activitypub.domain.model.Follow
|
||||||
import dev.usbharu.hideout.exception.JsonParseException
|
import dev.usbharu.hideout.activitypub.interfaces.api.common.ActivityPubResponse
|
||||||
|
import dev.usbharu.hideout.activitypub.service.activity.accept.APAcceptService
|
||||||
|
import dev.usbharu.hideout.activitypub.service.activity.create.APCreateService
|
||||||
|
import dev.usbharu.hideout.activitypub.service.activity.follow.APReceiveFollowService
|
||||||
|
import dev.usbharu.hideout.activitypub.service.activity.like.APLikeService
|
||||||
|
import dev.usbharu.hideout.activitypub.service.activity.undo.APUndoService
|
||||||
import org.slf4j.Logger
|
import org.slf4j.Logger
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.beans.factory.annotation.Qualifier
|
import org.springframework.beans.factory.annotation.Qualifier
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.service.ap.job
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.job.HideoutJob
|
import dev.usbharu.hideout.core.external.job.HideoutJob
|
||||||
import kjob.core.dsl.JobContextWithProps
|
import kjob.core.dsl.JobContextWithProps
|
||||||
|
|
||||||
interface ApJobService {
|
interface ApJobService {
|
|
@ -1,6 +1,9 @@
|
||||||
package dev.usbharu.hideout.service.ap.job
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.job.*
|
import dev.usbharu.hideout.activitypub.service.activity.follow.APReceiveFollowJobService
|
||||||
|
import dev.usbharu.hideout.activitypub.service.activity.like.ApReactionJobService
|
||||||
|
import dev.usbharu.hideout.activitypub.service.`object`.note.ApNoteJobService
|
||||||
|
import dev.usbharu.hideout.core.external.job.*
|
||||||
import kjob.core.dsl.JobContextWithProps
|
import kjob.core.dsl.JobContextWithProps
|
||||||
import kjob.core.job.JobProps
|
import kjob.core.job.JobProps
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.service.ap.resource
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Object
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
|
|
||||||
interface CacheManager {
|
interface CacheManager {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.service.ap.resource
|
package dev.usbharu.hideout.activitypub.service.common
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Object
|
import dev.usbharu.hideout.activitypub.domain.model.`object`.Object
|
||||||
import dev.usbharu.hideout.util.LruCache
|
import dev.usbharu.hideout.util.LruCache
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.sync.Mutex
|
import kotlinx.coroutines.sync.Mutex
|
|
@ -1,23 +1,24 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.`object`.note
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import dev.usbharu.hideout.domain.model.ap.Note
|
import dev.usbharu.hideout.activitypub.domain.exception.FailedToGetActivityPubResourceException
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Post
|
import dev.usbharu.hideout.activitypub.domain.exception.IllegalActivityPubObjectException
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Visibility
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.domain.model.job.DeliverPostJob
|
import dev.usbharu.hideout.activitypub.service.common.APResourceResolveService
|
||||||
import dev.usbharu.hideout.exception.FailedToGetResourcesException
|
import dev.usbharu.hideout.activitypub.service.common.resolve
|
||||||
import dev.usbharu.hideout.exception.ap.FailedToGetActivityPubResourceException
|
import dev.usbharu.hideout.activitypub.service.`object`.user.APUserService
|
||||||
import dev.usbharu.hideout.exception.ap.IllegalActivityPubObjectException
|
import dev.usbharu.hideout.core.domain.exception.FailedToGetResourcesException
|
||||||
import dev.usbharu.hideout.query.FollowerQueryService
|
import dev.usbharu.hideout.core.domain.model.post.Post
|
||||||
import dev.usbharu.hideout.query.MediaQueryService
|
import dev.usbharu.hideout.core.domain.model.post.PostRepository
|
||||||
import dev.usbharu.hideout.query.PostQueryService
|
import dev.usbharu.hideout.core.domain.model.post.Visibility
|
||||||
import dev.usbharu.hideout.query.UserQueryService
|
import dev.usbharu.hideout.core.external.job.DeliverPostJob
|
||||||
import dev.usbharu.hideout.repository.PostRepository
|
import dev.usbharu.hideout.core.query.FollowerQueryService
|
||||||
import dev.usbharu.hideout.service.ap.resource.APResourceResolveService
|
import dev.usbharu.hideout.core.query.MediaQueryService
|
||||||
import dev.usbharu.hideout.service.ap.resource.resolve
|
import dev.usbharu.hideout.core.query.PostQueryService
|
||||||
import dev.usbharu.hideout.service.job.JobQueueParentService
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import dev.usbharu.hideout.service.post.PostCreateInterceptor
|
import dev.usbharu.hideout.core.service.job.JobQueueParentService
|
||||||
import dev.usbharu.hideout.service.post.PostService
|
import dev.usbharu.hideout.core.service.post.PostCreateInterceptor
|
||||||
|
import dev.usbharu.hideout.core.service.post.PostService
|
||||||
import io.ktor.client.plugins.*
|
import io.ktor.client.plugins.*
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Deferred
|
import kotlinx.coroutines.Deferred
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.service.ap.job
|
package dev.usbharu.hideout.activitypub.service.`object`.note
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.job.DeliverPostJob
|
import dev.usbharu.hideout.core.external.job.DeliverPostJob
|
||||||
import kjob.core.job.JobProps
|
import kjob.core.job.JobProps
|
||||||
|
|
||||||
interface ApNoteJobService {
|
interface ApNoteJobService {
|
|
@ -1,17 +1,17 @@
|
||||||
package dev.usbharu.hideout.service.ap.job
|
package dev.usbharu.hideout.activitypub.service.`object`.note
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
import com.fasterxml.jackson.module.kotlin.readValue
|
import com.fasterxml.jackson.module.kotlin.readValue
|
||||||
import dev.usbharu.hideout.config.ApplicationConfig
|
import dev.usbharu.hideout.activitypub.domain.model.Create
|
||||||
import dev.usbharu.hideout.domain.model.ap.Create
|
import dev.usbharu.hideout.activitypub.domain.model.Document
|
||||||
import dev.usbharu.hideout.domain.model.ap.Document
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.domain.model.ap.Note
|
import dev.usbharu.hideout.activitypub.service.common.APRequestService
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Post
|
import dev.usbharu.hideout.application.config.ApplicationConfig
|
||||||
import dev.usbharu.hideout.domain.model.job.DeliverPostJob
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.query.UserQueryService
|
import dev.usbharu.hideout.core.domain.model.media.Media
|
||||||
import dev.usbharu.hideout.service.ap.APNoteServiceImpl
|
import dev.usbharu.hideout.core.domain.model.post.Post
|
||||||
import dev.usbharu.hideout.service.ap.APRequestService
|
import dev.usbharu.hideout.core.external.job.DeliverPostJob
|
||||||
import dev.usbharu.hideout.service.core.Transaction
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import kjob.core.job.JobProps
|
import kjob.core.job.JobProps
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.beans.factory.annotation.Qualifier
|
import org.springframework.beans.factory.annotation.Qualifier
|
||||||
|
@ -30,7 +30,7 @@ class ApNoteJobServiceImpl(
|
||||||
val actor = props[DeliverPostJob.actor]
|
val actor = props[DeliverPostJob.actor]
|
||||||
val postEntity = objectMapper.readValue<Post>(props[DeliverPostJob.post])
|
val postEntity = objectMapper.readValue<Post>(props[DeliverPostJob.post])
|
||||||
val mediaList =
|
val mediaList =
|
||||||
objectMapper.readValue<List<dev.usbharu.hideout.domain.model.hideout.entity.Media>>(
|
objectMapper.readValue<List<Media>>(
|
||||||
props[DeliverPostJob.media]
|
props[DeliverPostJob.media]
|
||||||
)
|
)
|
||||||
val note = Note(
|
val note = Note(
|
|
@ -0,0 +1,7 @@
|
||||||
|
package dev.usbharu.hideout.activitypub.service.`object`.note
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
|
|
||||||
|
interface NoteApApiService {
|
||||||
|
suspend fun getNote(postId: Long, userId: Long?): Note?
|
||||||
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
package dev.usbharu.hideout.service.api
|
package dev.usbharu.hideout.activitypub.service.`object`.note
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.ap.Note
|
import dev.usbharu.hideout.activitypub.domain.model.Note
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Visibility
|
import dev.usbharu.hideout.activitypub.query.NoteQueryService
|
||||||
import dev.usbharu.hideout.query.FollowerQueryService
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.query.activitypub.NoteQueryService
|
import dev.usbharu.hideout.core.domain.model.post.Visibility
|
||||||
import dev.usbharu.hideout.service.core.Transaction
|
import dev.usbharu.hideout.core.query.FollowerQueryService
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
@Service
|
@Service
|
|
@ -1,18 +1,18 @@
|
||||||
package dev.usbharu.hideout.service.ap
|
package dev.usbharu.hideout.activitypub.service.`object`.user
|
||||||
|
|
||||||
import dev.usbharu.hideout.config.ApplicationConfig
|
import dev.usbharu.hideout.activitypub.domain.exception.IllegalActivityPubObjectException
|
||||||
import dev.usbharu.hideout.domain.model.ap.Image
|
import dev.usbharu.hideout.activitypub.domain.model.Image
|
||||||
import dev.usbharu.hideout.domain.model.ap.Key
|
import dev.usbharu.hideout.activitypub.domain.model.Key
|
||||||
import dev.usbharu.hideout.domain.model.ap.Person
|
import dev.usbharu.hideout.activitypub.domain.model.Person
|
||||||
import dev.usbharu.hideout.domain.model.hideout.dto.RemoteUserCreateDto
|
import dev.usbharu.hideout.activitypub.service.common.APResourceResolveService
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.User
|
import dev.usbharu.hideout.activitypub.service.common.resolve
|
||||||
import dev.usbharu.hideout.exception.FailedToGetResourcesException
|
import dev.usbharu.hideout.application.config.ApplicationConfig
|
||||||
import dev.usbharu.hideout.exception.ap.IllegalActivityPubObjectException
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.query.UserQueryService
|
import dev.usbharu.hideout.core.domain.exception.FailedToGetResourcesException
|
||||||
import dev.usbharu.hideout.service.ap.resource.APResourceResolveService
|
import dev.usbharu.hideout.core.domain.model.user.User
|
||||||
import dev.usbharu.hideout.service.ap.resource.resolve
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import dev.usbharu.hideout.service.core.Transaction
|
import dev.usbharu.hideout.core.service.user.RemoteUserCreateDto
|
||||||
import dev.usbharu.hideout.service.user.UserService
|
import dev.usbharu.hideout.core.service.user.UserService
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
interface APUserService {
|
interface APUserService {
|
|
@ -1,8 +1,8 @@
|
||||||
package dev.usbharu.hideout.service.api
|
package dev.usbharu.hideout.activitypub.service.webfinger
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.User
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.query.UserQueryService
|
import dev.usbharu.hideout.core.domain.model.user.User
|
||||||
import dev.usbharu.hideout.service.core.Transaction
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
@Service
|
@Service
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout
|
package dev.usbharu.hideout.application
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||||
import org.springframework.boot.context.properties.ConfigurationPropertiesScan
|
import org.springframework.boot.context.properties.ConfigurationPropertiesScan
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.config
|
package dev.usbharu.hideout.application.config
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude
|
import com.fasterxml.jackson.annotation.JsonInclude
|
||||||
import com.fasterxml.jackson.databind.DeserializationFeature
|
import com.fasterxml.jackson.databind.DeserializationFeature
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.config
|
package dev.usbharu.hideout.application.config
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean
|
import org.springframework.context.annotation.Bean
|
||||||
import org.springframework.context.annotation.Configuration
|
import org.springframework.context.annotation.Configuration
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.config
|
package dev.usbharu.hideout.application.config
|
||||||
|
|
||||||
import io.ktor.client.*
|
import io.ktor.client.*
|
||||||
import io.ktor.client.engine.cio.*
|
import io.ktor.client.engine.cio.*
|
|
@ -1,9 +1,9 @@
|
||||||
package dev.usbharu.hideout
|
package dev.usbharu.hideout.application.config
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.job.HideoutJob
|
import dev.usbharu.hideout.activitypub.service.common.ApJobService
|
||||||
import dev.usbharu.hideout.service.ap.job.ApJobService
|
import dev.usbharu.hideout.core.external.job.HideoutJob
|
||||||
import dev.usbharu.hideout.service.job.JobQueueParentService
|
import dev.usbharu.hideout.core.service.job.JobQueueParentService
|
||||||
import dev.usbharu.hideout.service.job.JobQueueWorkerService
|
import dev.usbharu.hideout.core.service.job.JobQueueWorkerService
|
||||||
import org.slf4j.Logger
|
import org.slf4j.Logger
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.boot.ApplicationArguments
|
import org.springframework.boot.ApplicationArguments
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.service.core
|
package dev.usbharu.hideout.application.config
|
||||||
|
|
||||||
import jakarta.servlet.Filter
|
import jakarta.servlet.Filter
|
||||||
import jakarta.servlet.FilterChain
|
import jakarta.servlet.FilterChain
|
|
@ -1,5 +1,6 @@
|
||||||
package dev.usbharu.hideout.config
|
package dev.usbharu.hideout.application.config
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.generate.JsonOrFormModelMethodProcessor
|
||||||
import org.springframework.context.annotation.Bean
|
import org.springframework.context.annotation.Bean
|
||||||
import org.springframework.context.annotation.Configuration
|
import org.springframework.context.annotation.Configuration
|
||||||
import org.springframework.http.converter.HttpMessageConverter
|
import org.springframework.http.converter.HttpMessageConverter
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.config
|
package dev.usbharu.hideout.application.config
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude
|
import com.fasterxml.jackson.annotation.JsonInclude
|
||||||
import com.nimbusds.jose.jwk.JWKSet
|
import com.nimbusds.jose.jwk.JWKSet
|
||||||
|
@ -6,12 +6,12 @@ import com.nimbusds.jose.jwk.RSAKey
|
||||||
import com.nimbusds.jose.jwk.source.ImmutableJWKSet
|
import com.nimbusds.jose.jwk.source.ImmutableJWKSet
|
||||||
import com.nimbusds.jose.jwk.source.JWKSource
|
import com.nimbusds.jose.jwk.source.JWKSource
|
||||||
import com.nimbusds.jose.proc.SecurityContext
|
import com.nimbusds.jose.proc.SecurityContext
|
||||||
import dev.usbharu.hideout.domain.model.UserDetailsImpl
|
import dev.usbharu.hideout.core.infrastructure.springframework.oauth2.UserDetailsImpl
|
||||||
import dev.usbharu.hideout.query.UserQueryService
|
import dev.usbharu.hideout.core.query.UserQueryService
|
||||||
import dev.usbharu.hideout.service.core.Transaction
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.service.signature.HttpSignatureFilter
|
import dev.usbharu.hideout.core.infrastructure.springframework.httpsignature.HttpSignatureFilter
|
||||||
import dev.usbharu.hideout.service.signature.HttpSignatureUserDetailsService
|
import dev.usbharu.hideout.core.infrastructure.springframework.httpsignature.HttpSignatureUserDetailsService
|
||||||
import dev.usbharu.hideout.service.signature.HttpSignatureVerifierComposite
|
import dev.usbharu.hideout.core.infrastructure.springframework.httpsignature.HttpSignatureVerifierComposite
|
||||||
import dev.usbharu.hideout.util.RsaUtil
|
import dev.usbharu.hideout.util.RsaUtil
|
||||||
import dev.usbharu.httpsignature.sign.RsaSha256HttpSignatureSigner
|
import dev.usbharu.httpsignature.sign.RsaSha256HttpSignatureSigner
|
||||||
import dev.usbharu.httpsignature.verify.DefaultSignatureHeaderParser
|
import dev.usbharu.httpsignature.verify.DefaultSignatureHeaderParser
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.config
|
package dev.usbharu.hideout.application.config
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired
|
import org.springframework.beans.factory.annotation.Autowired
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties
|
import org.springframework.boot.context.properties.ConfigurationProperties
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.service.core
|
package dev.usbharu.hideout.application.external
|
||||||
|
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package dev.usbharu.hideout.service.core
|
package dev.usbharu.hideout.application.infrastructure.exposed
|
||||||
|
|
||||||
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import kotlinx.coroutines.slf4j.MDCContext
|
import kotlinx.coroutines.slf4j.MDCContext
|
||||||
import org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction
|
import org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.repository
|
package dev.usbharu.hideout.application.infrastructure.exposed
|
||||||
|
|
||||||
import org.jetbrains.exposed.sql.Query
|
import org.jetbrains.exposed.sql.Query
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.repository
|
package dev.usbharu.hideout.application.infrastructure.exposed
|
||||||
|
|
||||||
import org.jetbrains.exposed.sql.ResultRow
|
import org.jetbrains.exposed.sql.ResultRow
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.service.core
|
package dev.usbharu.hideout.application.service.id
|
||||||
|
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.service.core
|
package dev.usbharu.hideout.application.service.id
|
||||||
|
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.sync.Mutex
|
import kotlinx.coroutines.sync.Mutex
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.service.core
|
package dev.usbharu.hideout.application.service.id
|
||||||
|
|
||||||
import org.springframework.context.annotation.Primary
|
import org.springframework.context.annotation.Primary
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
|
@ -1,7 +1,7 @@
|
||||||
package dev.usbharu.hideout.service.core
|
package dev.usbharu.hideout.application.service.init
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Jwt
|
import dev.usbharu.hideout.core.domain.model.meta.Jwt
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Meta
|
import dev.usbharu.hideout.core.domain.model.meta.Meta
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
@Service
|
@Service
|
|
@ -1,9 +1,10 @@
|
||||||
package dev.usbharu.hideout.service.core
|
package dev.usbharu.hideout.application.service.init
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Jwt
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Meta
|
import dev.usbharu.hideout.core.domain.exception.NotInitException
|
||||||
import dev.usbharu.hideout.exception.NotInitException
|
import dev.usbharu.hideout.core.domain.model.meta.Jwt
|
||||||
import dev.usbharu.hideout.repository.MetaRepository
|
import dev.usbharu.hideout.core.domain.model.meta.Meta
|
||||||
|
import dev.usbharu.hideout.core.domain.model.meta.MetaRepository
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
@Service
|
@Service
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.service.core
|
package dev.usbharu.hideout.application.service.init
|
||||||
|
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package dev.usbharu.hideout.service.core
|
package dev.usbharu.hideout.application.service.init
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Jwt
|
import dev.usbharu.hideout.application.external.Transaction
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Meta
|
import dev.usbharu.hideout.core.domain.model.meta.Jwt
|
||||||
import dev.usbharu.hideout.repository.MetaRepository
|
import dev.usbharu.hideout.core.domain.model.meta.Meta
|
||||||
|
import dev.usbharu.hideout.core.domain.model.meta.MetaRepository
|
||||||
import dev.usbharu.hideout.util.ServerUtil
|
import dev.usbharu.hideout.util.ServerUtil
|
||||||
import org.slf4j.Logger
|
import org.slf4j.Logger
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception
|
package dev.usbharu.hideout.core.domain.exception
|
||||||
|
|
||||||
import java.io.Serial
|
import java.io.Serial
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception
|
package dev.usbharu.hideout.core.domain.exception
|
||||||
|
|
||||||
import java.io.Serial
|
import java.io.Serial
|
||||||
import javax.naming.AuthenticationException
|
import javax.naming.AuthenticationException
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception
|
package dev.usbharu.hideout.core.domain.exception
|
||||||
|
|
||||||
import java.io.Serial
|
import java.io.Serial
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception
|
package dev.usbharu.hideout.core.domain.exception
|
||||||
|
|
||||||
import java.io.Serial
|
import java.io.Serial
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception.media
|
package dev.usbharu.hideout.core.domain.exception.media
|
||||||
|
|
||||||
open class MediaConvertException : MediaException {
|
open class MediaConvertException : MediaException {
|
||||||
constructor() : super()
|
constructor() : super()
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception.media
|
package dev.usbharu.hideout.core.domain.exception.media
|
||||||
|
|
||||||
abstract class MediaException : RuntimeException {
|
abstract class MediaException : RuntimeException {
|
||||||
constructor() : super()
|
constructor() : super()
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception.media
|
package dev.usbharu.hideout.core.domain.exception.media
|
||||||
|
|
||||||
open class MediaFileSizeException : MediaException {
|
open class MediaFileSizeException : MediaException {
|
||||||
constructor() : super()
|
constructor() : super()
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception.media
|
package dev.usbharu.hideout.core.domain.exception.media
|
||||||
|
|
||||||
class MediaFileSizeIsZeroException : MediaFileSizeException {
|
class MediaFileSizeIsZeroException : MediaFileSizeException {
|
||||||
constructor() : super()
|
constructor() : super()
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception.media
|
package dev.usbharu.hideout.core.domain.exception.media
|
||||||
|
|
||||||
open class MediaSaveException : MediaException {
|
open class MediaSaveException : MediaException {
|
||||||
constructor() : super()
|
constructor() : super()
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.exception.media
|
package dev.usbharu.hideout.core.domain.exception.media
|
||||||
|
|
||||||
class UnsupportedMediaException : MediaException {
|
class UnsupportedMediaException : MediaException {
|
||||||
constructor() : super()
|
constructor() : super()
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.domain.model.hideout.entity
|
package dev.usbharu.hideout.core.domain.model.media
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.hideout.dto.FileType
|
import dev.usbharu.hideout.core.service.media.FileType
|
||||||
|
|
||||||
data class Media(
|
data class Media(
|
||||||
val id: Long,
|
val id: Long,
|
|
@ -1,6 +1,4 @@
|
||||||
package dev.usbharu.hideout.repository
|
package dev.usbharu.hideout.core.domain.model.media
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Media
|
|
||||||
|
|
||||||
interface MediaRepository {
|
interface MediaRepository {
|
||||||
suspend fun generateId(): Long
|
suspend fun generateId(): Long
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.usbharu.hideout.domain.model.hideout.entity
|
package dev.usbharu.hideout.core.domain.model.meta
|
||||||
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
package dev.usbharu.hideout.core.domain.model.meta
|
||||||
|
|
||||||
|
data class Meta(val version: String, val jwt: Jwt)
|
|
@ -1,6 +1,5 @@
|
||||||
package dev.usbharu.hideout.repository
|
package dev.usbharu.hideout.core.domain.model.meta
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Meta
|
|
||||||
import org.springframework.stereotype.Repository
|
import org.springframework.stereotype.Repository
|
||||||
|
|
||||||
@Repository
|
@Repository
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.usbharu.hideout.domain.model.hideout.entity
|
package dev.usbharu.hideout.core.domain.model.post
|
||||||
|
|
||||||
import dev.usbharu.hideout.config.CharacterLimit
|
import dev.usbharu.hideout.application.config.CharacterLimit
|
||||||
import org.springframework.stereotype.Component
|
import org.springframework.stereotype.Component
|
||||||
|
|
||||||
data class Post private constructor(
|
data class Post private constructor(
|
|
@ -1,6 +1,5 @@
|
||||||
package dev.usbharu.hideout.repository
|
package dev.usbharu.hideout.core.domain.model.post
|
||||||
|
|
||||||
import dev.usbharu.hideout.domain.model.hideout.entity.Post
|
|
||||||
import org.springframework.stereotype.Repository
|
import org.springframework.stereotype.Repository
|
||||||
|
|
||||||
@Suppress("LongParameterList")
|
@Suppress("LongParameterList")
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue