-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da8aba9
commit f43f619
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
api/src/main/kotlin/me/blueamethyst/bluecloud/api/module/AbstractModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package me.blueamethyst.bluecloud.api.module | ||
|
||
import me.blueamethyst.bluecloud.api.module.annontations.Module | ||
|
||
abstract class AbstractModule { | ||
|
||
abstract fun load() | ||
abstract fun startup() | ||
abstract fun shutdown() | ||
|
||
fun getModuleInfo(): Module? { | ||
return this::class.java.getAnnotation(Module::class.java) | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
api/src/main/kotlin/me/blueamethyst/bluecloud/api/module/annontations/Module.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package me.blueamethyst.bluecloud.api.module.annontations | ||
|
||
annotation class Module( | ||
val name: String, | ||
val version: String, | ||
val description: String, | ||
val author: String, | ||
val dependencies: Array<String> = [], | ||
val reloadable: Boolean = false | ||
) |
8 changes: 8 additions & 0 deletions
8
api/src/main/kotlin/me/blueamethyst/bluecloud/api/module/models/ModuleConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package me.blueamethyst.bluecloud.api.module.models | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ModuleConfiguration( | ||
val entrypoint: String | ||
) |