ops

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: BSD-2-Clause Imports: 14 Imported by: 0

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,
) 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,
) 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 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"
)

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