Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AppClosingFunc func() error
AppClosingFunc is to customize the application closing logic after server shutdown
var AppErrors func() (map[apperrorEnum.Code]string, map[apperrorEnum.Code]int)
AppErrors is to append customized AppErrors with their string representations and corresponding HTTP status codes; customized enum must be after apperrorEnum.CodeReservedCount
var AppName func() string
AppName is to customize the application name string
var AppPath func() string
AppPath is to customize the application startup system path
var AppPort func() string
AppPort is to customize the application port number
var AppVersion func() string
AppVersion is to customize the application version string
var CaCertContent func() string
CaCertContent is to customize the loading logic for CA certificate content
var ClientCertContent func() string
ClientCertContent is to customize the loading logic for client certificate content
var ClientKeyContent func() string
ClientKeyContent is to customize the loading logic for client key content
var CreateErrorResponseFunc func(err error) (responseMessage string, statusCode int)
CreateErrorResponseFunc is to customize the generation of HTTP error response
var DefaultAllowedLogLevel func() loglevel.LogLevel
DefaultAllowedLogLevel is to customize the default allowed log type loading logic for the whole application
var DefaultAllowedLogType func() logtype.LogType
DefaultAllowedLogType is to customize the default allowed log type loading logic for the whole application
var DefaultHTTPHeaderLogStyle func() headerstyle.HeaderStyle
DefaultHTTPHeaderLogStyle is to customize the log style for HTTP headers for the whole application
var DefaultNetworkRetryDelay func() time.Duration
DefaultNetworkRetryDelay is to customize the default retry delay for any network communications through HTTP/HTTPS by session
var DefaultNetworkTimeout func() time.Duration
DefaultNetworkTimeout is to customize the default timeout for any network communications through HTTP/HTTPS by session
var GraceShutdownWaitTime func() time.Duration
GraceShutdownWaitTime is to customize the graceful shutdown wait time for the application
var HTTPRoundTripper func(originalTransport http.RoundTripper) http.RoundTripper
HTTPRoundTripper is to customize the creation of the HTTP transport for any network communications through HTTP/HTTPS by session
var InstrumentRouter func(router *mux.Router) *mux.Router
InstrumentRouter is to customize the instrumentation on top of a fully configured router; usually useful for 3rd party monitoring tools such as new relic, etc.
var IsLocalhost func() bool
IsLocalhost is to customize the check for localhost
var LoggingFunc func(session sessionModel.Session, logType logtype.LogType, logLevel loglevel.LogLevel, category, subcategory, description string)
LoggingFunc is to customize the logging backend for the whole application
var MethodNotAllowedHandler func() http.Handler
MethodNotAllowedHandler is to customize the handler for routes with methods that are not allowed in router
var Middlewares func() []serverModel.MiddlewareFunc
Middlewares is to customize the middlewares registration
var NotFoundHandler func() http.Handler
NotFoundHandler is to customize the handler for routes that are not found in router
var PostActionFunc func(session sessionModel.Session) error
PostActionFunc is to customize the post-action function used after each route action takes place, e.g. finalization, etc.
var PostBootstrapFunc func() error
PostBootstrapFunc is to customize the post-processing logic after bootstrapping
var PreActionFunc func(session sessionModel.Session) error
PreActionFunc is to customize the pre-action function used before each route action takes place, e.g. authorization, etc.
var PreBootstrapFunc func() error
PreBootstrapFunc is to customize the pre-processing logic before bootstrapping
var Routes func() []serverModel.Route
Routes is to customize the routes registration
var SendClientCert func(url string) bool
SendClientCert is to customize the HTTP request option to the external web services (mTLS v.s. none)
var ServeHTTPS func() bool
ServeHTTPS is to customize the server hosting security option (HTTP v.s. HTTPS)
var ServerCertContent func() string
ServerCertContent is to customize the loading logic for server certificate content
var ServerKeyContent func() string
ServerKeyContent is to customize the loading logic for server key content
var SessionAllowedLogLevel func(session sessionModel.Session) loglevel.LogLevel
SessionAllowedLogLevel is to customize the allowed log level determination logic for every HTTP session
var SessionAllowedLogType func(session sessionModel.Session) logtype.LogType
SessionAllowedLogType is to customize the allowed log type determination logic for every HTTP session
var SessionHTTPHeaderLogStyle func(session sessionModel.Session) headerstyle.HeaderStyle
SessionHTTPHeaderLogStyle is to customize the log style for HTTP headers for every HTTP session
var SkipServerCertVerification func() bool
SkipServerCertVerification is to customize the skip of server certificate verification for any network communications through HTTP/HTTPS by session
var Statics func() []serverModel.Static
Statics is to customize the static contents registration
var ValidateClientCert func() bool
ValidateClientCert is to customize the server hosting security option (mTLS v.s. none)
var WrapHTTPRequest func(session sessionModel.Session, httpRequest *http.Request) *http.Request
WrapHTTPRequest is to customize the creation of the HTTP request for any network communications through HTTP/HTTPS by session; utilize this method if needed for new relic wrapping, etc.
Functions ¶
Types ¶
This section is empty.