Administration, organizations access rights and véhicles booking
This commit is contained in:
23
services/fleets.go
Normal file
23
services/fleets.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
fleets "git.coopgo.io/coopgo-platform/fleets/grpcapi"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type FleetsService struct {
|
||||
fleets.FleetsClient
|
||||
}
|
||||
|
||||
func NewFleetsService(dial string) (*FleetsService, error) {
|
||||
conn, err := grpc.Dial(dial, grpc.WithInsecure())
|
||||
|
||||
client := fleets.NewFleetsClient(conn)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &FleetsService{
|
||||
FleetsClient: client,
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user