Documentation ¶
Overview ¶
Package mux provides support to bind domain level routes to the application mux.
Index ¶
- func WebAPI(cfg Config, routeAdder RouteAdder, options ...func(opts *Options)) http.Handler
- func WithCORS(origins []string) func(opts *Options)
- func WithFileServer(react bool, static embed.FS, dir string, path string) func(opts *Options)
- type AuthConfig
- type Config
- type Options
- type RouteAdder
- type SalesConfig
- type StaticSite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WebAPI ¶
func WebAPI(cfg Config, routeAdder RouteAdder, options ...func(opts *Options)) http.Handler
WebAPI constructs a http.Handler with all application routes bound.
Types ¶
type AuthConfig ¶
AuthConfig contains auth service specific config.
type Config ¶
type Config struct { Build string Log *logger.Logger DB *sqlx.DB Tracer trace.Tracer SalesConfig AuthConfig }
Config contains all the mandatory systems required by handlers.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options represent optional parameters.
type RouteAdder ¶
RouteAdder defines behavior that sets the routes to bind for an instance of the service.
type SalesConfig ¶
type SalesConfig struct {
AuthClient *authclient.Client
}
SalesConfig contains sales service specific config.
type StaticSite ¶
type StaticSite struct {
// contains filtered or unexported fields
}
StaticSite represents a static site to run.
Click to show internal directories.
Click to hide internal directories.