Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inject ¶
type Inject struct { PathMap map[string][]InjectContent `cfg:"path_map"` // ContentMap is the mime type to inject like "text/html" ContentMap map[string][]InjectContent `cfg:"content_map"` }
func (*Inject) Middleware ¶
type InjectContent ¶
type InjectContent struct { // Regex is the regex to match the content. // - If regex is not empty, Old will be ignored. Regex string `cfg:"regex"` // Old is the old content to replace. Old string `cfg:"old"` New string `cfg:"new"` AddPrefix string `cfg:"add_prefix"` AddPostfix string `cfg:"add_postfix"` // Value from load name, key value and type is map[string]interface{} Value string `cfg:"value"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.