server/pkg/loafer/app/annotation/server.go

26 lines
584 B
Go
Raw Normal View History

2019-11-11 15:00:04 +00:00
package annotation
import (
"reflect"
2019-11-13 14:21:05 +00:00
"git.loafle.net/loafer/annotation-go"
2019-11-11 15:00:04 +00:00
)
var ServerAnnotationType = reflect.TypeOf((*ServerAnnotation)(nil))
func init() {
2019-11-13 14:21:05 +00:00
if err := annotation.Register(ServerAnnotationType); nil != err {
panic(err)
}
2019-11-11 15:00:04 +00:00
}
type ServerAnnotation struct {
2019-11-13 14:21:05 +00:00
annotation.TypeAnnotation `@annotation:"@app:Server"`
2019-11-11 15:00:04 +00:00
RootDir string `json:"rootDir"`
Mount map[string][]string `json:"mount"`
UploadDir string `json:"uploadDir"`
HTTPPort int16 `json:"httpPort"`
HTTPSPort int16 `json:"httpsPort"`
}