daemon

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Sync string = "sync"

	// Task services
	TaskList     string = "Task.List"
	TaskAdd      string = "Task.Add"
	TaskQuickAdd string = "Task.QuickAdd"
	TaskModify   string = "Task.Modify"
	TaskMove     string = "Task.Move"
	TaskReorder  string = "Task.Reorder"
	TaskClose    string = "Task.Close"
	TaskReopen   string = "Task.Reopen"
	TaskRemove   string = "Task.Remove"

	// Project services
	ProjectList      string = "Project.List"
	ProjectAdd       string = "Project.Add"
	ProjectModify    string = "Project.Modify"
	ProjectReorder   string = "Project.Reorder"
	ProjectArchive   string = "Project.Archive"
	ProjectUnarchive string = "Project.Unarchive"
	ProjectRemove    string = "Project.Remove"

	// Section services
	SectionList      string = "Section.List"
	SectionAdd       string = "Section.Add"
	SectionModify    string = "Section.Modify"
	SectionMove      string = "Section.Move"
	SectionReorder   string = "Section.Reorder"
	SectionArchive   string = "Section.Archive"
	SectionUnarchive string = "Section.Unarchive"
	SectionRemove    string = "Section.Remove"

	// Label services
	LabelList    string = "Label.List"
	LabelAdd     string = "Label.Add"
	LabelModify  string = "Label.Modify"
	LabelReorder string = "Label.Reorder"
	LabelRemove  string = "Label.Remove"

	// Filter services
	FilterList    string = "Filter.List"
	FilterAdd     string = "Filter.Add"
	FilterModify  string = "Filter.Modify"
	FilterReorder string = "Filter.Reorder"
	FilterRemove  string = "Filter.Remove"
)

Variables

View Source
var DefaultConfig = &Config{
	Address: "@todo.sock",
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Address      string `toml:"address"`
	ApiToken     string `toml:"api_token"`
	ApiTokenFile string `toml:"api_token_file"`
}

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

func NewDaemon

func NewDaemon(db *db.DB, config *Config) *Daemon

func (*Daemon) HandleMessage

func (d *Daemon) HandleMessage(ctx context.Context, msg ws.Message) error

func (*Daemon) Serve

func (d *Daemon) Serve(ctx context.Context) error

Jump to

Keyboard shortcuts

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