2026-03-26 12:28:21 +07:00

29 lines
569 B
Go

package app
import (
"context"
"pinned_message/internal/services"
proto "pinned_message/proto"
)
type Server struct {
proto.UnimplementedPinnedMessageServer
services *services.Services
}
func NewServer(
services *services.Services,
) *Server {
return &Server{
services: services,
}
}
func (s *Server) Ping(_ context.Context, _ *proto.PingReq) (*proto.PingRsp, error) {
return &proto.PingRsp{}, nil
}
func (s *Server) GetSchedule(ctx context.Context, req *proto.GetScheduleReq) (*proto.GetScheduleRsp, error) {
return s.services.GetSchedule(ctx, req)
}