initial commit
This commit is contained in:
32
internal/routes/routes.go
Normal file
32
internal/routes/routes.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// Package routes provides the routes for the application.
|
||||
package routes
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"go.equinixmetal.net/infra9-metal-bridge/internal/service"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// Router is the router for the application.
|
||||
type Router struct {
|
||||
logger *zap.Logger
|
||||
svc service.Service
|
||||
}
|
||||
|
||||
// Routes registers the routes for the application.
|
||||
func (r *Router) Routes(g *echo.Group) {}
|
||||
|
||||
// NewRouter creates a new router
|
||||
func NewRouter(opts ...Option) (*Router, error) {
|
||||
router := Router{
|
||||
logger: zap.NewNop(),
|
||||
}
|
||||
|
||||
for _, opt := range opts {
|
||||
if err := opt(&router); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return &router, nil
|
||||
}
|
||||
Reference in New Issue
Block a user