ops

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: BSD-2-Clause Imports: 16 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompleteOperation

type CompleteOperation interface {
	Execute(
		ctx context.Context,
		vaultPath string,
		taskName string,
		vaultName string,
		outputFormat string,
	) error
}

func NewCompleteOperation

func NewCompleteOperation(
	storage storage.Storage,
	currentDateTime libtime.CurrentDateTime,
) CompleteOperation

NewCompleteOperation creates a new complete operation.

type DeferOperation

type DeferOperation interface {
	Execute(
		ctx context.Context,
		vaultPath string,
		taskName string,
		dateStr string,
		vaultName string,
		outputFormat string,
	) error
}

func NewDeferOperation

func NewDeferOperation(
	storage storage.Storage,
	currentDateTime libtime.CurrentDateTime,
) DeferOperation

NewDeferOperation creates a new defer operation.

type FrontmatterClearOperation added in v0.9.0

type FrontmatterClearOperation interface {
	Execute(ctx context.Context, vaultPath, taskName, key string) error
}

func NewFrontmatterClearOperation added in v0.9.0

func NewFrontmatterClearOperation(storage storage.Storage) FrontmatterClearOperation

NewFrontmatterClearOperation creates a new frontmatter clear operation.

type FrontmatterGetOperation added in v0.9.0

type FrontmatterGetOperation interface {
	Execute(ctx context.Context, vaultPath, taskName, key string) (string, error)
}

func NewFrontmatterGetOperation added in v0.9.0

func NewFrontmatterGetOperation(storage storage.Storage) FrontmatterGetOperation

NewFrontmatterGetOperation creates a new frontmatter get operation.

type FrontmatterSetOperation added in v0.9.0

type FrontmatterSetOperation interface {
	Execute(ctx context.Context, vaultPath, taskName, key, value string) error
}

func NewFrontmatterSetOperation added in v0.9.0

func NewFrontmatterSetOperation(storage storage.Storage) FrontmatterSetOperation

NewFrontmatterSetOperation creates a new frontmatter set operation.

type IncompleteResult added in v0.10.8

type IncompleteResult struct {
	Success    bool   `json:"success"`
	Reason     string `json:"reason"`
	Pending    int    `json:"pending"`
	InProgress int    `json:"inprogress"`
	Completed  int    `json:"completed"`
	Total      int    `json:"total"`
}

IncompleteResult represents the result when a task has incomplete subtasks.

type IssueType

type IssueType string

IssueType represents the type of lint issue found.

const (
	IssueTypeMissingFrontmatter     IssueType = "MISSING_FRONTMATTER"
	IssueTypeInvalidPriority        IssueType = "INVALID_PRIORITY"
	IssueTypeDuplicateKey           IssueType = "DUPLICATE_KEY"
	IssueTypeInvalidStatus          IssueType = "INVALID_STATUS"
	IssueTypeOrphanGoal             IssueType = "ORPHAN_GOAL"
	IssueTypeStatusCheckboxMismatch IssueType = "STATUS_CHECKBOX_MISMATCH"
)

type LintIssue

type LintIssue struct {
	FilePath    string
	IssueType   IssueType
	Description string
	Fixable     bool
	Fixed       bool
}

LintIssue represents a single lint issue found in a file.

type LintIssueJSON added in v0.8.0

type LintIssueJSON struct {
	File        string `json:"file"`
	Type        string `json:"type"`
	Description string `json:"description"`
	Fixed       bool   `json:"fixed,omitempty"`
}

LintIssueJSON represents a lint issue in JSON format.

type LintOperation

type LintOperation interface {
	Execute(
		ctx context.Context,
		vaultPath string,
		tasksDir string,
		fix bool,
		outputFormat string,
	) error
	ExecuteFile(
		ctx context.Context,
		filePath string,
		taskName string,
		vaultName string,
		outputFormat string,
	) error
}

func NewLintOperation

func NewLintOperation() LintOperation

NewLintOperation creates a new lint operation.

type ListOperation

type ListOperation interface {
	Execute(
		ctx context.Context,
		vaultPath string,
		vaultName string,
		pagesDir string,
		statusFilter string,
		showAll bool,
		assigneeFilter string,
		outputFormat string,
	) error
}

func NewListOperation

func NewListOperation(
	storage storage.Storage,
) ListOperation

NewListOperation creates a new list operation.

type MutationResult added in v0.8.0

type MutationResult struct {
	Success  bool     `json:"success"`
	Name     string   `json:"name,omitempty"`
	Vault    string   `json:"vault,omitempty"`
	Error    string   `json:"error,omitempty"`
	Warnings []string `json:"warnings,omitempty"`
}

MutationResult represents the result of a mutation operation.

type RecurringMutationResult added in v0.10.7

type RecurringMutationResult struct {
	Success   bool     `json:"success"`
	Name      string   `json:"name,omitempty"`
	Vault     string   `json:"vault,omitempty"`
	Recurring bool     `json:"recurring"`
	NextDate  string   `json:"next_date,omitempty"`
	Error     string   `json:"error,omitempty"`
	Warnings  []string `json:"warnings,omitempty"`
}

RecurringMutationResult represents the result of a recurring task mutation.

type SearchOperation

type SearchOperation interface {
	Execute(
		ctx context.Context,
		vaultPath string,
		scopeDir string,
		query string,
		topK int,
		outputFormat string,
	) error
}

func NewSearchOperation

func NewSearchOperation() SearchOperation

NewSearchOperation creates a new search operation.

type TaskListItem added in v0.8.0

type TaskListItem struct {
	Name     string `json:"name"`
	Status   string `json:"status"`
	Assignee string `json:"assignee,omitempty"`
	Priority int    `json:"priority,omitempty"`
	Vault    string `json:"vault"`
}

TaskListItem represents a task in list output.

type UpdateOperation

type UpdateOperation interface {
	Execute(
		ctx context.Context,
		vaultPath string,
		taskName string,
		vaultName string,
		outputFormat string,
	) error
}

func NewUpdateOperation

func NewUpdateOperation(
	storage storage.Storage,
) UpdateOperation

NewUpdateOperation creates a new update operation.

type WorkOnOperation added in v0.6.0

type WorkOnOperation interface {
	Execute(
		ctx context.Context,
		vaultPath string,
		taskName string,
		assignee string,
		vaultName string,
		outputFormat string,
	) error
}

func NewWorkOnOperation added in v0.6.0

func NewWorkOnOperation(
	storage storage.Storage,
	currentDateTime libtime.CurrentDateTime,
) WorkOnOperation

NewWorkOnOperation creates a new work-on operation.

Jump to

Keyboard shortcuts

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