mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 03:11:01 -06:00
017da781cf
* refactor dimension values backend * fix test file name
23 lines
341 B
Go
23 lines
341 B
Go
package request
|
|
|
|
import (
|
|
"fmt"
|
|
"net/url"
|
|
)
|
|
|
|
type ResourceRequest struct {
|
|
Region string
|
|
}
|
|
|
|
func getResourceRequest(parameters url.Values) (*ResourceRequest, error) {
|
|
request := &ResourceRequest{
|
|
Region: parameters.Get("region"),
|
|
}
|
|
|
|
if request.Region == "" {
|
|
return nil, fmt.Errorf("region is required")
|
|
}
|
|
|
|
return request, nil
|
|
}
|