Make Interface Config map

This commit is contained in:
Samuel Lorch 2023-03-31 18:36:07 +02:00
parent a90e7648db
commit 914f1c1ae3
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ type GetInterfacesParameters struct {
}
type GetInterfacesResult struct {
Interfaces []definitions.Interface
Interfaces map[string]definitions.Interface
}
func (f *Network) GetInterfaces(ctx context.Context, params GetInterfacesParameters) (GetInterfacesResult, error) {

View file

@ -1,5 +1,5 @@
package definitions
type Network struct {
Interfaces []Interface `json:"interfaces" validate:"required,dive"`
Interfaces map[string]Interface `json:"interfaces" validate:"required,dive"`
}