Documentation ¶
Index ¶
- Variables
- type ContextKeys
- type Service
- func (s *Service) Describe(ctx context.Context, in *todo.TodoQuery) (out *todo.TodoList, err error)
- func (s *Service) ExpandTags(ctx context.Context, in *todo.TodoList) (out *todo.TodoList, err error)
- func (s *Service) GetInHook() *chassis.ContextChain
- func (s *Service) Index(ctx context.Context, in *todo.Todo) (out *todo.Todo, err error)
- func (s *Service) Save(ctx context.Context, in *todo.Todo) (out *todo.Todo, err error)
- func (s *Service) SaveTags(ctx context.Context, in *todo.Todo) (out *todo.Todo, err error)
- func (s *Service) Search(ctx context.Context, in *todo.TodoFilter) (out *todo.TodoList, err error)
- func (s *Service) Serve()
- func (s *Service) WithConsumer(consumer *kafkadriver.Consumer) *Service
- func (s *Service) WithDatabase(database *sql.DB) *Service
- func (s *Service) WithElastic(elastic *elasticsearch.Client) *Service
- func (s *Service) WithProducer(producer *kafkadriver.Producer) *Service
- func (s *Service) WithServer(server *grpc.Server) *Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TodoSQLLimit = sqlutils.NewLimit().SetMaximum(15) TodoSQLSorting = sqlutils.NewSorting(). SetAscDesc( todo.Todo_UPDATED_AT.String(), "updated_at", ) TodoTagsSQLSorting = sqlutils.NewSorting(). SetAscDesc( todo.Todo_TAG.String(), "tag", ) TodoElasticSearchOptions = elasticutils.NewSearchOptions(). SetMaximum(30). SetAscDesc( todo.Todo_UPDATED_AT.String(), elasticutils.NewAscDescSorting("updated_at"), todo.Todo_TAG.String(), elasticutils.NewAscDescSorting("tags"), todo.Todo_SEARCH_SCORE.String(), elasticutils.NewAscDescSorting("_score"), ) )
View Source
var (
ErrNotFoundById = errors.New("the entity was not found by this id")
)
Functions ¶
This section is empty.
Types ¶
type ContextKeys ¶
type ContextKeys int
const ( SourceEventKey ContextKeys = iota ElasticTodosIndex = "todo" )
type Service ¶
type Service struct { todo.UnimplementedTodoServiceServer todo.UnimplementedTodoFinderServiceServer // contains filtered or unexported fields }
func NewService ¶
func NewService() *Service
func (*Service) ExpandTags ¶
func (*Service) GetInHook ¶
func (s *Service) GetInHook() *chassis.ContextChain
func (*Service) WithConsumer ¶
func (s *Service) WithConsumer(consumer *kafkadriver.Consumer) *Service
func (*Service) WithElastic ¶
func (*Service) WithProducer ¶
func (s *Service) WithProducer(producer *kafkadriver.Producer) *Service
Click to show internal directories.
Click to hide internal directories.