simplify path reservation

This commit is contained in:
mr
2024-10-02 10:45:52 +02:00
parent f9bfafa004
commit 3c1a84011e
9 changed files with 31 additions and 32 deletions

View File

@@ -40,11 +40,11 @@ func ToMethod(str string) METHOD {
var HTTPCallerInstance = &HTTPCaller{} // Singleton instance of the HTTPCaller
type HTTPCaller struct {
URLS map[string]map[METHOD]string // Map of the different methods and their urls
URLS map[DataType]map[METHOD]string // Map of the different methods and their urls
}
// NewHTTPCaller creates a new instance of the HTTP Caller
func NewHTTPCaller(urls map[string]map[METHOD]string) *HTTPCaller {
func NewHTTPCaller(urls map[DataType]map[METHOD]string) *HTTPCaller {
return &HTTPCaller{
URLS: urls, // Set the urls defined in the config & based on the data name type & method
}