Add GetServices API Method

This commit is contained in:
Samuel Lorch 2023-03-06 00:02:38 +01:00
parent 6736141681
commit f935fac523

20
api/firewall/services.go Normal file
View file

@ -0,0 +1,20 @@
package firewall
import (
"context"
"nfsense.net/nfsense/pkg/definitions"
)
type GetServicesParameters struct {
}
type GetServicesResult struct {
Services map[string]definitions.Service
}
func (f *Firewall) GetServices(ctx context.Context, params GetForwardRulesParameters) (GetServicesResult, error) {
return GetServicesResult{
Services: f.Conf.Firewall.Services,
}, nil
}