todoitem

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package todoitem contains the core business logic for the todoitem service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ToDoItem        *models.ToDoItem
	Action          string
	TotalUnresolved int32
}

Event is the output of subscribing to ToDoItems.

type GetToDoItemsInput

type GetToDoItemsInput struct {
	Sort              *db.ToDoItemSortableField
	PaginationOptions *pagination.Options
	OrganizationID    *string
	ProjectID         *string
	Resolved          *bool
	TargetTypes       []models.ToDoItemTargetType
}

GetToDoItemsInput represents the input for getting todo items.

type Service

type Service interface {
	GetToDoItemByPRN(ctx context.Context, prn string) (*models.ToDoItem, error)
	CreateToDoItemSubscription(ctx context.Context) (<-chan *Event, error)
	GetToDoItems(ctx context.Context, input *GetToDoItemsInput) (*db.ToDoItemsResult, error)
	UpdateToDoItem(ctx context.Context, input *UpdateToDoItemInput) (*models.ToDoItem, error)
}

Service encapsulates the core business logic for the todo item service.

func NewService

func NewService(
	logger logger.Logger,
	dbClient *db.Client,
	eventManager *events.EventManager,
) Service

NewService creates a new todo item service.

type UpdateToDoItemInput

type UpdateToDoItemInput struct {
	Resolved *bool
	Version  *int
	ID       string
}

UpdateToDoItemInput represents the input for updating a todo item.

Jump to

Keyboard shortcuts

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