├── database ├── build.gradle.kts ├── database-api │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── app │ │ └── simplecloud │ │ └── simplecloud │ │ └── database │ │ └── api │ │ └── factory │ │ └── DatabaseFactory.kt ├── database-inmemory │ └── build.gradle.kts └── database-mongo │ └── build.gradle.kts ├── graph └── build.gradle.kts ├── module ├── build.gradle.kts ├── module-api │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── app │ │ └── simplecloud │ │ └── simplecloud │ │ └── module │ │ └── api │ │ ├── request │ │ └── error │ │ │ └── ErrorCreateRequest.kt │ │ ├── resourcedefinition │ │ ├── request │ │ │ ├── exception │ │ │ │ ├── ResourceAlreadyExistsException.kt │ │ │ │ └── NoSuchResourceDefinitionException.kt │ │ │ ├── RequestSpecResult.kt │ │ │ └── RequestSpecAndStatusResult.kt │ │ └── ResourceCustomActionHandler.kt │ │ ├── LocalServiceRegistry.kt │ │ ├── error │ │ ├── ErrorTypeFixedChecker.kt │ │ ├── ErrorFactory.kt │ │ └── configuration │ │ │ └── ErrorCreateConfiguration.kt │ │ └── LocalAPI.kt ├── module-api-impl │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── app │ │ └── simplecloud │ │ └── simplecloud │ │ └── module │ │ └── api │ │ └── impl │ │ ├── ModuleException.kt │ │ └── ftp │ │ └── stop │ │ └── FtpServerStopper.kt ├── module-api-internal │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── app │ │ └── simplecloud │ │ └── simplecloud │ │ └── module │ │ └── api │ │ └── internal │ │ ├── request │ │ └── ftp │ │ │ ├── FtpServerStopRequest.kt │ │ │ └── FtpServerCreateRequest.kt │ │ └── ftp │ │ └── configuration │ │ └── FtpServerConfiguration.kt └── module-load │ ├── build.gradle.kts │ └── src │ └── main │ └── kotlin │ └── app │ └── simplecloud │ └── simplecloud │ └── module │ └── load │ ├── modulefilecontent │ └── ModuleFileContentLoader.kt │ ├── util │ └── ModuleClassFinder.kt │ ├── LoadedModuleFileContent.kt │ └── exception │ └── ModuleLoadException.kt ├── kubernetes ├── kubernetes-api │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── app │ │ └── simplecloud │ │ └── simplecloud │ │ └── kubernetes │ │ └── api │ │ ├── volume │ │ └── KubeVolumeClaim.kt │ │ ├── secret │ │ ├── KubeSecret.kt │ │ └── KubeSecretService.kt │ │ ├── pod │ │ └── KubePodService.kt │ │ ├── exception │ │ └── KubeException.kt │ │ └── deployment │ │ ├── KubeDeploymentService.kt │ │ └── KubeDeployment.kt ├── kubernetes-test │ └── build.gradle.kts ├── kubernetes-impl │ └── build.gradle.kts └── build.gradle.kts ├── microk8s ├── k3s │ ├── serviceaccount.yml │ ├── simplecloud-role-binding.yml │ ├── simplecloud-role.yml │ └── content-server-pod.yml ├── content-server-pod.yml ├── test-volume.yml └── simplecloud-pod.yml ├── rest-server ├── rest-server-api │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── app │ │ └── simplecloud │ │ └── simplecloud │ │ └── restserver │ │ └── api │ │ ├── controller │ │ ├── Controller.kt │ │ ├── annotation │ │ │ ├── RequestingEntity.kt │ │ │ └── RequestPathParam.kt │ │ ├── ControllerHandler.kt │ │ └── ControllerHandlerFactory.kt │ │ ├── ParameterType.kt │ │ ├── auth │ │ ├── token │ │ │ └── TokenHandlerFactory.kt │ │ ├── UsernameAndPasswordCredentials.kt │ │ └── Headers.kt │ │ ├── exception │ │ ├── UnauthorizedException.kt │ │ └── HttpException.kt │ │ └── route │ │ └── RequestType.kt ├── rest-server-base │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── app │ │ └── simplecloud │ │ └── simplecloud │ │ └── restserver │ │ ├── base │ │ ├── impl │ │ │ └── SuccessResponseDto.kt │ │ ├── exception │ │ │ ├── ElementAlreadyExistException.kt │ │ │ ├── MissingPermissionException.kt │ │ │ └── InvalidParameterException.kt │ │ └── exclude │ │ │ └── annotation │ │ │ ├── WebExcludeAll.kt │ │ │ ├── WebExcludeIncoming.kt │ │ │ └── WebExcludeOutgoing.kt │ │ └── impl │ │ ├── request │ │ └── SuccessResponseDto.kt │ │ └── annotation │ │ └── exclude │ │ ├── WebExcludeAll.kt │ │ ├── WebExcludeIncoming.kt │ │ └── WebExcludeOutgoing.kt └── build.gradle.kts ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── plugin-parent ├── bungeecord │ ├── src │ │ └── main │ │ │ └── resources │ │ │ └── bungee.yml │ └── build.gradle.kts ├── minestom │ ├── src │ │ └── main │ │ │ ├── resources │ │ │ └── extension.json │ │ │ └── kotlin │ │ │ └── app │ │ │ └── simplecloud │ │ │ └── simplecloud │ │ │ └── plugin │ │ │ └── server │ │ │ └── type │ │ │ └── minestom │ │ │ ├── MinestomListener.kt │ │ │ └── CloudMinestomPlugin.kt │ └── build.gradle.kts ├── spigot │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── resources │ │ └── plugin.yml ├── velocity │ └── build.gradle.kts └── plugin │ ├── build.gradle.kts │ └── src │ └── main │ └── kotlin │ └── app │ └── simplecloud │ └── simplecloud │ └── plugin │ ├── SelfOnlineCountProvider.kt │ ├── proxy │ └── request │ │ ├── ServerKickResponse.kt │ │ ├── ServerKickRequest.kt │ │ ├── ServerPreConnectResponse.kt │ │ ├── ServerConnectedRequest.kt │ │ └── ServerPreConnectRequest.kt │ ├── startup │ └── service │ │ └── NodeServiceImpl.kt │ └── OnlineCountUpdater.kt ├── api ├── src │ └── main │ │ └── kotlin │ │ └── app │ │ └── simplecloud │ │ └── simplecloud │ │ └── api │ │ ├── resourcedefinition │ │ ├── Resource.kt │ │ ├── ResourceVersion.kt │ │ ├── Definition.kt │ │ ├── limitation │ │ │ ├── Limitation.kt │ │ │ └── annotation │ │ │ │ ├── Optional.kt │ │ │ │ ├── MaxValue.kt │ │ │ │ ├── MinValue.kt │ │ │ │ ├── StringMaxLength.kt │ │ │ │ ├── StringMinLength.kt │ │ │ │ ├── IntNumberValues.kt │ │ │ │ ├── StringValues.kt │ │ │ │ ├── LongNumberValues.kt │ │ │ │ └── DoubleNumberValues.kt │ │ ├── link │ │ │ └── LinkConfiguration.kt │ │ └── ResourceDto.kt │ │ ├── utils │ │ ├── CloudState.kt │ │ ├── Nameable.kt │ │ ├── DefaultNameRequirement.kt │ │ ├── NetworkComponent.kt │ │ └── Identifiable.kt │ │ ├── service │ │ ├── Service.kt │ │ └── CloudStateService.kt │ │ ├── future │ │ └── exception │ │ │ ├── CompletedWithNullException.kt │ │ │ ├── TimeoutException.kt │ │ │ └── FutureOriginException.kt │ │ ├── messagechannel │ │ ├── handler │ │ │ ├── UnitMessageHandler.kt │ │ │ └── VoidMessageHandler.kt │ │ └── MessageRequest.kt │ │ ├── request │ │ ├── process │ │ │ └── ProcessExecuteCommandRequest.kt │ │ ├── permission │ │ │ └── PermissionGroupCreateRequest.kt │ │ ├── player │ │ │ └── PlayerConnectRequest.kt │ │ └── template │ │ │ ├── ProcessTemplateCreateRequest.kt │ │ │ ├── ProcessProxyTemplateUpdateRequest.kt │ │ │ └── ProcessServerTemplateUpdateRequest.kt │ │ ├── permission │ │ └── Permissions.kt │ │ ├── event │ │ ├── process │ │ │ ├── CloudProcessUpdatedEvent.kt │ │ │ ├── CloudProcessRegisteredEvent.kt │ │ │ ├── CloudProcessUnregisteredEvent.kt │ │ │ └── CloudProcessEvent.kt │ │ ├── player │ │ │ └── CloudPlayerEvent.kt │ │ └── processgroup │ │ │ └── CloudProcessGroupEvent.kt │ │ ├── reference │ │ ├── NamedReference.kt │ │ └── NamedReferenceHolder.kt │ │ ├── repository │ │ ├── PermissionGroupRepository.kt │ │ ├── StaticProcessTemplateRepository.kt │ │ └── CloudProcessGroupRepository.kt │ │ ├── template │ │ ├── ProcessProxyTemplate.kt │ │ ├── ProcessServerTemplate.kt │ │ └── ProcessLobbyTemplate.kt │ │ └── image │ │ └── ImageImpl.kt └── build.gradle.kts ├── content-server ├── Dockerfile └── src │ └── main │ └── kotlin │ └── app │ └── simplecloud │ └── simplecloud │ └── content │ └── Main.kt ├── LICENSE.md ├── Dockerfile_old ├── Dockerfile ├── bootstrap └── build.gradle.kts ├── gradle.properties ├── event-api ├── build.gradle.kts └── src │ └── main │ └── kotlin │ └── app │ └── simplecloud │ └── simplecloud │ └── eventapi │ ├── Event.kt │ ├── Listener.kt │ ├── EventRegisterer.kt │ ├── CloudEventHandler.kt │ ├── EventExecutor.kt │ ├── exception │ └── EventException.kt │ └── CancellableEvent.kt ├── api-internal ├── build.gradle.kts └── src │ └── main │ └── kotlin │ └── app │ └── simplecloud │ └── simplecloud │ └── api │ └── internal │ ├── exception │ └── UnknownProxyProcessException.kt │ ├── configutation │ └── ProcessExecuteCommandConfiguration.kt │ └── service │ └── InternalCloudStateService.kt ├── licenses └── MIT.md ├── api-impl ├── build.gradle.kts └── src │ └── main │ └── kotlin │ └── app │ └── simplecloud │ └── simplecloud │ └── api │ └── impl │ ├── exception │ └── NoImageProvidedException.kt │ ├── env │ ├── RealEnvironmentVariables.kt │ ├── EnvironmentVariables.kt │ └── VirtualEnvironmentVariables.kt │ └── distribution │ ├── DistributedQuery.kt │ ├── DistributedQueryHandler.kt │ └── DistributionDataTransferObject.kt └── node └── src └── main └── kotlin └── app └── simplecloud └── simplecloud └── node ├── util ├── UncaughtExceptions.kt └── ZipUtil.kt ├── resource ├── cluster │ ├── V1Beta1ClusterSpec.kt │ ├── restart │ │ └── V1Beta1ClusterRestartBody.kt │ └── update │ │ └── V1Beta1ClusterUpdateBody.kt ├── player │ ├── V1Beta1PlayerWebConfig.kt │ └── V1Beta1CloudPlayerStatus.kt ├── process │ └── execute │ │ └── V1Beta1CloudProcessExecuteBody.kt ├── permissiongroup │ └── V1Beta1PermissionGroupSpec.kt ├── onlinestrategy │ └── V1Beta1ProcessOnlineCountStrategySpec.kt └── error │ └── V1Beta1ErrorResourceSpec.kt ├── service └── NodeServiceImpl.kt ├── resourcedefinition └── MissingResourcePropertyException.kt ├── defaultcontroller └── v1 │ └── dto │ ├── VolumeFtpServerStartDto.kt │ ├── UpdateDto.kt │ ├── VolumeDto.kt │ └── OnlineStrategyUpdateRequestDto.kt └── process └── ProcessShutdownHandler.kt /database/build.gradle.kts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /graph/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | 3 | } -------------------------------------------------------------------------------- /module/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | 3 | } -------------------------------------------------------------------------------- /database/database-api/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api(project(":api")) 3 | } -------------------------------------------------------------------------------- /kubernetes/kubernetes-api/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api(project(":api")) 3 | } -------------------------------------------------------------------------------- /microk8s/k3s/serviceaccount.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: simplecloud -------------------------------------------------------------------------------- /rest-server/rest-server-api/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | implementation(project(":api")) 3 | } -------------------------------------------------------------------------------- /database/database-inmemory/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api(project(":database:database-api")) 3 | } -------------------------------------------------------------------------------- /kubernetes/kubernetes-test/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api(project(":kubernetes:kubernetes-api")) 3 | } -------------------------------------------------------------------------------- /module/module-api/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api(project(":api")) 3 | api(project(":rest-server:rest-server-api")) 4 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theSimpleCloud/SimpleCloud-Kubernetes/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /module/module-api-impl/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api(project(":module:module-api-internal")) 3 | implementation(project(":api-impl")) 4 | } -------------------------------------------------------------------------------- /kubernetes/kubernetes-impl/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api(project(":kubernetes:kubernetes-api")) 3 | implementation("io.kubernetes:client-java:18.0.0") 4 | } -------------------------------------------------------------------------------- /module/module-api-internal/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api(project(":api-internal")) 3 | api(project(":module:module-api")) 4 | api(project(":kubernetes:kubernetes-api")) 5 | } -------------------------------------------------------------------------------- /plugin-parent/bungeecord/src/main/resources/bungee.yml: -------------------------------------------------------------------------------- 1 | name: SimpleCloud-Plugin 2 | version: 1.0 3 | author: Wetterbericht 4 | 5 | main: app.simplecloud.simplecloud.plugin.proxy.type.bungee.CloudBungeePlugin -------------------------------------------------------------------------------- /database/database-mongo/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api(project(":database:database-api")) 3 | implementation("dev.morphia.morphia:morphia-core:2.3.0") 4 | api("eu.thesimplecloud.jsonlib:json-lib:1.0.8") 5 | } -------------------------------------------------------------------------------- /module/module-load/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api(project(":module:module-api")) 3 | api(project(":graph")) 4 | implementation("commons-io:commons-io:2.11.0") 5 | implementation("org.yaml:snakeyaml:2.0") 6 | 7 | } -------------------------------------------------------------------------------- /plugin-parent/minestom/src/main/resources/extension.json: -------------------------------------------------------------------------------- 1 | { 2 | "entrypoint": "app.simplecloud.simplecloud.plugin.server.type.minestom.CloudMinestomPlugin", 3 | "name": "SimpleCloud-Plugin", 4 | "version": "1.0.0", 5 | "dependencies": [] 6 | } -------------------------------------------------------------------------------- /plugin-parent/minestom/build.gradle.kts: -------------------------------------------------------------------------------- 1 | 2 | 3 | dependencies { 4 | compileOnly("com.github.Minestom:Minestom:4f3c35ee87") 5 | api(project(":plugin-parent:plugin")) 6 | implementation("app.simplecloud:distribution-hazelcast:1.0.4-SNAPSHOT") 7 | } -------------------------------------------------------------------------------- /plugin-parent/spigot/build.gradle.kts: -------------------------------------------------------------------------------- 1 | 2 | 3 | dependencies { 4 | compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT") 5 | api(project(":plugin-parent:plugin")) 6 | implementation("app.simplecloud:distribution-hazelcast:1.0.4-SNAPSHOT") 7 | } -------------------------------------------------------------------------------- /plugin-parent/spigot/src/main/resources/plugin.yml: -------------------------------------------------------------------------------- 1 | name: SimpleCloud-Plugin 2 | version: 1.0 3 | author: Wetterbericht 4 | 5 | main: app.simplecloud.simplecloud.plugin.server.type.spigot.CloudSpigotPlugin 6 | 7 | api-version: 1.13 8 | 9 | commands: 10 | -------------------------------------------------------------------------------- /microk8s/k3s/simplecloud-role-binding.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | name: simplecloud-binding 5 | subjects: 6 | - kind: ServiceAccount 7 | name: simplecloud 8 | roleRef: 9 | apiGroup: rbac.authorization.k8s.io 10 | kind: Role 11 | name: simplecloud-role 12 | -------------------------------------------------------------------------------- /plugin-parent/bungeecord/build.gradle.kts: -------------------------------------------------------------------------------- 1 | 2 | dependencies { 3 | compileOnly("net.md-5:bungeecord-api:1.18-R0.1-SNAPSHOT") 4 | api(project(":plugin-parent:plugin")) 5 | implementation("app.simplecloud:distribution-hazelcast:1.0.4-SNAPSHOT") 6 | } 7 | 8 | tasks.getByName("test") { 9 | useJUnitPlatform() 10 | } -------------------------------------------------------------------------------- /plugin-parent/velocity/build.gradle.kts: -------------------------------------------------------------------------------- 1 | 2 | dependencies { 3 | compileOnly("com.velocitypowered:velocity-api:3.0.1") 4 | kapt("com.velocitypowered:velocity-api:3.1.1") 5 | api(project(":plugin-parent:plugin")) 6 | implementation("app.simplecloud:distribution-hazelcast:1.0.4-SNAPSHOT") 7 | } 8 | 9 | tasks.getByName("test") { 10 | useJUnitPlatform() 11 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/Resource.kt: -------------------------------------------------------------------------------- 1 | package app.simplecloud.simplecloud.api.resourcedefinition 2 | 3 | /** 4 | * Date: 14.01.23 5 | * Time: 18:52 6 | * @author Frederick Baier 7 | * 8 | */ 9 | class Resource( 10 | val apiVersion: String, 11 | val kind: String, 12 | val name: String, 13 | val spec: Map, 14 | ) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/ResourceVersion.kt: -------------------------------------------------------------------------------- 1 | package app.simplecloud.simplecloud.api.resourcedefinition 2 | 3 | /** 4 | * Date: 14.01.23 5 | * Time: 22:45 6 | * @author Frederick Baier 7 | * 8 | */ 9 | class ResourceVersion( 10 | val name: String?, 11 | val specSchema: Definition?, 12 | val statusSchema: Definition?, 13 | ) { 14 | } -------------------------------------------------------------------------------- /content-server/Dockerfile: -------------------------------------------------------------------------------- 1 | #FROM adoptopenjdk:16.0.1_9-jdk-hotspot 2 | FROM adoptopenjdk:11.0.11_9-jdk-hotspot 3 | 4 | COPY content-server/build/libs/content-server-3.0.0-SNAPSHOT-all.jar /app/content-server.jar 5 | COPY plugin-parent/build/libs/plugin-parent-3.0.0-SNAPSHOT-all.jar /app/files/SimpleCloud-Plugin.jar 6 | 7 | EXPOSE 8008 8 | 9 | WORKDIR /app/ 10 | CMD [ "java", "-jar", "/app/content-server.jar" ] -------------------------------------------------------------------------------- /plugin-parent/plugin/build.gradle.kts: -------------------------------------------------------------------------------- 1 | 2 | dependencies { 3 | api(project(":api")) 4 | api(project(":api-impl")) 5 | testApi("app.simplecloud:distribution-test:1.0.0-SNAPSHOT") 6 | testImplementation(testFixtures(project(":node"))) 7 | testImplementation(testFixtures(project(":module:module-api-internal"))) 8 | } 9 | 10 | tasks.getByName("test") { 11 | useJUnitPlatform() 12 | } -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | SimpleCloud is licensed under the [GNU Affero General Public License version 3](licenses/AGPL.md). 2 | 3 | To contribute you have to release your code under the [MIT License](licenses/MIT.md). To do so, add your name and email address to the list below. 4 | 5 | The authors listed below have chosen to release their code under the [MIT License](licenses/MIT.md). 6 | 7 | ```text 8 | Full name 9 | ``` 10 | -------------------------------------------------------------------------------- /rest-server/rest-server-base/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | implementation(project(":api")) 3 | api(project(":rest-server:rest-server-api")) 4 | 5 | api("com.fasterxml.jackson.core:jackson-core:2.13.2") 6 | api("com.fasterxml.jackson.core:jackson-databind:2.13.2") 7 | api("org.json:json:20211205") 8 | 9 | api("app.simplecloud:simple-rest-server:1.0.4") 10 | implementation("com.auth0:java-jwt:3.19.1") 11 | 12 | } -------------------------------------------------------------------------------- /Dockerfile_old: -------------------------------------------------------------------------------- 1 | FROM eclipse-temurin:17 2 | 3 | COPY bootstrap/build/libs/bootstrap-3.0.0-SNAPSHOT-all.jar /node.jar 4 | COPY plugin-parent/build/libs/plugin-parent-3.0.0-SNAPSHOT-all.jar /node/SimpleCloud-Plugin.jar 5 | COPY microk8s/k3s/template-module-1.0-SNAPSHOT-all.jar /node/modules/template-module-1.0-SNAPSHOT-all.jar 6 | COPY microk8s/k3s/junit-jupiter-api-5.9.1.jar /node/modules/junit.jar 7 | 8 | EXPOSE 8008 9 | 10 | WORKDIR /node/ 11 | CMD [ "java", "-jar", "/node.jar" ] -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/Definition.kt: -------------------------------------------------------------------------------- 1 | package app.simplecloud.simplecloud.api.resourcedefinition 2 | 3 | import app.simplecloud.simplecloud.api.resourcedefinition.limitation.Limitation 4 | 5 | /** 6 | * Date: 14.01.23 7 | * Time: 18:15 8 | * @author Frederick Baier 9 | * 10 | */ 11 | class Definition( 12 | val type: String, 13 | val isOptional: Boolean, 14 | val limitations: List, 15 | val properties: Map, 16 | ) -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM eclipse-temurin:17 AS build 2 | COPY . /build/ 3 | WORKDIR /build/ 4 | RUN chmod +x gradlew 5 | RUN ./gradlew test --stacktrace --info && ./gradlew shadowJar --stacktrace --info 6 | 7 | FROM eclipse-temurin:17 8 | 9 | COPY --from=build /build/bootstrap/build/libs/bootstrap-3.0.0-SNAPSHOT-all.jar /node.jar 10 | COPY --from=build /build/plugin-parent/build/libs/plugin-parent-3.0.0-SNAPSHOT-all.jar /node/SimpleCloud-Plugin.jar 11 | 12 | EXPOSE 8008 13 | 14 | WORKDIR /node/ 15 | CMD [ "java", "-jar", "/node.jar" ] -------------------------------------------------------------------------------- /bootstrap/build.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencies { 2 | implementation(project(":node")) 3 | implementation(project(":api")) 4 | implementation(project(":rest-server:rest-server-base")) 5 | implementation("app.simplecloud:distribution-hazelcast:1.0.4-SNAPSHOT") 6 | implementation("com.github.ajalt:clikt:2.8.0") 7 | implementation(project(":kubernetes:kubernetes-impl")) 8 | implementation(project(":database:database-mongo")) 9 | } 10 | 11 | tasks.withType { 12 | manifest { 13 | attributes["Main-Class"] = "app.simplecloud.simplecloud.bootstrap.NodeBootstrapKt" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /microk8s/k3s/simplecloud-role.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: Role 3 | metadata: 4 | name: simplecloud-role 5 | rules: 6 | - verbs: 7 | - get 8 | - list 9 | - watch 10 | - create 11 | - update 12 | - delete 13 | - exec 14 | apiGroups: 15 | - '' 16 | resources: 17 | - pods 18 | - pods/log 19 | - pods/status 20 | - services 21 | - secrets 22 | - configmaps 23 | - persistentvolumes 24 | - persistentvolumeclaims 25 | - verbs: 26 | - get 27 | - list 28 | - watch 29 | - create 30 | - update 31 | - delete 32 | - patch 33 | apiGroups: 34 | - apps 35 | resources: 36 | - deployments -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # SimpleCloud is a software for administrating a minecraft server network. 3 | # Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as 7 | # published by the Free Software Foundation, either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | 19 | kotlin.code.style=official -------------------------------------------------------------------------------- /event-api/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | 20 | -------------------------------------------------------------------------------- /rest-server/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | dependencies { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /api-internal/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | 20 | dependencies { 21 | api(project(":api")) 22 | } 23 | -------------------------------------------------------------------------------- /kubernetes/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | dependencies { 20 | implementation("commons-io:commons-io:2.11.0") 21 | implementation(project(":api")) 22 | } -------------------------------------------------------------------------------- /content-server/src/main/kotlin/app/simplecloud/simplecloud/content/Main.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.content 20 | 21 | fun main() { 22 | WebServer() 23 | } -------------------------------------------------------------------------------- /licenses/MIT.md: -------------------------------------------------------------------------------- 1 | MIT LICENSE 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /microk8s/content-server-pod.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: content-server-claim 5 | spec: 6 | storageClassName: microk8s-hostpath 7 | accessModes: 8 | - ReadWriteOnce 9 | resources: 10 | requests: 11 | storage: 1Gi 12 | --- 13 | apiVersion: v1 14 | kind: Pod 15 | metadata: 16 | name: content-server 17 | labels: 18 | simplecloud: content-server 19 | spec: 20 | containers: 21 | - name: content-server 22 | image: localhost:32000/simplecloud3-content-server:latest 23 | volumeMounts: 24 | - name: cloud-volume 25 | mountPath: "/app/files/usr" 26 | ports: 27 | - containerPort: 8008 28 | volumes: 29 | - name: cloud-volume 30 | persistentVolumeClaim: 31 | claimName: content-server-claim 32 | --- 33 | apiVersion: v1 34 | kind: Service 35 | metadata: 36 | name: content 37 | spec: 38 | selector: 39 | simplecloud: content-server 40 | ports: 41 | - protocol: TCP 42 | port: 8008 43 | targetPort: 8008 -------------------------------------------------------------------------------- /microk8s/k3s/content-server-pod.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: content-server-claim 5 | spec: 6 | storageClassName: local-path 7 | accessModes: 8 | - ReadWriteOnce 9 | resources: 10 | requests: 11 | storage: 1Gi 12 | --- 13 | apiVersion: v1 14 | kind: Pod 15 | metadata: 16 | name: content-server 17 | labels: 18 | simplecloud: content-server 19 | spec: 20 | containers: 21 | - name: content-server 22 | image: 10.43.3.168:5000/simplecloud3-content-server:latest 23 | volumeMounts: 24 | - name: cloud-volume 25 | mountPath: "/app/files/usr" 26 | ports: 27 | - containerPort: 8008 28 | volumes: 29 | - name: cloud-volume 30 | persistentVolumeClaim: 31 | claimName: content-server-claim 32 | --- 33 | apiVersion: v1 34 | kind: Service 35 | metadata: 36 | name: content 37 | spec: 38 | selector: 39 | simplecloud: content-server 40 | ports: 41 | - protocol: TCP 42 | port: 8008 43 | targetPort: 8008 -------------------------------------------------------------------------------- /api/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | 20 | dependencies { 21 | api("app.simplecloud:distribution-api:1.0.4-SNAPSHOT") 22 | api("net.kyori:adventure-api:4.10.1") 23 | api(project(":event-api")) 24 | } -------------------------------------------------------------------------------- /event-api/src/main/kotlin/app/simplecloud/simplecloud/eventapi/Event.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.eventapi 20 | 21 | /** 22 | * The base class of all events 23 | */ 24 | interface Event 25 | -------------------------------------------------------------------------------- /event-api/src/main/kotlin/app/simplecloud/simplecloud/eventapi/Listener.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.eventapi 20 | 21 | /** 22 | * Represents a class that handles [Event]s 23 | */ 24 | interface Listener 25 | -------------------------------------------------------------------------------- /event-api/src/main/kotlin/app/simplecloud/simplecloud/eventapi/EventRegisterer.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.eventapi 20 | 21 | /** 22 | * Represents a class listeners get linked to 23 | */ 24 | interface EventRegisterer 25 | -------------------------------------------------------------------------------- /api-impl/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | dependencies { 20 | api(project(":api")) 21 | api(project(":api-internal")) 22 | api("app.simplecloud:distribution-api:1.0.0-SNAPSHOT") 23 | testApi(project(":database:database-inmemory")) 24 | } 25 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # SimpleCloud is a software for administrating a minecraft server network. 3 | # Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | # 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Affero General Public License as 7 | # published by the Free Software Foundation, either version 3 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Affero General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Affero General Public License 16 | # along with this program. If not, see . 17 | # 18 | 19 | distributionBase=GRADLE_USER_HOME 20 | distributionPath=wrapper/dists 21 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip 22 | zipStoreBase=GRADLE_USER_HOME 23 | zipStorePath=wrapper/dists 24 | -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/util/UncaughtExceptions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.util 20 | 21 | object UncaughtExceptions { 22 | 23 | fun handle(ex: Throwable) { 24 | ex.printStackTrace() 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /api-impl/src/main/kotlin/app/simplecloud/simplecloud/api/impl/exception/NoImageProvidedException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.impl.exception 20 | 21 | class NoImageProvidedException(groupName: String) : Exception("No Image provided for group $groupName") { 22 | } -------------------------------------------------------------------------------- /event-api/src/main/kotlin/app/simplecloud/simplecloud/eventapi/CloudEventHandler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.eventapi 20 | 21 | 22 | 23 | @Target(AnnotationTarget.FUNCTION) 24 | @Retention(AnnotationRetention.RUNTIME) 25 | annotation class CloudEventHandler 26 | -------------------------------------------------------------------------------- /kubernetes/kubernetes-api/src/main/kotlin/app/simplecloud/simplecloud/kubernetes/api/volume/KubeVolumeClaim.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.kubernetes.api.volume 20 | 21 | interface KubeVolumeClaim { 22 | 23 | fun getName(): String 24 | 25 | fun delete() 26 | 27 | } -------------------------------------------------------------------------------- /event-api/src/main/kotlin/app/simplecloud/simplecloud/eventapi/EventExecutor.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.eventapi 20 | 21 | interface EventExecutor { 22 | 23 | /** 24 | * Executes the specified event. 25 | */ 26 | fun execute(event: Event) 27 | 28 | } 29 | -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/utils/CloudState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.utils 20 | 21 | /** 22 | * Date: 23.03.23 23 | * Time: 11:55 24 | * @author Frederick Baier 25 | * 26 | */ 27 | enum class CloudState { 28 | 29 | DISABLED, NORMAL; 30 | 31 | } -------------------------------------------------------------------------------- /kubernetes/kubernetes-api/src/main/kotlin/app/simplecloud/simplecloud/kubernetes/api/secret/KubeSecret.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.kubernetes.api.secret 20 | 21 | interface KubeSecret { 22 | 23 | fun getName(): String 24 | 25 | fun getStringValueOf(key: String): String 26 | 27 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/resource/cluster/V1Beta1ClusterSpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.resource.cluster 20 | 21 | /** 22 | * Date: 04.04.23 23 | * Time: 16:52 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class V1Beta1ClusterSpec( 28 | val version: String, 29 | ) -------------------------------------------------------------------------------- /kubernetes/kubernetes-api/src/main/kotlin/app/simplecloud/simplecloud/kubernetes/api/pod/KubePodService.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.kubernetes.api.pod 20 | 21 | interface KubePodService { 22 | 23 | fun getPod(name: String): KubePod 24 | 25 | fun createPod(name: String, podSpec: PodSpec): KubePod 26 | 27 | } -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/controller/Controller.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.controller 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 23.06.2021 24 | * Time: 09:40 25 | * @author Frederick Baier 26 | */ 27 | interface Controller -------------------------------------------------------------------------------- /module/module-load/src/main/kotlin/app/simplecloud/simplecloud/module/load/modulefilecontent/ModuleFileContentLoader.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.load.modulefilecontent 20 | 21 | import java.io.File 22 | 23 | interface ModuleFileContentLoader { 24 | 25 | fun load(file: File): ModuleFileContent 26 | 27 | } 28 | -------------------------------------------------------------------------------- /plugin-parent/plugin/src/main/kotlin/app/simplecloud/simplecloud/plugin/SelfOnlineCountProvider.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.plugin 20 | 21 | /** 22 | * Date: 29.05.22 23 | * Time: 14:22 24 | * @author Frederick Baier 25 | * 26 | */ 27 | fun interface SelfOnlineCountProvider { 28 | 29 | fun getOnlineCount(): Int 30 | 31 | } -------------------------------------------------------------------------------- /plugin-parent/plugin/src/main/kotlin/app/simplecloud/simplecloud/plugin/proxy/request/ServerKickResponse.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.plugin.proxy.request 20 | 21 | /** 22 | * Date: 15.06.22 23 | * Time: 18:21 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class ServerKickResponse( 28 | val targetProcessName: String 29 | ) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/service/Service.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.service 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 02.04.2021 24 | * Time: 12:25 25 | * @author Frederick Baier 26 | * 27 | * Represents a service exposing data from repositories 28 | * 29 | */ 30 | interface Service -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/resource/cluster/restart/V1Beta1ClusterRestartBody.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.resource.cluster.restart 20 | 21 | /** 22 | * Date: 05.04.23 23 | * Time: 12:18 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class V1Beta1ClusterRestartBody( 28 | val message: String, 29 | ) -------------------------------------------------------------------------------- /plugin-parent/plugin/src/main/kotlin/app/simplecloud/simplecloud/plugin/proxy/request/ServerKickRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.plugin.proxy.request 20 | 21 | import java.util.* 22 | 23 | class ServerKickRequest( 24 | val playerUniqueId: UUID, 25 | val kickReasonString: String, 26 | val serverNameKickedFrom: String 27 | ) -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/base/impl/SuccessResponseDto.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.base.impl 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 27.06.2021 24 | * Time: 18:25 25 | * @author Frederick Baier 26 | */ 27 | class SuccessResponseDto(val result: Any) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/future/exception/CompletedWithNullException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.future.exception 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 29.03.2021 24 | * Time: 23:50 25 | * @author Frederick Baier 26 | */ 27 | class CompletedWithNullException : Exception("Result was null") -------------------------------------------------------------------------------- /plugin-parent/plugin/src/main/kotlin/app/simplecloud/simplecloud/plugin/proxy/request/ServerPreConnectResponse.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.plugin.proxy.request 20 | 21 | /** 22 | * Date: 29.03.22 23 | * Time: 14:40 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class ServerPreConnectResponse( 28 | val targetProcessName: String 29 | ) -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/impl/request/SuccessResponseDto.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.impl.request 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 27.06.2021 24 | * Time: 18:25 25 | * @author Frederick Baier 26 | */ 27 | class SuccessResponseDto(val result: Any) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/future/exception/TimeoutException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.future.exception 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 29.05.2021 24 | * Time: 13:08 25 | * @author Frederick Baier 26 | */ 27 | class TimeoutException(val originException: FutureOriginException) : Exception() -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/messagechannel/handler/UnitMessageHandler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.messagechannel.handler 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 29.05.2021 24 | * Time: 09:26 25 | * @author Frederick Baier 26 | */ 27 | interface UnitMessageHandler : MessageHandler -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/messagechannel/handler/VoidMessageHandler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.messagechannel.handler 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 29.05.2021 24 | * Time: 09:26 25 | * @author Frederick Baier 26 | */ 27 | interface VoidMessageHandler : MessageHandler -------------------------------------------------------------------------------- /module/module-api-impl/src/main/kotlin/app/simplecloud/simplecloud/module/api/impl/ModuleException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.impl 20 | 21 | /** 22 | * Date: 08.10.22 23 | * Time: 11:00 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class ModuleException(message: String, cause: Throwable) : Exception(message, cause) { 28 | 29 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/resource/player/V1Beta1PlayerWebConfig.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.resource.player 20 | 21 | /** 22 | * Date: 10.03.23 23 | * Time: 17:50 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class V1Beta1PlayerWebConfig( 28 | val password: String, 29 | val hasAccess: Boolean, 30 | ) -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/resource/process/execute/V1Beta1CloudProcessExecuteBody.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.resource.process.execute 20 | 21 | /** 22 | * Date: 18.03.23 23 | * Time: 10:19 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class V1Beta1CloudProcessExecuteBody( 28 | val command: String, 29 | ) -------------------------------------------------------------------------------- /api-internal/src/main/kotlin/app/simplecloud/simplecloud/api/internal/exception/UnknownProxyProcessException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.internal.exception 20 | 21 | /** 22 | * Date: 28.07.22 23 | * Time: 19:44 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class UnknownProxyProcessException(name: String) : Exception("Unknown Proxy: $name") -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/limitation/Limitation.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.limitation 20 | 21 | /** 22 | * Date: 19.01.23 23 | * Time: 18:27 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface Limitation { 28 | 29 | fun meetsLimitation(any: Any): Boolean 30 | 31 | } -------------------------------------------------------------------------------- /module/module-load/src/main/kotlin/app/simplecloud/simplecloud/module/load/util/ModuleClassFinder.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.load.util 20 | 21 | /** 22 | * Date: 06.09.22 23 | * Time: 09:33 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface ModuleClassFinder { 28 | 29 | fun findModuleClass(name: String): Class<*> 30 | 31 | } -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/ParameterType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api 20 | 21 | 22 | /** 23 | * Date: 14.03.22 24 | * Time: 09:59 25 | * @author Frederick Baier 26 | * 27 | */ 28 | interface ParameterType { 29 | 30 | fun resolveValue(request: Request): Any? 31 | 32 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/request/process/ProcessExecuteCommandRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.request.process 20 | 21 | import app.simplecloud.simplecloud.api.utils.Request 22 | 23 | /** 24 | * Date: 31.03.22 25 | * Time: 23:03 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface ProcessExecuteCommandRequest : Request -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/request/error/ErrorCreateRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.request.error 20 | 21 | import app.simplecloud.simplecloud.api.utils.Request 22 | 23 | /** 24 | * Date: 10.10.22 25 | * Time: 13:04 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface ErrorCreateRequest : Request -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/permission/Permissions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.permission 20 | 21 | /** 22 | * Date: 15.05.22 23 | * Time: 21:29 24 | * @author Frederick Baier 25 | * 26 | */ 27 | object Permissions { 28 | 29 | const val JOIN_FULL = "cloud.join.full" 30 | const val MAINTENANCE_JOIN = "cloud.join.maintenance" 31 | 32 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/utils/Nameable.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.utils 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 18.03.2021 24 | * Time: 15:25 25 | * @author Frederick Baier 26 | */ 27 | interface Nameable { 28 | 29 | /** 30 | * Returns the name of the object 31 | */ 32 | fun getName(): String 33 | 34 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/resource/cluster/update/V1Beta1ClusterUpdateBody.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.resource.cluster.update 20 | 21 | /** 22 | * Date: 05.04.23 23 | * Time: 11:46 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class V1Beta1ClusterUpdateBody( 28 | val moduleLinks: Array, 29 | val baseImage: String, 30 | ) -------------------------------------------------------------------------------- /plugin-parent/minestom/src/main/kotlin/app/simplecloud/simplecloud/plugin/server/type/minestom/MinestomListener.kt: -------------------------------------------------------------------------------- 1 | package app.simplecloud.simplecloud.plugin.server.type.minestom 2 | 3 | import app.simplecloud.simplecloud.plugin.OnlineCountUpdater 4 | import kotlinx.coroutines.runBlocking 5 | import net.minestom.server.event.Event 6 | import net.minestom.server.event.EventNode 7 | import net.minestom.server.event.player.PlayerDisconnectEvent 8 | import net.minestom.server.event.player.PlayerLoginEvent 9 | 10 | /** 11 | * Created by IntelliJ IDEA. 12 | * User: Philipp.Eistrach 13 | * Date: 01.07.22 14 | * Time: 18:43 15 | */ 16 | class MinestomListener( 17 | private val onlineCountUpdater: OnlineCountUpdater, 18 | private val eventNode: EventNode 19 | ) { 20 | 21 | fun listen() { 22 | this.eventNode 23 | .addListener(PlayerLoginEvent::class.java) { 24 | runBlocking { 25 | onlineCountUpdater.updateSelfOnlineCount() 26 | } 27 | } 28 | .addListener(PlayerDisconnectEvent::class.java) { 29 | runBlocking { 30 | onlineCountUpdater.updateSelfOnlineCount(-1) 31 | } 32 | } 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/auth/token/TokenHandlerFactory.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.auth.token 20 | 21 | /** 22 | * Date: 03.05.22 23 | * Time: 19:12 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface TokenHandlerFactory { 28 | 29 | fun create(secret: String): TokenHandler 30 | 31 | } -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/exception/UnauthorizedException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.exception 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 24.06.2021 24 | * Time: 10:50 25 | * @author Frederick Baier 26 | */ 27 | class UnauthorizedException : HttpException(401, "Not Authenticated") -------------------------------------------------------------------------------- /kubernetes/kubernetes-api/src/main/kotlin/app/simplecloud/simplecloud/kubernetes/api/exception/KubeException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.kubernetes.api.exception 20 | 21 | /** 22 | * Date: 25.09.22 23 | * Time: 10:16 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class KubeException( 28 | message: String, 29 | cause: Throwable? = null, 30 | ) : Exception(message, cause) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/future/exception/FutureOriginException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.future.exception 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 27/08/2021 24 | * Time: 10:52 25 | * @author Frederick Baier 26 | */ 27 | class FutureOriginException : Exception("Exception appended to the stacktrace to find the future origin") { 28 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/messagechannel/MessageRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.messagechannel 20 | 21 | import app.simplecloud.simplecloud.api.utils.Request 22 | 23 | /** 24 | * Created by IntelliJ IDEA. 25 | * Date: 29.05.2021 26 | * Time: 09:11 27 | * @author Frederick Baier 28 | */ 29 | interface MessageRequest : Request { 30 | 31 | } -------------------------------------------------------------------------------- /event-api/src/main/kotlin/app/simplecloud/simplecloud/eventapi/exception/EventException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.eventapi.exception 20 | 21 | import app.simplecloud.simplecloud.eventapi.Event 22 | 23 | 24 | class EventException(causeEvent: Event, cause: Throwable) : 25 | Exception("An error occurred while attempting to handle event ${causeEvent::class.java.name}", cause) { 26 | } -------------------------------------------------------------------------------- /kubernetes/kubernetes-api/src/main/kotlin/app/simplecloud/simplecloud/kubernetes/api/deployment/KubeDeploymentService.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.kubernetes.api.deployment 20 | 21 | /** 22 | * Date: 28.12.22 23 | * Time: 23:44 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface KubeDeploymentService { 28 | 29 | fun getDeployment(name: String): KubeDeployment 30 | 31 | } -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/resourcedefinition/request/exception/ResourceAlreadyExistsException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.resourcedefinition.request.exception 20 | 21 | /** 22 | * Date: 08.03.23 23 | * Time: 10:58 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class ResourceAlreadyExistsException(msg: String) : Exception(msg) -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/base/exception/ElementAlreadyExistException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.base.exception 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 27.06.2021 24 | * Time: 18:34 25 | * @author Frederick Baier 26 | */ 27 | class ElementAlreadyExistException(message: String) : Exception(message) -------------------------------------------------------------------------------- /microk8s/test-volume.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: claim-server 5 | spec: 6 | accessModes: 7 | - ReadWriteOnce 8 | resources: 9 | requests: 10 | storage: 5Gi 11 | storageClassName: microk8s-hostpath 12 | --- 13 | apiVersion: v1 14 | kind: Pod 15 | metadata: 16 | name: mc-server 17 | labels: 18 | app: mc-server 19 | spec: 20 | containers: 21 | - image: localhost:32000/paper-1.18:latest 22 | name: simplecloud-process 23 | ports: 24 | - containerPort: 25565 25 | env: 26 | - name: EULA 27 | value: "TRUE" 28 | - name: TYPE 29 | value: "PAPER" 30 | resources: 31 | requests: 32 | memory: 1024Mi 33 | #limits: 34 | # memory: 1024Mi 35 | volumeMounts: 36 | - mountPath: /data 37 | name: cloud-volume 38 | volumes: 39 | - name: cloud-volume 40 | persistentVolumeClaim: 41 | claimName: claim-server 42 | --- 43 | apiVersion: v1 44 | kind: Service 45 | metadata: 46 | name: mc-service 47 | spec: 48 | type: NodePort 49 | selector: 50 | app: mc-server 51 | ports: 52 | - protocol: TCP 53 | port: 25565 54 | targetPort: 25565 55 | nodePort: 30009 -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/service/NodeServiceImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.service 20 | 21 | import app.simplecloud.simplecloud.api.impl.service.DefaultNodeService 22 | import app.simplecloud.simplecloud.distribution.api.Distribution 23 | 24 | class NodeServiceImpl( 25 | distribution: Distribution 26 | ) : DefaultNodeService( 27 | distribution 28 | ) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/event/process/CloudProcessUpdatedEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.event.process 20 | 21 | import app.simplecloud.simplecloud.api.process.CloudProcess 22 | 23 | /** 24 | * Date: 08.05.22 25 | * Time: 17:58 26 | * @author Frederick Baier 27 | * 28 | */ 29 | class CloudProcessUpdatedEvent(process: CloudProcess) : CloudProcessEvent(process) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/link/LinkConfiguration.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.link 20 | 21 | /** 22 | * Date: 29.03.23 23 | * Time: 16:09 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class LinkConfiguration( 28 | val linkType: String, 29 | val oneResourceName: String, 30 | val manyResourceName: String, 31 | ) -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/resourcedefinition/request/RequestSpecResult.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.resourcedefinition.request 20 | 21 | /** 22 | * Date: 09.03.23 23 | * Time: 08:32 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface RequestSpecResult : RequestResult { 28 | 29 | override fun getSpec(): T 30 | 31 | } -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/resourcedefinition/request/exception/NoSuchResourceDefinitionException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.resourcedefinition.request.exception 20 | 21 | /** 22 | * Date: 08.03.23 23 | * Time: 10:54 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class NoSuchResourceDefinitionException(msg: String) : Exception(msg) -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/resourcedefinition/MissingResourcePropertyException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.resourcedefinition 20 | 21 | /** 22 | * Date: 21.01.23 23 | * Time: 22:21 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class MissingResourcePropertyException(missingProperty: String) : 28 | Exception("Missing resource property: '${missingProperty}'") -------------------------------------------------------------------------------- /plugin-parent/plugin/src/main/kotlin/app/simplecloud/simplecloud/plugin/proxy/request/ServerConnectedRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.plugin.proxy.request 20 | 21 | import app.simplecloud.simplecloud.api.player.configuration.PlayerConnectionConfiguration 22 | 23 | class ServerConnectedRequest( 24 | val playerConnection: PlayerConnectionConfiguration, 25 | val serverName: String, 26 | ) -------------------------------------------------------------------------------- /api-impl/src/main/kotlin/app/simplecloud/simplecloud/api/impl/env/RealEnvironmentVariables.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.impl.env 20 | 21 | /** 22 | * Date: 21.05.22 23 | * Time: 21:30 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class RealEnvironmentVariables : EnvironmentVariables { 28 | override fun get(name: String): String? { 29 | return System.getenv(name) 30 | } 31 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/event/process/CloudProcessRegisteredEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.event.process 20 | 21 | import app.simplecloud.simplecloud.api.process.CloudProcess 22 | 23 | /** 24 | * Date: 08.05.22 25 | * Time: 17:58 26 | * @author Frederick Baier 27 | * 28 | */ 29 | class CloudProcessRegisteredEvent(process: CloudProcess) : CloudProcessEvent(process) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/reference/NamedReference.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.reference 20 | 21 | 22 | /** 23 | * A special reference type which resolves the object by its name 24 | */ 25 | interface NamedReference : Reference { 26 | 27 | /** 28 | * Returns the name to resolve the object from 29 | */ 30 | fun getName(): String 31 | 32 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/ResourceDto.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition 20 | 21 | /** 22 | * Date: 04.02.23 23 | * Time: 09:53 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class ResourceDto( 28 | val apiVersion: String, 29 | val kind: String, 30 | val name: String, 31 | val spec: Any, 32 | val status: Any?, 33 | ) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/limitation/annotation/Optional.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.limitation.annotation 20 | 21 | /** 22 | * Date: 20.01.23 23 | * Time: 15:43 24 | * @author Frederick Baier 25 | * 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class Optional 30 | 31 | -------------------------------------------------------------------------------- /module/module-api-internal/src/main/kotlin/app/simplecloud/simplecloud/module/api/internal/request/ftp/FtpServerStopRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.internal.request.ftp 20 | 21 | import app.simplecloud.simplecloud.api.utils.Request 22 | 23 | /** 24 | * Date: 21.12.22 25 | * Time: 09:32 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface FtpServerStopRequest : Request -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/resourcedefinition/ResourceCustomActionHandler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.resourcedefinition 20 | 21 | /** 22 | * Date: 14.03.23 23 | * Time: 13:14 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface ResourceCustomActionHandler { 28 | 29 | fun handleAction(resourceName: String, body: T) 30 | 31 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/resource/permissiongroup/V1Beta1PermissionGroupSpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.resource.permissiongroup 20 | 21 | /** 22 | * Date: 09.03.23 23 | * Time: 14:33 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class V1Beta1PermissionGroupSpec( 28 | val priority: Int, 29 | val permissions: Array, 30 | ) -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/resource/player/V1Beta1CloudPlayerStatus.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.resource.player 20 | 21 | /** 22 | * Date: 10.03.23 23 | * Time: 18:07 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class V1Beta1CloudPlayerStatus( 28 | val isOnline: Boolean, 29 | val currentServerName: String?, 30 | val currentProxyName: String?, 31 | ) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/event/process/CloudProcessUnregisteredEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.event.process 20 | 21 | import app.simplecloud.simplecloud.api.process.CloudProcess 22 | 23 | /** 24 | * Date: 08.05.22 25 | * Time: 17:58 26 | * @author Frederick Baier 27 | * 28 | */ 29 | class CloudProcessUnregisteredEvent(process: CloudProcess) : CloudProcessEvent(process) -------------------------------------------------------------------------------- /kubernetes/kubernetes-api/src/main/kotlin/app/simplecloud/simplecloud/kubernetes/api/secret/KubeSecretService.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.kubernetes.api.secret 20 | 21 | interface KubeSecretService { 22 | 23 | fun createSecret(name: String, secretSpec: SecretSpec): KubeSecret 24 | 25 | fun getSecret(name: String): KubeSecret 26 | 27 | class SecretAlreadyExistException : Exception() 28 | 29 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/defaultcontroller/v1/dto/VolumeFtpServerStartDto.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.defaultcontroller.v1.dto 20 | 21 | /** 22 | * Date: 22.12.22 23 | * Time: 17:45 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class VolumeFtpServerStartDto( 28 | val staticProcessName: String, 29 | ) { 30 | 31 | private constructor() : this("") 32 | 33 | } -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/route/RequestType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.route 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 23.06.2021 24 | * Time: 09:14 25 | * @author Frederick Baier 26 | */ 27 | enum class RequestType { 28 | 29 | GET, 30 | 31 | PUT, 32 | 33 | POST, 34 | 35 | DELETE 36 | 37 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/utils/DefaultNameRequirement.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.utils 20 | 21 | /** 22 | * Date: 21.08.22 23 | * Time: 11:06 24 | * @author Frederick Baier 25 | * 26 | */ 27 | object DefaultNameRequirement { 28 | 29 | fun checkName(name: String) { 30 | require(name.length >= 2) { "Name must be at least 2 characters long" } 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/LocalServiceRegistry.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api 20 | 21 | /** 22 | * Date: 31.08.22 23 | * Time: 09:11 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface LocalServiceRegistry { 28 | 29 | fun registerService(clazz: Class, implementation: T) 30 | 31 | fun getService(clazz: Class): T 32 | 33 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/util/ZipUtil.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.util 20 | 21 | import java.io.File 22 | 23 | object ZipUtil { 24 | 25 | fun unzipTar(tar: File, unzipDir: File) { 26 | val processBuilder = ProcessBuilder("tar", "xvf", tar.absolutePath) 27 | processBuilder.directory(unzipDir) 28 | processBuilder.start().waitFor() 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/defaultcontroller/v1/dto/UpdateDto.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.defaultcontroller.v1.dto 20 | 21 | /** 22 | * Date: 30.12.22 23 | * Time: 17:12 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class UpdateDto( 28 | val moduleLinks: List, 29 | val baseImage: String, 30 | ) { 31 | 32 | private constructor() : this(emptyList(), "") 33 | 34 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/process/ProcessShutdownHandler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.process 20 | 21 | import app.simplecloud.simplecloud.api.process.CloudProcess 22 | 23 | interface ProcessShutdownHandler { 24 | 25 | suspend fun shutdownProcess() 26 | 27 | interface Factory { 28 | 29 | fun create(process: CloudProcess): ProcessShutdownHandler 30 | 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/event/player/CloudPlayerEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.event.player 20 | 21 | import app.simplecloud.simplecloud.api.player.CloudPlayer 22 | import app.simplecloud.simplecloud.eventapi.Event 23 | 24 | /** 25 | * Date: 08.05.22 26 | * Time: 12:11 27 | * @author Frederick Baier 28 | * 29 | */ 30 | class CloudPlayerEvent( 31 | val player: CloudPlayer 32 | ) : Event -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/repository/PermissionGroupRepository.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.repository 20 | 21 | import app.simplecloud.simplecloud.api.permission.configuration.PermissionGroupConfiguration 22 | 23 | /** 24 | * Date: 19.03.22 25 | * Time: 21:24 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface PermissionGroupRepository : Repository -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/utils/NetworkComponent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.utils 20 | 21 | import app.simplecloud.simplecloud.distribution.api.DistributionComponent 22 | 23 | /** 24 | * Date: 21.04.22 25 | * Time: 14:45 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface NetworkComponent : Nameable { 30 | 31 | fun getDistributionComponent(): DistributionComponent 32 | 33 | } -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/error/ErrorTypeFixedChecker.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.error 20 | 21 | import java.util.concurrent.CompletableFuture 22 | 23 | /** 24 | * Date: 18.03.23 25 | * Time: 16:33 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface ErrorTypeFixedChecker { 30 | 31 | fun isErrorFixed(error: Error): CompletableFuture 32 | 33 | } -------------------------------------------------------------------------------- /plugin-parent/plugin/src/main/kotlin/app/simplecloud/simplecloud/plugin/startup/service/NodeServiceImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.plugin.startup.service 20 | 21 | import app.simplecloud.simplecloud.api.impl.service.DefaultNodeService 22 | import app.simplecloud.simplecloud.distribution.api.Distribution 23 | 24 | class NodeServiceImpl( 25 | distribution: Distribution 26 | ) : DefaultNodeService( 27 | distribution 28 | ) -------------------------------------------------------------------------------- /api-impl/src/main/kotlin/app/simplecloud/simplecloud/api/impl/env/EnvironmentVariables.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.impl.env 20 | 21 | /** 22 | * Date: 21.05.22 23 | * Time: 21:27 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface EnvironmentVariables { 28 | 29 | /** 30 | * Returns the environment variable found by the specified name or null 31 | */ 32 | fun get(name: String): String? 33 | 34 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/limitation/annotation/MaxValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.limitation.annotation 20 | 21 | /** 22 | * Date: 20.01.23 23 | * Time: 15:43 24 | * @author Frederick Baier 25 | * 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class MaxValue( 30 | val value: Int, 31 | ) 32 | 33 | -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/limitation/annotation/MinValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.limitation.annotation 20 | 21 | /** 22 | * Date: 20.01.23 23 | * Time: 15:43 24 | * @author Frederick Baier 25 | * 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class MinValue( 30 | val value: Int, 31 | ) 32 | 33 | -------------------------------------------------------------------------------- /kubernetes/kubernetes-api/src/main/kotlin/app/simplecloud/simplecloud/kubernetes/api/deployment/KubeDeployment.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.kubernetes.api.deployment 20 | 21 | /** 22 | * Date: 28.12.22 23 | * Time: 23:44 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface KubeDeployment { 28 | 29 | fun getName(): String 30 | 31 | fun editImage(image: String) 32 | 33 | fun getImageName(): String 34 | 35 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/defaultcontroller/v1/dto/VolumeDto.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.defaultcontroller.v1.dto 20 | 21 | /** 22 | * Date: 22.12.22 23 | * Time: 17:25 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class VolumeDto( 28 | val name: String, 29 | val isFtpServerOnline: Boolean, 30 | val ftpUserName: String, 31 | val ftpPassword: String, 32 | val ftpPort: Int, 33 | ) -------------------------------------------------------------------------------- /plugin-parent/plugin/src/main/kotlin/app/simplecloud/simplecloud/plugin/proxy/request/ServerPreConnectRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.plugin.proxy.request 20 | 21 | import app.simplecloud.simplecloud.api.player.configuration.PlayerConnectionConfiguration 22 | 23 | class ServerPreConnectRequest( 24 | val playerConnection: PlayerConnectionConfiguration, 25 | val serverNameFrom: String?, 26 | val serverNameTo: String 27 | ) -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/base/exclude/annotation/WebExcludeAll.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.base.exclude.annotation 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 25.06.2021 24 | * Time: 12:19 25 | * @author Frederick Baier 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class WebExcludeAll() 30 | -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/impl/annotation/exclude/WebExcludeAll.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.impl.annotation.exclude 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 25.06.2021 24 | * Time: 12:19 25 | * @author Frederick Baier 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class WebExcludeAll() 30 | -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/event/process/CloudProcessEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.event.process 20 | 21 | import app.simplecloud.simplecloud.api.process.CloudProcess 22 | import app.simplecloud.simplecloud.eventapi.Event 23 | 24 | /** 25 | * Date: 08.05.22 26 | * Time: 12:10 27 | * @author Frederick Baier 28 | * 29 | */ 30 | open class CloudProcessEvent( 31 | val process: CloudProcess 32 | ) : Event -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/limitation/annotation/StringMaxLength.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.limitation.annotation 20 | 21 | /** 22 | * Date: 20.01.23 23 | * Time: 15:54 24 | * @author Frederick Baier 25 | * 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class StringMaxLength( 30 | val value: Int, 31 | ) 32 | -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/limitation/annotation/StringMinLength.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.limitation.annotation 20 | 21 | /** 22 | * Date: 20.01.23 23 | * Time: 15:54 24 | * @author Frederick Baier 25 | * 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class StringMinLength( 30 | val value: Int, 31 | ) 32 | -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/resource/onlinestrategy/V1Beta1ProcessOnlineCountStrategySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.resource.onlinestrategy 20 | 21 | /** 22 | * Date: 10.03.23 23 | * Time: 09:56 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class V1Beta1ProcessOnlineCountStrategySpec( 28 | val className: String, 29 | val dataKeys: Array, 30 | val dataValues: Array, 31 | ) -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/error/ErrorFactory.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.error 20 | 21 | import app.simplecloud.simplecloud.module.api.error.configuration.ErrorConfiguration 22 | 23 | /** 24 | * Date: 18.10.22 25 | * Time: 12:26 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface ErrorFactory { 30 | 31 | fun create(errorConfiguration: ErrorConfiguration): Error 32 | 33 | } -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/base/exclude/annotation/WebExcludeIncoming.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.base.exclude.annotation 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 25.06.2021 24 | * Time: 12:19 25 | * @author Frederick Baier 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class WebExcludeIncoming() 30 | -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/base/exclude/annotation/WebExcludeOutgoing.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.base.exclude.annotation 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 25.06.2021 24 | * Time: 12:19 25 | * @author Frederick Baier 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class WebExcludeOutgoing() 30 | -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/impl/annotation/exclude/WebExcludeIncoming.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.impl.annotation.exclude 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 25.06.2021 24 | * Time: 12:19 25 | * @author Frederick Baier 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class WebExcludeIncoming() 30 | -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/impl/annotation/exclude/WebExcludeOutgoing.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.impl.annotation.exclude 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 25.06.2021 24 | * Time: 12:19 25 | * @author Frederick Baier 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class WebExcludeOutgoing() 30 | -------------------------------------------------------------------------------- /api-impl/src/main/kotlin/app/simplecloud/simplecloud/api/impl/env/VirtualEnvironmentVariables.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.impl.env 20 | 21 | /** 22 | * Date: 21.05.22 23 | * Time: 21:31 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class VirtualEnvironmentVariables( 28 | private val map: Map 29 | ) : EnvironmentVariables { 30 | override fun get(name: String): String? { 31 | return map[name] 32 | } 33 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/repository/StaticProcessTemplateRepository.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.repository 20 | 21 | import app.simplecloud.simplecloud.api.template.configuration.AbstractProcessTemplateConfiguration 22 | 23 | /** 24 | * Date: 17.08.22 25 | * Time: 08:10 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface StaticProcessTemplateRepository : Repository -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/limitation/annotation/IntNumberValues.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.limitation.annotation 20 | 21 | /** 22 | * Date: 20.01.23 23 | * Time: 15:43 24 | * @author Frederick Baier 25 | * 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class IntNumberValues( 30 | val values: IntArray, 31 | ) 32 | 33 | -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/limitation/annotation/StringValues.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.limitation.annotation 20 | 21 | /** 22 | * Date: 20.01.23 23 | * Time: 15:43 24 | * @author Frederick Baier 25 | * 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class StringValues( 30 | val values: Array, 31 | ) 32 | 33 | -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/service/CloudStateService.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.service 20 | 21 | import app.simplecloud.simplecloud.api.utils.CloudState 22 | import java.util.concurrent.CompletableFuture 23 | 24 | /** 25 | * Date: 23.03.23 26 | * Time: 11:55 27 | * @author Frederick Baier 28 | * 29 | */ 30 | interface CloudStateService { 31 | 32 | fun getCloudState(): CompletableFuture 33 | 34 | } -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/resourcedefinition/request/RequestSpecAndStatusResult.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.resourcedefinition.request 20 | 21 | /** 22 | * Date: 09.03.23 23 | * Time: 08:33 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface RequestSpecAndStatusResult : RequestSpecResult { 28 | 29 | override fun getStatus(): STATUS? 30 | 31 | } -------------------------------------------------------------------------------- /plugin-parent/minestom/src/main/kotlin/app/simplecloud/simplecloud/plugin/server/type/minestom/CloudMinestomPlugin.kt: -------------------------------------------------------------------------------- 1 | package app.simplecloud.simplecloud.plugin.server.type.minestom 2 | 3 | import app.simplecloud.simplecloud.api.impl.env.RealEnvironmentVariables 4 | import app.simplecloud.simplecloud.distribution.api.Address 5 | import app.simplecloud.simplecloud.distribution.hazelcast.HazelcastDistributionFactory 6 | import app.simplecloud.simplecloud.plugin.SelfOnlineCountProvider 7 | import app.simplecloud.simplecloud.plugin.server.CloudServerPlugin 8 | import net.minestom.server.MinecraftServer 9 | import net.minestom.server.extensions.Extension 10 | 11 | /** 12 | * Created by IntelliJ IDEA. 13 | * User: Philipp.Eistrach 14 | * Date: 01.07.22 15 | * Time: 18:42 16 | */ 17 | class CloudMinestomPlugin : Extension() { 18 | 19 | private val cloudPlugin = CloudServerPlugin( 20 | HazelcastDistributionFactory(), 21 | RealEnvironmentVariables(), 22 | Address.fromIpString("distribution:1670"), 23 | SelfOnlineCountProvider { MinecraftServer.getConnectionManager().onlinePlayers.size } 24 | ) 25 | 26 | override fun initialize() { 27 | MinestomListener(this.cloudPlugin.onlineCountUpdater, this.eventNode).listen() 28 | } 29 | 30 | override fun terminate() { 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /api-impl/src/main/kotlin/app/simplecloud/simplecloud/api/impl/distribution/DistributedQuery.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.impl.distribution 20 | 21 | import java.util.* 22 | import java.util.concurrent.CompletableFuture 23 | 24 | /** 25 | * Created by IntelliJ IDEA. 26 | * Date: 29.05.2021 27 | * Time: 12:24 28 | * @author Frederick Baier 29 | */ 30 | class DistributedQuery( 31 | val queryId: UUID, 32 | val future: CompletableFuture 33 | ) -------------------------------------------------------------------------------- /api-internal/src/main/kotlin/app/simplecloud/simplecloud/api/internal/configutation/ProcessExecuteCommandConfiguration.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.internal.configutation 20 | 21 | /** 22 | * Date: 01.04.22 23 | * Time: 16:05 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class ProcessExecuteCommandConfiguration( 28 | val processName: String, 29 | val command: String 30 | ) { 31 | 32 | private constructor() : this("", "") 33 | 34 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/request/permission/PermissionGroupCreateRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.request.permission 20 | 21 | import app.simplecloud.simplecloud.api.permission.PermissionGroup 22 | import app.simplecloud.simplecloud.api.utils.Request 23 | 24 | /** 25 | * Date: 20.03.22 26 | * Time: 18:45 27 | * @author Frederick Baier 28 | * 29 | */ 30 | interface PermissionGroupCreateRequest : Request -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/limitation/annotation/LongNumberValues.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.limitation.annotation 20 | 21 | /** 22 | * Date: 20.01.23 23 | * Time: 15:43 24 | * @author Frederick Baier 25 | * 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class LongNumberValues( 30 | val values: LongArray, 31 | ) 32 | 33 | -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/controller/annotation/RequestingEntity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.controller.annotation 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 23.06.2021 24 | * Time: 10:06 25 | * @author Frederick Baier 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.VALUE_PARAMETER) 29 | annotation class RequestingEntity() 30 | -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/resourcedefinition/limitation/annotation/DoubleNumberValues.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.resourcedefinition.limitation.annotation 20 | 21 | /** 22 | * Date: 20.01.23 23 | * Time: 15:43 24 | * @author Frederick Baier 25 | * 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.FIELD) 29 | annotation class DoubleNumberValues( 30 | val values: DoubleArray, 31 | ) 32 | 33 | -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/LocalAPI.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api 20 | 21 | import java.util.concurrent.ScheduledExecutorService 22 | 23 | /** 24 | * Date: 03.10.22 25 | * Time: 19:32 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface LocalAPI { 30 | 31 | fun getLocalExecutorService(): ScheduledExecutorService 32 | 33 | fun getLocalServiceRegistry(): LocalServiceRegistry 34 | 35 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/event/processgroup/CloudProcessGroupEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.event.processgroup 20 | 21 | import app.simplecloud.simplecloud.api.template.group.CloudProcessGroup 22 | import app.simplecloud.simplecloud.eventapi.Event 23 | 24 | /** 25 | * Date: 08.05.22 26 | * Time: 12:10 27 | * @author Frederick Baier 28 | * 29 | */ 30 | class CloudProcessGroupEvent( 31 | val group: CloudProcessGroup 32 | ) : Event -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/reference/NamedReferenceHolder.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.reference 20 | 21 | /** 22 | * Special tpy of [ReferenceHolder] which uses a [String] as identifier 23 | */ 24 | interface NamedReferenceHolder : ReferenceHolder { 25 | 26 | override fun getReference(referenceName: String): NamedReference? 27 | 28 | override fun putReference(referenceName: String, identifier: String) 29 | 30 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/repository/CloudProcessGroupRepository.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.repository 20 | 21 | import app.simplecloud.simplecloud.api.template.configuration.AbstractProcessTemplateConfiguration 22 | 23 | /** 24 | * Created by IntelliJ IDEA. 25 | * Date: 27.03.2021 26 | * Time: 13:41 27 | * @author Frederick Baier 28 | */ 29 | interface CloudProcessGroupRepository : Repository -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/request/player/PlayerConnectRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.request.player 20 | 21 | import app.simplecloud.simplecloud.api.player.connect.PlayerConnectResult 22 | import app.simplecloud.simplecloud.api.utils.Request 23 | 24 | /** 25 | * Created by IntelliJ IDEA. 26 | * Date: 21.03.2021 27 | * Time: 19:15 28 | * @author Frederick Baier 29 | */ 30 | interface PlayerConnectRequest : Request -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/template/ProcessProxyTemplate.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.template 20 | 21 | import app.simplecloud.simplecloud.api.request.template.ProcessProxyTemplateUpdateRequest 22 | 23 | /** 24 | * Date: 17.08.22 25 | * Time: 08:35 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface ProcessProxyTemplate : ProcessTemplate { 30 | 31 | override fun createUpdateRequest(): ProcessProxyTemplateUpdateRequest 32 | } -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/controller/ControllerHandler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.controller 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 23.06.2021 24 | * Time: 09:40 25 | * @author Frederick Baier 26 | */ 27 | interface ControllerHandler { 28 | 29 | fun registerController(controller: Controller) 30 | 31 | fun unregisterController(controller: Controller) 32 | 33 | } -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/controller/ControllerHandlerFactory.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.controller 20 | 21 | import app.simplecloud.simplecloud.restserver.api.RestServer 22 | 23 | /** 24 | * Date: 04.05.22 25 | * Time: 21:05 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface ControllerHandlerFactory { 30 | 31 | fun create(restServer: RestServer): ControllerHandler 32 | 33 | } -------------------------------------------------------------------------------- /event-api/src/main/kotlin/app/simplecloud/simplecloud/eventapi/CancellableEvent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.eventapi 20 | 21 | /** 22 | * Represents an event that can be cancelled 23 | */ 24 | interface CancellableEvent : Event { 25 | 26 | /** 27 | * Returns whether this event was cancelled 28 | */ 29 | fun isCancelled(): Boolean 30 | 31 | /** 32 | * Sets the cancelled state 33 | */ 34 | fun setCancelled(cancelled: Boolean) 35 | 36 | } -------------------------------------------------------------------------------- /module/module-load/src/main/kotlin/app/simplecloud/simplecloud/module/load/LoadedModuleFileContent.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.load 20 | 21 | import app.simplecloud.simplecloud.module.load.modulefilecontent.ModuleFileContent 22 | import java.io.File 23 | 24 | /** 25 | * Date: 05.09.22 26 | * Time: 10:36 27 | * @author Frederick Baier 28 | * 29 | */ 30 | class LoadedModuleFileContent( 31 | val file: File, 32 | val moduleFileContent: ModuleFileContent, 33 | ) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/template/ProcessServerTemplate.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.template 20 | 21 | import app.simplecloud.simplecloud.api.request.template.ProcessServerTemplateUpdateRequest 22 | 23 | /** 24 | * Date: 17.08.22 25 | * Time: 08:35 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface ProcessServerTemplate : ProcessTemplate { 30 | 31 | override fun createUpdateRequest(): ProcessServerTemplateUpdateRequest 32 | 33 | } -------------------------------------------------------------------------------- /module/module-api-internal/src/main/kotlin/app/simplecloud/simplecloud/module/api/internal/request/ftp/FtpServerCreateRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.internal.request.ftp 20 | 21 | import app.simplecloud.simplecloud.api.utils.Request 22 | import app.simplecloud.simplecloud.module.api.internal.ftp.FtpServer 23 | 24 | /** 25 | * Date: 21.12.22 26 | * Time: 09:32 27 | * @author Frederick Baier 28 | * 29 | */ 30 | interface FtpServerCreateRequest : Request -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/auth/UsernameAndPasswordCredentials.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.auth 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 23.06.2021 24 | * Time: 14:50 25 | * @author Frederick Baier 26 | */ 27 | data class UsernameAndPasswordCredentials( 28 | val username: String, 29 | val password: String 30 | ) { 31 | 32 | private constructor(): this("", "") 33 | 34 | } -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/base/exception/MissingPermissionException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.base.exception 20 | 21 | import app.simplecloud.simplecloud.restserver.api.exception.HttpException 22 | 23 | 24 | /** 25 | * Created by IntelliJ IDEA. 26 | * Date: 24.06.2021 27 | * Time: 10:50 28 | * @author Frederick Baier 29 | */ 30 | class MissingPermissionException : HttpException(403, "Missing Permission") -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/request/template/ProcessTemplateCreateRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.request.template 20 | 21 | import app.simplecloud.simplecloud.api.template.ProcessTemplate 22 | import app.simplecloud.simplecloud.api.utils.Request 23 | 24 | /** 25 | * Created by IntelliJ IDEA. 26 | * Date: 18.03.2021 27 | * Time: 15:18 28 | * @author Frederick Baier 29 | */ 30 | interface ProcessTemplateCreateRequest : Request -------------------------------------------------------------------------------- /module/module-load/src/main/kotlin/app/simplecloud/simplecloud/module/load/exception/ModuleLoadException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.load.exception 20 | 21 | /** 22 | * Date: 02.09.22 23 | * Time: 09:47 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class ModuleLoadException(moduleName: String, ex: Throwable?) : 28 | Exception("An error occurred while loading module: $moduleName", ex) { 29 | 30 | constructor(moduleName: String) : this(moduleName, null) 31 | 32 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/image/ImageImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.image 20 | 21 | class ImageImpl( 22 | private val name: String 23 | ) : Image { 24 | 25 | override fun getName(): String { 26 | return this.name 27 | } 28 | 29 | companion object { 30 | 31 | fun fromName(name: String?): ImageImpl? { 32 | if (name == null) return null 33 | return ImageImpl(name) 34 | } 35 | 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /module/module-api/src/main/kotlin/app/simplecloud/simplecloud/module/api/error/configuration/ErrorCreateConfiguration.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.error.configuration 20 | 21 | /** 22 | * Date: 21.10.22 23 | * Time: 17:49 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class ErrorCreateConfiguration( 28 | val errorType: Int, 29 | val shortMessage: String, 30 | val message: String, 31 | val processName: String, 32 | val errorData: Map, 33 | ) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/request/template/ProcessProxyTemplateUpdateRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.request.template 20 | 21 | import app.simplecloud.simplecloud.api.template.ProcessProxyTemplate 22 | 23 | /** 24 | * Date: 17.08.22 25 | * Time: 08:38 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface ProcessProxyTemplateUpdateRequest : ProcessTemplateUpdateRequest { 30 | 31 | override fun getProcessTemplate(): ProcessProxyTemplate 32 | 33 | } -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/controller/annotation/RequestPathParam.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.controller.annotation 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 23.06.2021 24 | * Time: 13:42 25 | * @author Frederick Baier 26 | */ 27 | @Retention(AnnotationRetention.RUNTIME) 28 | @Target(AnnotationTarget.VALUE_PARAMETER) 29 | annotation class RequestPathParam( 30 | val parameterName: String 31 | ) 32 | -------------------------------------------------------------------------------- /api-impl/src/main/kotlin/app/simplecloud/simplecloud/api/impl/distribution/DistributedQueryHandler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.impl.distribution 20 | 21 | import app.simplecloud.simplecloud.api.utils.NetworkComponent 22 | import java.util.concurrent.CompletableFuture 23 | 24 | interface DistributedQueryHandler { 25 | 26 | fun sendQuery(topic: String, message: Any, networkComponent: NetworkComponent): CompletableFuture 27 | 28 | fun sendToAll(topic: String, message: Any) 29 | 30 | } -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/request/template/ProcessServerTemplateUpdateRequest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.request.template 20 | 21 | import app.simplecloud.simplecloud.api.template.ProcessServerTemplate 22 | 23 | /** 24 | * Date: 17.08.22 25 | * Time: 08:38 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface ProcessServerTemplateUpdateRequest : ProcessTemplateUpdateRequest { 30 | 31 | override fun getProcessTemplate(): ProcessServerTemplate 32 | 33 | } -------------------------------------------------------------------------------- /module/module-api-impl/src/main/kotlin/app/simplecloud/simplecloud/module/api/impl/ftp/stop/FtpServerStopper.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.impl.ftp.stop 20 | 21 | import app.simplecloud.simplecloud.module.api.internal.ftp.configuration.FtpServerConfiguration 22 | 23 | /** 24 | * Date: 21.12.22 25 | * Time: 17:21 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface FtpServerStopper { 30 | 31 | suspend fun stopServer(ftpServerConfiguration: FtpServerConfiguration) 32 | 33 | } -------------------------------------------------------------------------------- /module/module-api-internal/src/main/kotlin/app/simplecloud/simplecloud/module/api/internal/ftp/configuration/FtpServerConfiguration.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.module.api.internal.ftp.configuration 20 | 21 | /** 22 | * Date: 21.12.22 23 | * Time: 12:06 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class FtpServerConfiguration( 28 | val ftpServerName: String, 29 | val ftpUser: String, 30 | val ftpPassword: String, 31 | val volumeClaimName: String, 32 | val port: Int, 33 | ) -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/utils/Identifiable.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.utils 20 | 21 | /** 22 | * Created by IntelliJ IDEA. 23 | * Date: 26.03.2021 24 | * Time: 21:16 25 | * @author Frederick Baier 26 | * 27 | * Represents an object that has a unique identifier 28 | * @param I the type of the identifier 29 | * 30 | */ 31 | interface Identifiable { 32 | 33 | /** 34 | * Returns the identifier 35 | */ 36 | fun getIdentifier(): I 37 | 38 | } -------------------------------------------------------------------------------- /database/database-api/src/main/kotlin/app/simplecloud/simplecloud/database/api/factory/DatabaseFactory.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.database.api.factory 20 | 21 | /** 22 | * Date: 24.04.22 23 | * Time: 11:47 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface DatabaseFactory { 28 | 29 | /** 30 | * Creates all repositories needed 31 | * @throws java.net.ConnectException if the connection failed 32 | */ 33 | fun create(connectionString: String): DatabaseRepositories 34 | 35 | } -------------------------------------------------------------------------------- /microk8s/simplecloud-pod.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: cloud-claim 5 | spec: 6 | storageClassName: microk8s-hostpath 7 | accessModes: 8 | - ReadWriteOnce 9 | resources: 10 | requests: 11 | storage: 5Gi 12 | --- 13 | apiVersion: v1 14 | kind: Pod 15 | metadata: 16 | name: simplecloud 17 | labels: 18 | app: simplecloud 19 | spec: 20 | containers: 21 | - name: simplecloud 22 | image: localhost:32000/simplecloud3:latest 23 | volumeMounts: 24 | - name: cloud-volume 25 | mountPath: "/node/cloud" 26 | ports: 27 | - containerPort: 8008 28 | env: 29 | - name: SELF_HOST 30 | valueFrom: 31 | fieldRef: 32 | fieldPath: status.podIP 33 | volumes: 34 | - name: cloud-volume 35 | persistentVolumeClaim: 36 | claimName: cloud-claim 37 | --- 38 | apiVersion: v1 39 | kind: Service 40 | metadata: 41 | name: rest 42 | spec: 43 | type: NodePort 44 | selector: 45 | app: simplecloud 46 | ports: 47 | - protocol: TCP 48 | port: 8008 49 | targetPort: 8008 50 | nodePort: 30008 51 | --- 52 | apiVersion: v1 53 | kind: Service 54 | metadata: 55 | name: distribution 56 | spec: 57 | selector: 58 | app: simplecloud 59 | ports: 60 | - protocol: TCP 61 | port: 1670 62 | targetPort: 1670 -------------------------------------------------------------------------------- /api-impl/src/main/kotlin/app/simplecloud/simplecloud/api/impl/distribution/DistributionDataTransferObject.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.impl.distribution 20 | 21 | import java.util.* 22 | 23 | /** 24 | * Created by IntelliJ IDEA. 25 | * Date: 29.05.2021 26 | * Time: 12:10 27 | * @author Frederick Baier 28 | */ 29 | data class DistributionDataTransferObject( 30 | val topic: String, 31 | val messageId: UUID, 32 | val message: Result, 33 | val isResponse: Boolean 34 | ) : java.io.Serializable -------------------------------------------------------------------------------- /api-internal/src/main/kotlin/app/simplecloud/simplecloud/api/internal/service/InternalCloudStateService.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.internal.service 20 | 21 | import app.simplecloud.simplecloud.api.service.CloudStateService 22 | import app.simplecloud.simplecloud.api.utils.CloudState 23 | 24 | /** 25 | * Date: 23.03.23 26 | * Time: 13:21 27 | * @author Frederick Baier 28 | * 29 | */ 30 | interface InternalCloudStateService : CloudStateService { 31 | 32 | fun setCloudState(state: CloudState) 33 | 34 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/defaultcontroller/v1/dto/OnlineStrategyUpdateRequestDto.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.defaultcontroller.v1.dto 20 | 21 | /** 22 | * Date: 27.03.22 23 | * Time: 09:59 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class OnlineStrategyUpdateRequestDto( 28 | val name: String, 29 | val targetGroupNames: List, 30 | val data: Map 31 | ) { 32 | 33 | private constructor() : this("", emptyList(), emptyMap()) 34 | 35 | } -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/auth/Headers.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.auth 20 | 21 | /** 22 | * Date: 03.05.22 23 | * Time: 11:13 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface Headers { 28 | 29 | fun hasHeader(name: String): Boolean 30 | 31 | /** 32 | * Returns the header 33 | * @throws NoSuchElementException if the header cannot be found 34 | */ 35 | fun getHeader(name: String): String 36 | 37 | } -------------------------------------------------------------------------------- /node/src/main/kotlin/app/simplecloud/simplecloud/node/resource/error/V1Beta1ErrorResourceSpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.node.resource.error 20 | 21 | /** 22 | * Date: 18.03.23 23 | * Time: 12:55 24 | * @author Frederick Baier 25 | * 26 | */ 27 | class V1Beta1ErrorResourceSpec( 28 | val errorType: Int, 29 | val shortMessage: String, 30 | val message: String, 31 | val processName: String, 32 | val timeStamp: Long, 33 | val dataKeys: Array, 34 | val dataValues: Array, 35 | ) -------------------------------------------------------------------------------- /plugin-parent/plugin/src/main/kotlin/app/simplecloud/simplecloud/plugin/OnlineCountUpdater.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.plugin 20 | 21 | /** 22 | * Date: 23.01.22 23 | * Time: 19:09 24 | * @author Frederick Baier 25 | * 26 | */ 27 | interface OnlineCountUpdater { 28 | 29 | /** 30 | * Updates the online count for the self process 31 | * @param addition an amount that gets added to the online count before updating it 32 | */ 33 | suspend fun updateSelfOnlineCount(addition: Int = 0) 34 | 35 | } -------------------------------------------------------------------------------- /rest-server/rest-server-api/src/main/kotlin/app/simplecloud/simplecloud/restserver/api/exception/HttpException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.api.exception 20 | 21 | 22 | /** 23 | * Created by IntelliJ IDEA. 24 | * Date: 24.06.2021 25 | * Time: 15:33 26 | * @author Frederick Baier 27 | */ 28 | open class HttpException(val statusCode: Int, message: String, cause: Throwable?) : Exception(message, cause) { 29 | 30 | constructor(statusCode: Int, message: String) : this(statusCode, message, null) 31 | 32 | } -------------------------------------------------------------------------------- /rest-server/rest-server-base/src/main/kotlin/app/simplecloud/simplecloud/restserver/base/exception/InvalidParameterException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.restserver.base.exception 20 | 21 | import app.simplecloud.simplecloud.restserver.api.exception.HttpException 22 | 23 | 24 | /** 25 | * Created by IntelliJ IDEA. 26 | * Date: 24.06.2021 27 | * Time: 10:50 28 | * @author Frederick Baier 29 | */ 30 | class InvalidParameterException(parameterClass: String) : HttpException(500, "Invalid parameter: ${parameterClass}") -------------------------------------------------------------------------------- /api/src/main/kotlin/app/simplecloud/simplecloud/api/template/ProcessLobbyTemplate.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleCloud is a software for administrating a minecraft server network. 3 | * Copyright (C) 2022 Frederick Baier & Philipp Eistrach 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU Affero General Public License as 7 | * published by the Free Software Foundation, either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Affero General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Affero General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package app.simplecloud.simplecloud.api.template 20 | 21 | import app.simplecloud.simplecloud.api.request.template.ProcessLobbyTemplateUpdateRequest 22 | 23 | /** 24 | * Date: 17.08.22 25 | * Time: 08:35 26 | * @author Frederick Baier 27 | * 28 | */ 29 | interface ProcessLobbyTemplate : ProcessServerTemplate { 30 | 31 | fun getLobbyPriority(): Int 32 | 33 | override fun createUpdateRequest(): ProcessLobbyTemplateUpdateRequest 34 | 35 | } --------------------------------------------------------------------------------