solidarity transport updates

This commit is contained in:
Arnaud Delcasse
2025-09-09 05:47:56 +02:00
parent 95b60ea737
commit 9ab7b66b68
40 changed files with 3240 additions and 601 deletions

View File

@@ -91,6 +91,37 @@ func (s *ServicesHandler) GetAccountsInNamespace(namespace string) (accounts []s
return
}
func (s *ServicesHandler) GetAccountsInNamespaceMap(namespace string) (accounts map[string]storage.Account, err error) {
accounts = map[string]storage.Account{}
request := &mobilityaccounts.GetAccountsRequest{
Namespaces: []string{namespace},
}
resp, err := s.GRPC.MobilityAccounts.GetAccounts(context.TODO(), request)
if err == nil {
for _, v := range resp.Accounts {
accounts[v.Id] = v.ToStorageType()
}
}
return
}
func (s *ServicesHandler) GetAccountsInNamespacesMap(namespaces []string) (accounts map[string]storage.Account, err error) {
accounts = map[string]storage.Account{}
request := &mobilityaccounts.GetAccountsRequest{
Namespaces: namespaces,
}
resp, err := s.GRPC.MobilityAccounts.GetAccounts(context.TODO(), request)
if err == nil {
for _, v := range resp.Accounts {
accounts[v.Id] = v.ToStorageType()
}
}
return
}
func (s *ServicesHandler) GetAccount(id string) (account storage.Account, err error) {
request := &mobilityaccounts.GetAccountRequest{