24 lines
479 B
Go
24 lines
479 B
Go
package annotation
|
|
|
|
import (
|
|
"reflect"
|
|
|
|
"git.loafle.net/loafer/annotation-go"
|
|
)
|
|
|
|
var RequestMappingAnnotationType = reflect.TypeOf((*RequestMappingAnnotation)(nil))
|
|
|
|
func init() {
|
|
if err := annotation.Register(RequestMappingAnnotationType); nil != err {
|
|
panic(err)
|
|
}
|
|
}
|
|
|
|
type RequestMappingAnnotation struct {
|
|
annotation.TypeAnnotation `@annotation:"@web:RequestMapping"`
|
|
|
|
Method string `json:"method"`
|
|
Entry string `json:"entry"`
|
|
Params []string `json:"params"`
|
|
}
|