Versions in this module Expand all Collapse all v0 v0.1.1 Nov 17, 2023 Changes in this version + var DefaultCertFile = "server.crt" + var DefaultIdleTimeout = 30 * time.Second + var DefaultKeyFile = "server.key" + var DefaultReadHeaderTimeout = 2 * time.Second + var DefaultReadTimeout = 15 * time.Second + var DefaultShutdownGracePeriod = 5 * time.Second + var DefaultTLSConfig = &tls.Config + var DefaultWriteTimeout = 15 * time.Second + var EchoContextKey = &ContextKey + var ErrJWTClaimsInvalid = errors.New("JWT claims missing or invalid") + var ErrJWTMissingInvalid = errors.New("JWT token missing or invalid") + var ErrSubjectNotFound = errors.New("JWT claims missing subject") + var ErrUnableToRetrieveEchoContext = errors.New("unable to retrieve echo context") + func EchoContextFromContext(ctx context.Context) (*echo.Context, error) + func EchoContextToContextMiddleware() echo.MiddlewareFunc + func GetActorSubject(c echo.Context) (string, error) + func NewTestContextWithValidUser(subject string) (*echo.Context, error) + type Config struct + Debug bool + Dev bool + HTTPS bool + IdleTimeout time.Duration + Listen string + Middleware []echo.MiddlewareFunc + ReadHeaderTimeout time.Duration + ReadTimeout time.Duration + ShutdownGracePeriod time.Duration + TLSConfig TLSConfig + TrustedProxies []string + WriteTimeout time.Duration + func (c Config) WithAutoCert(host string) Config + func (c Config) WithDebug(debug bool) Config + func (c Config) WithDefaultReadTimeout(period time.Duration) Config + func (c Config) WithDefaultTLSConfig() Config + func (c Config) WithDefaults() Config + func (c Config) WithDev(dev bool) Config + func (c Config) WithHTTPS(https bool) Config + func (c Config) WithIdleTimeout(period time.Duration) Config + func (c Config) WithListen(listen string) Config + func (c Config) WithMiddleware(mdw ...echo.MiddlewareFunc) Config + func (c Config) WithReadHeaderTimeout(period time.Duration) Config + func (c Config) WithShutdownGracePeriod(period time.Duration) Config + func (c Config) WithTLSCerts(certFile, certKey string) Config + func (c Config) WithTLSDefaults() Config + func (c Config) WithWriteTimeout(period time.Duration) Config + type ContextKey struct + type CustomContext struct + type HTTPSConfig struct + type Server struct + func NewServer(logger *zap.Logger, cfg Config) (*Server, error) + func (s *Server) AddHandler(h handler) *Server + func (s *Server) Handler() http.Handler + func (s *Server) RunWithContext(ctx context.Context) error + func (s *Server) ServeHTTPSWithContext(ctx context.Context, listener net.Listener) error + func (s *Server) ServeHTTPWithContext(ctx context.Context, listener net.Listener) error + type TLSConfig struct + AutoCert bool + CertFile string + CertKey string + TLSConfig *tls.Config