all: refactor router code to use interface

So the code is more modular, easier to read/maintain.
This commit is contained in:
Cuong Manh Le
2023-08-09 23:54:23 +07:00
committed by Cuong Manh Le
parent 78a7c87ecc
commit aec2596262
33 changed files with 1347 additions and 1093 deletions
+37
View File
@@ -0,0 +1,37 @@
package router
import "github.com/kardianos/service"
type dummy struct{}
func NewDummyRouter() Router {
return &dummy{}
}
func (d *dummy) ConfigureService(_ *service.Config) error {
return nil
}
func (d *dummy) Install(_ *service.Config) error {
return nil
}
func (d *dummy) Uninstall(_ *service.Config) error {
return nil
}
func (d *dummy) PreRun() error {
return nil
}
func (d *dummy) Configure() error {
return nil
}
func (d *dummy) Setup() error {
return nil
}
func (d *dummy) Cleanup() error {
return nil
}