Documentation ¶
Overview ¶
http.go
Copyright (c) 2019-2020 VMware, Inc.
SPDX-License-Identifier: https://spdx.org/licenses/MIT.html
rewrite.go
Copyright (c) 2020 VMware, Inc.
SPDX-License-Identifier: https://spdx.org/licenses/MIT.html
Index ¶
- func Delete(url, body string, headers ...string) (string, error)
- func Get(url, body string, headers ...string) (string, error)
- func GetRewrite(url, scheme string) (string, error)
- func LoadFuncs() error
- func Patch(url, body string, headers ...string) (string, error)
- func Post(url, body string, headers ...string) (string, error)
- func SetRewrite(replace, with string)
- func WatchRewriteRules(path string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRewrite ¶
Returns a rewritten url, using the urlMap table, to replace the 'hostname' part with the mapped entry withe the scheme changed to the supplied scheme. For example, the example url might have the kwite-name.namespace portion replaced with the urlMap value for that as the map key and the scheme changed form kwite to the value of the scheme parameter: kwite://kwite-name.namespace/kwite-url.
func LoadFuncs ¶
func LoadFuncs() error
Adds all methods from this package to the template functions.
func SetRewrite ¶
func SetRewrite(replace, with string)
Sets a rewrite (i.e., replacement) rule for the given path. If the with value is the empty string, the path replace mapping is deleted.
func WatchRewriteRules ¶
func WatchRewriteRules(path string)
Types ¶
This section is empty.