mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-11 18:59:40 +08:00
refactor: js plugin api
This commit is contained in:
23
parsers/js/plugin.go
Normal file
23
parsers/js/plugin.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package js
|
||||
|
||||
import "github.com/blang/semver"
|
||||
|
||||
var (
|
||||
LatestParserVersion = semver.MustParse("1.0.0")
|
||||
MinimumParserVersion = semver.MustParse("1.0.0")
|
||||
)
|
||||
|
||||
type PluginMeta struct {
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version"` // [TODO] 分版本解析, 但是我们现在只有 v1 所以先不写
|
||||
Description string `json:"description"`
|
||||
Author string `json:"author"`
|
||||
}
|
||||
|
||||
type ParserMethod uint
|
||||
|
||||
const (
|
||||
_ ParserMethod = iota
|
||||
ParserMethodCanHandle
|
||||
ParserMethodParse
|
||||
)
|
||||
Reference in New Issue
Block a user