Skip to content

Commit 984808f

Browse files
committed
feat(gateway): implement graphql server and rate-limiting
0 parents  commit 984808f

27 files changed

+1269
-0
lines changed

.gitignore

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
2+
# Created by https://www.gitignore.io/api/gradle,kotlin,intellij+iml
3+
# Edit at https://www.gitignore.io/?templates=gradle,kotlin,intellij+iml
4+
5+
### Intellij+iml ###
6+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
7+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8+
9+
# User-specific stuff
10+
.idea/**/workspace.xml
11+
.idea/**/tasks.xml
12+
.idea/**/usage.statistics.xml
13+
.idea/**/dictionaries
14+
.idea/**/shelf
15+
16+
# Generated files
17+
.idea/**/contentModel.xml
18+
19+
# Sensitive or high-churn files
20+
.idea/**/dataSources/
21+
.idea/**/dataSources.ids
22+
.idea/**/dataSources.local.xml
23+
.idea/**/sqlDataSources.xml
24+
.idea/**/dynamic.xml
25+
.idea/**/uiDesigner.xml
26+
.idea/**/dbnavigator.xml
27+
28+
# Gradle
29+
.idea/**/gradle.xml
30+
.idea/**/libraries
31+
32+
# Gradle and Maven with auto-import
33+
# When using Gradle or Maven with auto-import, you should exclude module files,
34+
# since they will be recreated, and may cause churn. Uncomment if using
35+
# auto-import.
36+
# .idea/modules.xml
37+
# .idea/*.iml
38+
# .idea/modules
39+
# *.iml
40+
# *.ipr
41+
42+
# CMake
43+
cmake-build-*/
44+
45+
# Mongo Explorer plugin
46+
.idea/**/mongoSettings.xml
47+
48+
# File-based project format
49+
*.iws
50+
51+
# IntelliJ
52+
out/
53+
54+
# mpeltonen/sbt-idea plugin
55+
.idea_modules/
56+
57+
# JIRA plugin
58+
atlassian-ide-plugin.xml
59+
60+
# Cursive Clojure plugin
61+
.idea/replstate.xml
62+
63+
# Crashlytics plugin (for Android Studio and IntelliJ)
64+
com_crashlytics_export_strings.xml
65+
crashlytics.properties
66+
crashlytics-build.properties
67+
fabric.properties
68+
69+
# Editor-based Rest Client
70+
.idea/httpRequests
71+
72+
# Android studio 3.1+ serialized cache file
73+
.idea/caches/build_file_checksums.ser
74+
75+
### Intellij+iml Patch ###
76+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
77+
78+
*.iml
79+
modules.xml
80+
.idea/misc.xml
81+
*.ipr
82+
83+
### Kotlin ###
84+
# Compiled class file
85+
*.class
86+
87+
# Log file
88+
*.log
89+
90+
# BlueJ files
91+
*.ctxt
92+
93+
# Mobile Tools for Java (J2ME)
94+
.mtj.tmp/
95+
96+
# Package Files #
97+
*.jar
98+
*.war
99+
*.nar
100+
*.ear
101+
*.zip
102+
*.tar.gz
103+
*.rar
104+
105+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
106+
hs_err_pid*
107+
108+
### Gradle ###
109+
.gradle
110+
build/
111+
112+
# Ignore Gradle GUI config
113+
gradle-app.setting
114+
115+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
116+
!gradle-wrapper.jar
117+
118+
# Cache of project
119+
.gradletasknamecache
120+
121+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
122+
# gradle/wrapper/gradle-wrapper.properties
123+
124+
### Gradle Patch ###
125+
**/build/
126+
127+
# End of https://www.gitignore.io/api/gradle,kotlin,intellij+iml

.idea/codeStyles/Project.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/discord.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

+40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/**
2+
* Ktor version.
3+
*/
4+
val ktorVersion: String = "1.3.2"
5+
6+
plugins {
7+
application
8+
kotlin("jvm") version "1.3.70"
9+
}
10+
11+
group = "app.ryss"
12+
version = "0.0.1"
13+
14+
application {
15+
mainClassName = "io.ktor.server.netty.EngineMain"
16+
}
17+
18+
repositories {
19+
mavenLocal()
20+
jcenter()
21+
maven("https://kotlin.bintray.com/ktor")
22+
maven("https://kotlin.bintray.com/kotlinx")
23+
maven("https://dl.bintray.com/excitement-engineer/ktor-graphql")
24+
}
25+
26+
dependencies {
27+
28+
// Ktor
29+
implementation("io.ktor", "ktor-server-netty", ktorVersion)
30+
implementation("io.ktor", "ktor-metrics", ktorVersion)
31+
implementation("io.ktor", "ktor-server-core", ktorVersion)
32+
implementation("io.ktor", "ktor-websockets", ktorVersion)
33+
implementation("io.ktor", "ktor-jackson", ktorVersion)
34+
testImplementation("io.ktor", "ktor-server-tests", ktorVersion)
35+
36+
//Graphql
37+
implementation("com.github.excitement-engineer", "ktor-graphql", "1.0.0")
38+
39+
// Logging
40+
implementation("org.slf4j", "slf4j-api", "2.0.0-alpha1")
41+
implementation("ch.qos.logback", "logback-classic", "1.3.0-alpha5")
42+
implementation("io.github.microutils", "kotlin-logging", "1.7.9")
43+
44+
// Sentry
45+
implementation("io.sentry", "sentry", "1.7.30")
46+
implementation("io.sentry", "sentry-logback", "1.7.30")
47+
48+
49+
// Util
50+
implementation("org.jetbrains.kotlinx", "kotlinx-cli", "0.2.1")
51+
52+
// Kotlin
53+
implementation(kotlin("stdlib-jdk8"))
54+
}

gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kotlin.code.style=official

gradle/wrapper/gradle-wrapper.jar

54.9 KB
Binary file not shown.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-all.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)