bacheca/service.go

30 lines
687 B
Go
Raw Permalink Normal View History

2019-07-16 18:03:16 +02:00
package bacheca
import (
"context"
"errors"
proto "git.abbiamoundominio.org/hamcha/bacheca/proto"
2019-07-17 10:26:18 +02:00
"git.abbiamoundominio.org/hamcha/bacheca/storage"
2019-07-16 18:03:16 +02:00
)
// Service is the definition of the Bacheca service
type Service interface {
GetFeed(context.Context, *proto.GetFeedRequest, *proto.GetFeedResponse) error
}
type bachecaService struct {
2019-07-17 10:26:18 +02:00
backend storage.Backend
2019-07-16 18:03:16 +02:00
}
2019-07-17 10:26:18 +02:00
// MakeService returns an instance of the bacheca service
func MakeService(store storage.Backend) Service {
return &bachecaService{
backend: store,
}
2019-07-16 18:03:16 +02:00
}
func (b *bachecaService) GetFeed(ctx context.Context, req *proto.GetFeedRequest, rsp *proto.GetFeedResponse) error {
return errors.New("not implemented")
}