[feat] Service 服务支持

This commit is contained in:
what 2023-04-24 15:02:51 +08:00
parent c0df8cbaff
commit c81730e740
2 changed files with 13 additions and 7 deletions

10
server.go Normal file
View File

@ -0,0 +1,10 @@
package contracts
import (
"net/http"
)
type Server interface {
Execute(*http.Request) any
ServeHTTP(http.ResponseWriter, *http.Request)
}

View File

@ -1,10 +1,6 @@
package contracts
import (
"net/http"
)
type Service interface {
Execute(*http.Request) any
ServeHTTP(http.ResponseWriter, *http.Request)
GetResListener(code string) ResListener
GetControllerr(code string) Controller
}