switch from list (slice) to dict (map)

This commit is contained in:
schulze
2023-04-12 15:31:11 +02:00
parent c6465ec429
commit 03eff229c6
3 changed files with 22 additions and 7 deletions

View File

@ -17,12 +17,12 @@ type Config struct {
}
type mtdconf struct {
Services []Service `yaml:"services"`
Services map[CustomUUID]Service `yaml:"services"`
}
// Service contains all necessary information about a service to identify it in the cloud as well as configuring a proxy for it
type Service struct {
ID CustomUUID `yaml:"id"`
CloudID string `yaml:"cloud_id"`
EntryIP netip.Addr `yaml:"entry_ip"`
EntryPort uint16 `yaml:"entry_port"`