initial commit

This commit is contained in:
Mike Mason
2023-07-01 00:04:52 +00:00
commit 80fb879ef6
65 changed files with 3544 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package routes
import (
"go.equinixmetal.net/infra9-metal-bridge/internal/service"
"go.uber.org/zap"
)
// Option is a functional configuration option for the router.
type Option func(r *Router) error
// WithLogger sets the logger for the router.
func WithLogger(logger *zap.Logger) Option {
return func(r *Router) error {
r.logger = logger
return nil
}
}
// WithService sets the service handler.
func WithService(svc service.Service) Option {
return func(r *Router) error {
r.svc = svc
return nil
}
}