Api is a module that provides an HTTP server. Other modules may add routes, middlewares or health checks.
| 28 | // Api is a module that provides an HTTP server. Other modules may add routes, |
| 29 | // middlewares or health checks. |
| 30 | type Api struct { |
| 31 | port int |
| 32 | bindIp string |
| 33 | tlsCertFile string |
| 34 | tlsKeyFile string |
| 35 | startTimeout time.Duration |
| 36 | bodyLimit int64 |
| 37 | timeout time.Duration |
| 38 | rootPath string |
| 39 | correlationIdHeader string |
| 40 | basicAuthUsername string |
| 41 | basicAuthPassword string |
| 42 | downloadFromCfg downloadFromConfig |
| 43 | disableHealthCheckRouteTelemetry bool |
| 44 | disableRootRouteTelemetry bool |
| 45 | disableDebugRouteTelemetry bool |
| 46 | disableVersionRouteTelemetry bool |
| 47 | enableDebugRoute bool |
| 48 | |
| 49 | routes []Route |
| 50 | externalMiddlewares []Middleware |
| 51 | healthChecks []health.CheckerOption |
| 52 | readyFn []func() error |
| 53 | asyncCounters []AsynchronousCounter |
| 54 | fs *gotenberg.FileSystem |
| 55 | logger *slog.Logger |
| 56 | srv *echo.Echo |
| 57 | } |
| 58 | |
| 59 | type downloadFromConfig struct { |
| 60 | allowList []*regexp2.Regexp |
nothing calls this directly
no outgoing calls
no test coverage detected