25 lines
465 B
Go
25 lines
465 B
Go
package server
|
|
|
|
import (
|
|
"reflect"
|
|
|
|
cda "git.loafle.net/commons/di-go/annotation"
|
|
cdr "git.loafle.net/commons/di-go/registry"
|
|
|
|
// For annotation
|
|
_ "git.loafle.net/totopia/server/pkg/loafer/app/annotation"
|
|
|
|
// For user
|
|
_ "git.loafle.net/totopia/server/pkg/modules/user"
|
|
)
|
|
|
|
var ServerType = reflect.TypeOf((*Server)(nil))
|
|
|
|
func init() {
|
|
cdr.RegisterType(ServerType)
|
|
}
|
|
|
|
type Server struct {
|
|
cda.TypeAnnotation `annotation:"@app:Server(\"httpPort\": 8080)"`
|
|
}
|