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
}
