You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
396 B
18 lines
396 B
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
|
|
}
|
|
}
|