feat:#7 added new folder structure and updated api in ical

This commit is contained in:
Elmar Kresse
2024-05-26 11:59:32 +02:00
parent 2f55076e36
commit cb76b5c188
113 changed files with 250 additions and 266 deletions

View File

@@ -0,0 +1,38 @@
package connector
import (
"github.com/gofiber/fiber/v3/client"
"time"
)
func RequestApi(path string) (*client.Response, error) {
var host = "http://htwkalender-backend:8090"
cc := client.New()
cc.SetTimeout(5 * time.Second)
// set retry to 0
response, err := cc.Get(host + path)
if err != nil {
return nil, err
}
return response, nil
}
func DeleteRequestApi(path string) error {
var host = "http://htwkalender-backend:8090"
cc := client.New()
cc.SetTimeout(5 * time.Second)
// set retry to 0
_, err := cc.Delete(host + path)
if err != nil {
return err
}
return nil
}