Add dispositifs
This commit is contained in:
23
services/agenda.go
Normal file
23
services/agenda.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
agenda "git.coopgo.io/coopgo-platform/agenda/grpcapi"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type AgendaService struct {
|
||||
agenda.AgendaClient
|
||||
}
|
||||
|
||||
func NewAgendaService(dial string) (*AgendaService, error) {
|
||||
conn, err := grpc.Dial(dial, grpc.WithInsecure())
|
||||
|
||||
client := agenda.NewAgendaClient(conn)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &AgendaService{
|
||||
AgendaClient: client,
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user