todo

package
v0.0.0-...-367b6cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2020 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

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) Describe

func (s *Service) Describe(ctx context.Context, in *todo.TodoQuery) (out *todo.TodoList, err error)

func (*Service) ExpandTags

func (s *Service) ExpandTags(ctx context.Context, in *todo.TodoList) (out *todo.TodoList, err error)

func (*Service) GetInHook

func (s *Service) GetInHook() *chassis.ContextChain

func (*Service) Index

func (s *Service) Index(ctx context.Context, in *todo.Todo) (out *todo.Todo, err error)

func (*Service) Save

func (s *Service) Save(ctx context.Context, in *todo.Todo) (out *todo.Todo, err error)

func (*Service) SaveTags

func (s *Service) SaveTags(ctx context.Context, in *todo.Todo) (out *todo.Todo, err error)

func (*Service) Search

func (s *Service) Search(ctx context.Context, in *todo.TodoFilter) (out *todo.TodoList, err error)

func (*Service) Serve

func (s *Service) Serve()

func (*Service) WithConsumer

func (s *Service) WithConsumer(consumer *kafkadriver.Consumer) *Service

func (*Service) WithDatabase

func (s *Service) WithDatabase(database *sql.DB) *Service

func (*Service) WithElastic

func (s *Service) WithElastic(elastic *elasticsearch.Client) *Service

func (*Service) WithProducer

func (s *Service) WithProducer(producer *kafkadriver.Producer) *Service

func (*Service) WithServer

func (s *Service) WithServer(server *grpc.Server) *Service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL