parcoursmob/services/mobilityaccounts.go

24 lines
584 B
Go
Raw Normal View History

package services
import (
mobilityaccounts "git.coopgo.io/coopgo-platform/mobility-accounts/grpcapi"
"google.golang.org/grpc"
)
type MobilityAccountService struct {
mobilityaccounts.MobilityAccountsClient
}
func NewMobilityAccountService(mobilityAccountsDial string) (*MobilityAccountService, error) {
mobilityAccountsConn, err := grpc.Dial(mobilityAccountsDial, grpc.WithInsecure())
client := mobilityaccounts.NewMobilityAccountsClient(mobilityAccountsConn)
if err != nil {
return nil, err
}
return &MobilityAccountService{
MobilityAccountsClient: client,
}, nil
}