tasks

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MicrosoftTaskProvider

type MicrosoftTaskProvider struct{}

type Task

type Task struct {
	ID           uuid.UUID
	ExternalID   string
	Title        string
	Description  string
	ExternalLink string
	CreatedAt    time.Time
	UpdatedAt    time.Time
	DueAt        time.Time
}

func CreateTask

func CreateTask(
	externalID, title, description, externalLink string,
	createdAt, modifiedAt time.Time,
) (*Task, error)

type TaskProvider

type TaskProvider interface {
	// Initialise the task provider with its specific configuration
	Init(options ...func(*TaskProvider)) *TaskProvider

	GetTasks(status string) ([]*Task, error)
}

Task providers can be Microsoft, Google, etc. Microsoft provides tasks through the Microsoft Graph API and Google through the Google Tasks API Each of these providers will have their own implementation of the TaskProvider interface

type TaskServices

type TaskServices interface {
	// Retrieve all the uncompleted tasks
	GetAllUncompleted(taskGateway TaskProvider) ([]*Task, error)
	MarkAsCompleted([]*Task) error
}

Jump to

Keyboard shortcuts

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