mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 02:20:14 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
479bae0365
@ -0,0 +1,12 @@
|
||||
package net.mamoe.mirai.console.center
|
||||
|
||||
object CuiPluginCenter: PluginCenter{
|
||||
override suspend fun fetchPlugin(page: Int): Map<String, PluginCenter.PluginInsight> {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override suspend fun findPlugin(name: String): PluginCenter.PluginInfo? {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package net.mamoe.mirai.console.center
|
||||
|
||||
interface PluginCenter {
|
||||
|
||||
companion object{
|
||||
val Default:PluginCenter = CuiPluginCenter
|
||||
}
|
||||
|
||||
data class PluginInsight(
|
||||
val name:String,
|
||||
val version:String,
|
||||
val coreVersion:String,
|
||||
val consoleVersion:String,
|
||||
val author:String,
|
||||
val description: String,
|
||||
val tags:List<String>,
|
||||
val commands:List<String>,
|
||||
)
|
||||
|
||||
data class PluginInfo(
|
||||
val name:String,
|
||||
val version:String,
|
||||
val coreVersion:String,
|
||||
val consoleVersion:String,
|
||||
val tags:List<String>,
|
||||
val author:String,
|
||||
val contact:String,
|
||||
val description: String,
|
||||
val usage:String,
|
||||
val vcs:String,
|
||||
val commands:String,
|
||||
val changeLog:List<String>
|
||||
)
|
||||
|
||||
/**
|
||||
* 获取一些中心的插件基本信息,
|
||||
* 能获取到多少由实际的PluginCenter决定
|
||||
* 返回 插件名->Insight
|
||||
*/
|
||||
suspend fun fetchPlugin(page: Int) :Map<String,PluginInsight>
|
||||
|
||||
/**
|
||||
* 尝试获取到某个插件by全名, case sensitive
|
||||
* null则没有
|
||||
*/
|
||||
suspend fun findPlugin(name:String):PluginInfo?
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user