mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
Add GetServices API Method
This commit is contained in:
parent
6736141681
commit
f935fac523
1 changed files with 20 additions and 0 deletions
20
api/firewall/services.go
Normal file
20
api/firewall/services.go
Normal 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
|
||||
}
|
Loading…
Add table
Reference in a new issue