Versions in this module Expand all Collapse all v1 v1.4.0 Feb 5, 2023 v1.3.9 Feb 5, 2023 Changes in this version + func IsPrivateIP(address string) (bool, error) + func RealIP(r *http.Request) string + type Option func(s *Server) + func WithAccessLog(enabled bool) Option + func WithAddr(addr string) Option + func WithAddress(address string) Option + func WithCORS(enabled bool) Option + func WithDebug(debug bool) Option + func WithLogger(logger *zap.Logger) Option + func WithMiddleware(middleware func(http.Handler) http.Handler) Option + func WithPathPrefix(prefix string) Option + func WithPort(port int) Option + func WithShutdownTimeout(timeout time.Duration) Option + func WithStartupTimeout(timeout time.Duration) Option + func WithStripQueryString(enabled bool) Option + type Server struct + Address string + App Service + CertFile string + Debug bool + KeyFile string + Logger *zap.Logger + PathPrefix string + Port int + ShutdownTimeout time.Duration + StartupTimeout time.Duration + func New(app Service, options ...Option) *Server + func (s *Server) Run() + func (s *Server) RunContext(ctx context.Context) + type Service interface + Shutdown func(ctx context.Context) error + Startup func(ctx context.Context) error