Documentation ¶
Overview ¶
Package serveropts contains an echo server options wrapper
Index ¶
- type ServerOption
- func WithAuth() ServerOption
- func WithConfigProvider(cfgProvider config.ConfigProvider) ServerOption
- func WithEmailManager() ServerOption
- func WithFGAAuthz() ServerOption
- func WithGeneratedKeys() ServerOption
- func WithGraphRoute(srv *server.Server, c *generated.Client, mw []echo.MiddlewareFunc) ServerOption
- func WithHTTPS() ServerOption
- func WithLogger(l *zap.SugaredLogger) ServerOption
- func WithMiddleware(mw []echo.MiddlewareFunc) ServerOption
- func WithReadyChecks(c *entdb.EntClientConfig, f *fga.Client) ServerOption
- func WithSQLiteDB() ServerOption
- func WithServer() ServerOption
- func WithSessionManager() ServerOption
- func WithTaskManager() ServerOption
- type ServerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
func WithAuth ¶
func WithAuth() ServerOption
WithAuth supplies the authn and jwt config for the server
func WithConfigProvider ¶
func WithConfigProvider(cfgProvider config.ConfigProvider) ServerOption
WithConfigProvider supplies the config for the server
func WithEmailManager ¶ added in v0.2.2
func WithEmailManager() ServerOption
WithEmailManager sets up the default SendGrid email manager to be used to send emails to users on registration, password reset, etc
func WithFGAAuthz ¶
func WithFGAAuthz() ServerOption
WithFGAAuthz supplies the FGA authz config for the server
func WithGeneratedKeys ¶
func WithGeneratedKeys() ServerOption
WithGeneratedKeys will generate a public/private key pair that can be used for jwt signing. This should only be used in a development environment
func WithGraphRoute ¶
func WithGraphRoute(srv *server.Server, c *generated.Client, mw []echo.MiddlewareFunc) ServerOption
WithGraphRoute adds the graph handler to the server
func WithLogger ¶
func WithLogger(l *zap.SugaredLogger) ServerOption
WithLogger supplies the logger for the server
func WithMiddleware ¶
func WithMiddleware(mw []echo.MiddlewareFunc) ServerOption
WithMiddleware adds the middleware to the server
func WithReadyChecks ¶
func WithReadyChecks(c *entdb.EntClientConfig, f *fga.Client) ServerOption
WithReadyChecks adds readiness checks to the server
func WithSQLiteDB ¶
func WithSQLiteDB() ServerOption
WithSQLiteDB supplies the sqlite db config for the server
func WithServer ¶
func WithServer() ServerOption
WithServer supplies the echo server config for the server
func WithSessionManager ¶ added in v0.2.3
func WithSessionManager() ServerOption
WithSessionManager sets up the default session manager with a 15 minute timeout and stale sessions are cleaned every 5 minutes
func WithTaskManager ¶ added in v0.2.3
func WithTaskManager() ServerOption
WithTaskManager sets up the default Marionette task manager to be used for delegating background tasks
type ServerOptions ¶
type ServerOptions struct { ConfigProvider config.ConfigProvider Config config.Config }
func NewServerOptions ¶
func NewServerOptions(opts []ServerOption) *ServerOptions
func (*ServerOptions) AddServerOptions ¶
func (so *ServerOptions) AddServerOptions(opt ServerOption)
AddServerOptions applies a server option after the initial setup this should be used when information is not available on NewServerOptions