Skip to content

Commit

Permalink
#11 Renamed gateway to botalka (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
vityaman authored Mar 28, 2024
1 parent e465dac commit 28ea466
Show file tree
Hide file tree
Showing 30 changed files with 53 additions and 57 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Gradle Build Check
on:
pull_request:
paths:
- "gateway/**"
- "botalka/**"
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,4 +21,4 @@ jobs:
uses: gradle/actions/setup-gradle@v3

- name: Build Gateway
run: (cd gateway && ./gradlew :build)
run: (cd botalka && ./gradlew :build)
File renamed without changes.
4 changes: 2 additions & 2 deletions gateway/build.gradle.kts → botalka/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ group = "ru.itmo"
version = "0.0.1"

val jvmTarget = "21"
val basePackage = "$group.lms.gateway"
val basePackage = "$group.lms.botalka"

val jooqVersion = "3.19.6"
val testcontainersVersion = "1.19.7"
Expand Down Expand Up @@ -180,7 +180,7 @@ koverReport {
excludes {
classes(
"$basePackage.api.http.apis.*",
"$basePackage.GatewayApplicationKt",
"$basePackage.BotalkaApplicationKt",
"$basePackage.storage.jooq.**",
)
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions botalka/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = "botalka"
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
package ru.itmo.lms.gateway
package ru.itmo.lms.botalka

import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration
import org.springframework.boot.runApplication

@SpringBootApplication(
exclude = [
JooqAutoConfiguration::class,
],
)
class GatewayApplication
@SpringBootApplication(exclude = [JooqAutoConfiguration::class])
class BotalkaApplication

fun main(args: Array<String>) {
runApplication<GatewayApplication>(args = args)
runApplication<BotalkaApplication>(args = args)
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ru.itmo.lms.gateway.api.http.endpoint
package ru.itmo.lms.botalka.api.http.endpoint

import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.RestController
import ru.itmo.lms.gateway.api.http.apis.MonitoringApi
import ru.itmo.lms.botalka.api.http.apis.MonitoringApi

@RestController
class MonitoringHttpApi : MonitoringApi {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package ru.itmo.lms.gateway.api.http.endpoint
package ru.itmo.lms.botalka.api.http.endpoint

import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.RestController
import ru.itmo.lms.gateway.api.http.NoteDraftMessage
import ru.itmo.lms.gateway.api.http.NoteMessage
import ru.itmo.lms.gateway.api.http.apis.NotesApi
import ru.itmo.lms.gateway.api.http.message.toMessage
import ru.itmo.lms.gateway.api.http.message.toModel
import ru.itmo.lms.gateway.logic.NoteService
import ru.itmo.lms.botalka.api.http.NoteDraftMessage
import ru.itmo.lms.botalka.api.http.NoteMessage
import ru.itmo.lms.botalka.api.http.apis.NotesApi
import ru.itmo.lms.botalka.api.http.message.toMessage
import ru.itmo.lms.botalka.api.http.message.toModel
import ru.itmo.lms.botalka.logic.NoteService

@RestController
class NotesHttpApi(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ru.itmo.lms.gateway.api.http.message
package ru.itmo.lms.botalka.api.http.message

import ru.itmo.lms.gateway.api.http.NoteDraftMessage
import ru.itmo.lms.gateway.api.http.NoteMessage
import ru.itmo.lms.gateway.domain.model.Note
import ru.itmo.lms.botalka.api.http.NoteDraftMessage
import ru.itmo.lms.botalka.api.http.NoteMessage
import ru.itmo.lms.botalka.domain.model.Note

fun Note.toMessage(): NoteMessage =
NoteMessage(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.itmo.lms.gateway.domain.model
package ru.itmo.lms.botalka.domain.model

data class Note(
val id: Id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ru.itmo.lms.gateway.logic
package ru.itmo.lms.botalka.logic

import kotlinx.coroutines.flow.Flow
import ru.itmo.lms.gateway.domain.model.Note
import ru.itmo.lms.botalka.domain.model.Note

interface NoteService {
fun getAll(): Flow<Note>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package ru.itmo.lms.gateway.logic.basic
package ru.itmo.lms.botalka.logic.basic

import kotlinx.coroutines.flow.Flow
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import ru.itmo.lms.gateway.domain.model.Note
import ru.itmo.lms.gateway.logic.NoteService
import ru.itmo.lms.gateway.storage.NoteStorage
import ru.itmo.lms.botalka.domain.model.Note
import ru.itmo.lms.botalka.logic.NoteService
import ru.itmo.lms.botalka.storage.NoteStorage

@Service
class BasicNoteService(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ru.itmo.lms.gateway.storage
package ru.itmo.lms.botalka.storage

import kotlinx.coroutines.flow.Flow
import ru.itmo.lms.gateway.domain.model.Note
import ru.itmo.lms.botalka.domain.model.Note

interface NoteStorage {
fun getAll(): Flow<Note>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package ru.itmo.lms.gateway.storage.jooq
package ru.itmo.lms.botalka.storage.jooq

import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.reactive.asFlow
import kotlinx.coroutines.reactive.awaitSingle
import org.jooq.DSLContext
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Repository
import ru.itmo.lms.gateway.domain.model.Note
import ru.itmo.lms.gateway.storage.NoteStorage
import ru.itmo.lms.gateway.storage.jooq.entity.toModel
import ru.itmo.lms.gateway.storage.jooq.tables.records.NoteRecord
import ru.itmo.lms.gateway.storage.jooq.tables.references.NOTE
import ru.itmo.lms.botalka.domain.model.Note
import ru.itmo.lms.botalka.storage.NoteStorage
import ru.itmo.lms.botalka.storage.jooq.entity.toModel
import ru.itmo.lms.botalka.storage.jooq.tables.records.NoteRecord
import ru.itmo.lms.botalka.storage.jooq.tables.references.NOTE

@Repository
class JooqNoteStorage(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.itmo.lms.gateway.storage.jooq
package ru.itmo.lms.botalka.storage.jooq

import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.itmo.lms.gateway.storage.jooq.config
package ru.itmo.lms.botalka.storage.jooq.config

import io.r2dbc.spi.ConnectionFactory
import org.jooq.DSLContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.itmo.lms.gateway.storage.jooq.config
package ru.itmo.lms.botalka.storage.jooq.config

import org.springframework.context.annotation.Configuration
import org.springframework.data.r2dbc.config.EnableR2dbcAuditing
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ru.itmo.lms.gateway.storage.jooq.entity
package ru.itmo.lms.botalka.storage.jooq.entity

import ru.itmo.lms.gateway.domain.model.Note
import ru.itmo.lms.gateway.storage.jooq.tables.records.NoteRecord
import ru.itmo.lms.botalka.domain.model.Note
import ru.itmo.lms.botalka.storage.jooq.tables.records.NoteRecord

fun NoteRecord.toModel(): Note =
Note(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spring:
application:
name: gateway
name: botalka
r2dbc:
url: r2dbc:postgresql://localhost:5432/postgres
username: postgres
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.3
info:
title: LMS Gateway
title: LMS Botalka
version: 0.0.1
servers:
- url: /api/v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.itmo.lms.gateway
package ru.itmo.lms.botalka

import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.BeforeAll
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ru.itmo.lms.gateway
package ru.itmo.lms.botalka

import org.junit.jupiter.api.Test
import org.springframework.boot.test.context.SpringBootTest

@SpringBootTest
class GatewayApplicationTests {
class BotalkaApplicationTests {
@Test
fun contextLoads() {
// Okay
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.itmo.lms.gateway.api.http.endpoint
package ru.itmo.lms.botalka.api.http.endpoint

import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package ru.itmo.lms.gateway.api.http.endpoint
package ru.itmo.lms.botalka.api.http.endpoint

import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.*
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import ru.itmo.lms.gateway.BaseTestSuite
import ru.itmo.lms.gateway.api.http.NoteDraftMessage
import ru.itmo.lms.gateway.api.http.NoteMessage
import ru.itmo.lms.botalka.BaseTestSuite
import ru.itmo.lms.botalka.api.http.NoteDraftMessage
import ru.itmo.lms.botalka.api.http.NoteMessage
import kotlin.test.assertContentEquals
import kotlin.test.assertEquals

Expand Down
1 change: 0 additions & 1 deletion gateway/settings.gradle.kts

This file was deleted.

0 comments on commit 28ea466

Please sign in to comment.