solidarity transport updates
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user