Documentation
¶
Index ¶
- func LogRequest(nextHandler http.Handler) http.Handler
- func MakeURLToEndpoint(apiPrefix, endpoint string, args ...interface{}) string
- func MakeURLToEndpointMap(apiPrefix, endpoint string, args map[string]interface{}) string
- func MakeURLToEndpointMapString(apiPrefix, endpoint string, args map[string]string) string
- func ReadClusterName(writer http.ResponseWriter, request *http.Request) (types.ClusterName, bool)
- func ReadErrorKey(writer http.ResponseWriter, request *http.Request) (types.ErrorKey, bool)
- func ReadRuleID(writer http.ResponseWriter, request *http.Request) (types.RuleID, bool)
- func ReplaceParamsInEndpointAndTrimLeftSlash(endpoint, replacer string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogRequest ¶ added in v1.3.0
LogRequest - middleware for logging requests
func MakeURLToEndpoint ¶
MakeURLToEndpoint creates URL to endpoint, use constants from file endpoints.go
func MakeURLToEndpointMap ¶ added in v1.2.3
MakeURLToEndpointMap creates URL to endpoint using arguments in map, use constants from file endpoints.go
func MakeURLToEndpointMapString ¶ added in v1.2.3
MakeURLToEndpointMapString creates URL to endpoint using arguments in map in string format, use constants from file endpoints.go
func ReadClusterName ¶
func ReadClusterName(writer http.ResponseWriter, request *http.Request) (types.ClusterName, bool)
ReadClusterName retrieves cluster name from request if it's not possible, it writes http error to the writer and returns false
func ReadErrorKey ¶ added in v1.4.1
ReadErrorKey retrieves error key from request's url or writes an error to writer. The function returns an error key and a bool indicating if it was successful.
func ReadRuleID ¶ added in v1.4.1
ReadRuleID retrieves rule id from request's url or writes an error to writer. The function returns a rule id and a bool indicating if it was successful.
func ReplaceParamsInEndpointAndTrimLeftSlash ¶
ReplaceParamsInEndpointAndTrimLeftSlash replaces params in endpoint and trims left slash
Types ¶
This section is empty.