2018-04-05 15:15:29 +00:00
|
|
|
package web
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.loafle.net/commons/server-go"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ServerHandler interface {
|
|
|
|
server.ServerHandler
|
|
|
|
server.ConnectionHandler
|
2018-04-05 16:21:13 +00:00
|
|
|
server.ReadWriteHandler
|
2018-04-05 15:15:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type ServerHandlers struct {
|
|
|
|
server.ServerHandlers
|
|
|
|
server.ConnectionHandlers
|
2018-04-05 16:21:13 +00:00
|
|
|
server.ReadWriteHandlers
|
2018-04-05 15:15:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (sh *ServerHandlers) Validate() error {
|
|
|
|
if err := sh.ServerHandlers.Validate(); nil != err {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
if err := sh.ConnectionHandlers.Validate(); nil != err {
|
|
|
|
return err
|
|
|
|
}
|
2018-04-05 16:21:13 +00:00
|
|
|
if err := sh.ReadWriteHandlers.Validate(); nil != err {
|
|
|
|
return err
|
|
|
|
}
|
2018-04-05 15:15:29 +00:00
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|