craban/server/server.go

30 lines
428 B
Go
Raw Normal View History

2021-09-11 23:06:03 +01:00
package server
import (
"fmt"
"git.ctrlz.es/mgdelacroix/rmsn/model"
)
type Server struct {
Config *model.Config
}
func NewServer(config *model.Config) (*Server, error) {
if err := config.IsValid(); err != nil {
return nil, fmt.Errorf("config is not valid: %w", err)
}
srv := &Server{Config: config}
return srv, nil
}
func (s *Server) Start() error {
return nil
}
func (s *Server) Close() error {
return nil
}