24 lines
588 B
Go
24 lines
588 B
Go
package services
|
|
|
|
import (
|
|
groupsmanagement "git.coopgo.io/coopgo-platform/groups-management/grpcapi"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type GroupsManagementService struct {
|
|
groupsmanagement.GroupsManagementClient
|
|
}
|
|
|
|
func NewGroupsManagementService(groupsManagementDial string) (*GroupsManagementService, error) {
|
|
groupsManagementConn, err := grpc.Dial(groupsManagementDial, grpc.WithInsecure())
|
|
|
|
client := groupsmanagement.NewGroupsManagementClient(groupsManagementConn)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return &GroupsManagementService{
|
|
GroupsManagementClient: client,
|
|
}, nil
|
|
}
|