server/pkg/loafer/web/annotation/request-mapping.go

24 lines
479 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 RequestMappingAnnotationType = reflect.TypeOf((*RequestMappingAnnotation)(nil))
func init() {
2019-11-13 14:21:05 +00:00
if err := annotation.Register(RequestMappingAnnotationType); nil != err {
panic(err)
}
2019-11-11 15:00:04 +00:00
}
type RequestMappingAnnotation struct {
2019-11-13 14:21:05 +00:00
annotation.TypeAnnotation `@annotation:"@web:RequestMapping"`
2019-11-11 15:00:04 +00:00
Method string `json:"method"`
Entry string `json:"entry"`
Params []string `json:"params"`
}