Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Default ¶
func Default() gin.HandlerFunc
Default returns the location middleware with default configuration.
func Get ¶
Get returns the Location information for the incoming http.Request from the context. If the location is not set a nil value is returned.
func New ¶
func New(config Config) gin.HandlerFunc
New returns the location middleware with user-defined custom configuration.
Types ¶
type Config ¶
type Config struct { // Scheme is the default scheme that should be used when it cannot otherwise // be ascertained from the incoming http.Request. Scheme string // Host is the default host that should be used when it cannot otherwise // be ascertained from the incoming http.Request. Host string // Base is the base path that should be used in conjunction with proxy // servers that do path re-writing. Base string // Header used to map schemes and host. // May be overriden to allow reading values from custom header fields. Headers Headers }
Config represents all available options for the middleware.
Click to show internal directories.
Click to hide internal directories.