customization

package
v1.5.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppClosingFunc func() error

AppClosingFunc is to customize the application closing logic after server shutdown

View Source
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

View Source
var AppName func() string

AppName is to customize the application name string

View Source
var AppPath func() string

AppPath is to customize the application startup system path

View Source
var AppPort func() string

AppPort is to customize the application port number

View Source
var AppVersion func() string

AppVersion is to customize the application version string

View Source
var CaCertContent func() string

CaCertContent is to customize the loading logic for CA certificate content

View Source
var ClientCertContent func() string

ClientCertContent is to customize the loading logic for client certificate content

View Source
var ClientKeyContent func() string

ClientKeyContent is to customize the loading logic for client key content

View Source
var CreateErrorResponseFunc func(err error) (responseMessage string, statusCode int)

CreateErrorResponseFunc is to customize the generation of HTTP error response

View Source
var DefaultAllowedLogLevel func() loglevel.LogLevel

DefaultAllowedLogLevel is to customize the default allowed log type loading logic for the whole application

View Source
var DefaultAllowedLogType func() logtype.LogType

DefaultAllowedLogType is to customize the default allowed log type loading logic for the whole application

View Source
var DefaultHTTPHeaderLogStyle func() headerstyle.HeaderStyle

DefaultHTTPHeaderLogStyle is to customize the log style for HTTP headers for the whole application

View Source
var DefaultNetworkRetryDelay func() time.Duration

DefaultNetworkRetryDelay is to customize the default retry delay for any network communications through HTTP/HTTPS by session

View Source
var DefaultNetworkTimeout func() time.Duration

DefaultNetworkTimeout is to customize the default timeout for any network communications through HTTP/HTTPS by session

View Source
var GraceShutdownWaitTime func() time.Duration

GraceShutdownWaitTime is to customize the graceful shutdown wait time for the application

View Source
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

View Source
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.

View Source
var IsLocalhost func() bool

IsLocalhost is to customize the check for localhost

View Source
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

View Source
var MethodNotAllowedHandler func() http.Handler

MethodNotAllowedHandler is to customize the handler for routes with methods that are not allowed in router

View Source
var Middlewares func() []serverModel.MiddlewareFunc

Middlewares is to customize the middlewares registration

View Source
var NotFoundHandler func() http.Handler

NotFoundHandler is to customize the handler for routes that are not found in router

View Source
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.

View Source
var PostBootstrapFunc func() error

PostBootstrapFunc is to customize the post-processing logic after bootstrapping

View Source
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.

View Source
var PreBootstrapFunc func() error

PreBootstrapFunc is to customize the pre-processing logic before bootstrapping

View Source
var Routes func() []serverModel.Route

Routes is to customize the routes registration

View Source
var SendClientCert func(url string) bool

SendClientCert is to customize the HTTP request option to the external web services (mTLS v.s. none)

View Source
var ServeHTTPS func() bool

ServeHTTPS is to customize the server hosting security option (HTTP v.s. HTTPS)

View Source
var ServerCertContent func() string

ServerCertContent is to customize the loading logic for server certificate content

View Source
var ServerKeyContent func() string

ServerKeyContent is to customize the loading logic for server key content

View Source
var SessionAllowedLogLevel func(session sessionModel.Session) loglevel.LogLevel

SessionAllowedLogLevel is to customize the allowed log level determination logic for every HTTP session

View Source
var SessionAllowedLogType func(session sessionModel.Session) logtype.LogType

SessionAllowedLogType is to customize the allowed log type determination logic for every HTTP session

View Source
var SessionHTTPHeaderLogStyle func(session sessionModel.Session) headerstyle.HeaderStyle

SessionHTTPHeaderLogStyle is to customize the log style for HTTP headers for every HTTP session

View Source
var SkipServerCertVerification func() bool

SkipServerCertVerification is to customize the skip of server certificate verification for any network communications through HTTP/HTTPS by session

View Source
var Statics func() []serverModel.Static

Statics is to customize the static contents registration

View Source
var ValidateClientCert func() bool

ValidateClientCert is to customize the server hosting security option (mTLS v.s. none)

View Source
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

func Reset

func Reset()

Reset clears all customization of functions for the whole application

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL