MCPcopy Index your code
hub / github.com/cortexproject/cortex / parseGroupName

Function parseGroupName

pkg/ruler/api.go:458–470  ·  view source on GitHub ↗

parseGroupName parses the group name from the provided set of params, in this api these params are derived from the url path

(params map[string]string)

Source from the content-addressed store, hash-verified

456// parseGroupName parses the group name from the provided set of params, in this
457// api these params are derived from the url path
458func parseGroupName(params map[string]string) (string, error) {
459 groupName, exists := params["groupName"]
460 if !exists {
461 return "", ErrNoGroupName
462 }
463
464 groupName, err := url.PathUnescape(groupName)
465 if err != nil {
466 return "", err
467 }
468
469 return groupName, nil
470}
471
472// parseRequest parses the incoming request to parse out the userID, rules namespace, and rule group name
473// and returns them in that order. It also allows users to require a namespace or group name and return

Callers 1

parseRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected