18 lines
396 B
Go
18 lines
396 B
Go
package bacheca
|
|
|
|
import (
|
|
"context"
|
|
|
|
proto "git.abbiamoundominio.org/hamcha/bacheca/proto"
|
|
"github.com/go-kit/kit/endpoint"
|
|
)
|
|
|
|
func getFeedEndpoint(svc Service) endpoint.Endpoint {
|
|
return func(ctx context.Context, request interface{}) (interface{}, error) {
|
|
req := request.(proto.GetFeedRequest)
|
|
rsp := proto.GetFeedResponse{}
|
|
err := svc.GetFeed(ctx, &req, &rsp)
|
|
return rsp, err
|
|
}
|
|
}
|