refactor: more implementation to refactor and deleted files

This commit is contained in:
David Allen 2025-08-04 22:32:41 -06:00
parent ba684bd149
commit 50e6b53091
Signed by: towk
GPG key ID: 0430CDBE22619155
17 changed files with 84 additions and 945 deletions

View file

@ -62,10 +62,9 @@ func (s *Service) Serve() error {
// router.Post("/profiles", s.CreateProfiles())
router.Get("/profile/{id}", s.GetProfile())
router.Post("/profile/{id}", s.CreateProfile())
router.Post("/profile/{id}/data/{varname}", s.CreateProfileVar())
router.Delete("/profile/{id}/data/{varname}", s.DeleteProfileVar())
router.Get("/profile/{id}/data", s.GetProfileData())
router.Get("/profile/{id}/data/{varname}", s.GetProfileVar())
router.Post("/profile/{id}/data", s.SetProfileData())
router.Delete("/profile/{id}/data", s.DeleteProfileData())
router.Post("/profile/{id}/paths/{path}", s.CreateProfilePath())
router.Delete("/profile/{id}/paths/{path}", s.DeleteProfilePath())
router.Get("/profile/{id}/paths/{path}", s.GetProfilePath())
@ -89,11 +88,11 @@ func (s *Service) FetchJwks(uri string) {
}
func LoadProfile(path string) (*Profile, error) {
func LoadProfileFromFile(path string) (*Profile, error) {
return LoadFromJSONFile[Profile](path)
}
func LoadPlugin(path string) (*configurator.Plugin, error) {
func LoadPluginFromFile(path string) (*configurator.Plugin, error) {
return LoadFromJSONFile[configurator.Plugin](path)
}