Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseRouter ¶
func BaseRouter(r *chi.Mux, ns string)
BaseRouter only exists to easily verify a working app and should normally be removed
Types ¶
type ControllerRegistry ¶
type ControllerRegistry struct {
ExampleController example.ExampleController
}
type RouterConfig ¶
type RouterConfig struct {
Namespace string `validate:"required"`
}
type Server ¶
type Server struct { Logger *logger.CustomLogger Port uint Server *http.Server }
Server defines a server for handling HTTP API requests
func NewServer ¶
func NewServer(c *ServerConfig) (*Server, error)
NewServer returns a new Server instance
type ServerConfig ¶
type ServerConfig struct { Controllers *ControllerRegistry `validate:"required"` Host string `validate:"required"` Logger *logger.CustomLogger `validate:"required"` Port uint `validate:"required"` RouterConfig *RouterConfig `validate:"required"` }
ServerConfig defines the input to NewServer
Click to show internal directories.
Click to hide internal directories.