kanboard

package
v0.97.8 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package kanboard implements the Kanboard adapter for the kanban capability.

Package kanboard implements the Kanban board capability.

Index

Constants

View Source
const (
	OpListTasks    = "list_tasks"
	OpGetTask      = "get_task"
	OpCreateTask   = "create_task"
	OpUpdateTask   = "update_task"
	OpDeleteTask   = "delete_task"
	OpMoveTask     = "move_task"
	OpCompleteTask = "complete_task"
	OpGetColumns   = "get_columns"
	OpSearchTasks  = "search_tasks"
	OpHealth       = "health"
)

Variables

This section is empty.

Functions

func Register

func Register(app string, svc Service) error

Register registers the kanboard capability with hub and invoker registry. When svc is nil the provider is not configured and registration is skipped.

Types

type Adapter

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

func (*Adapter) CompleteTask

func (a *Adapter) CompleteTask(ctx context.Context, id int) error

func (*Adapter) CreateTask

func (a *Adapter) CreateTask(ctx context.Context, req CreateTaskRequest) (*capability.Task, error)

func (*Adapter) DeleteTask

func (a *Adapter) DeleteTask(ctx context.Context, id int) error

func (*Adapter) GetColumns

func (a *Adapter) GetColumns(ctx context.Context, projectID int) ([]map[string]any, error)

func (*Adapter) GetTask

func (a *Adapter) GetTask(ctx context.Context, id int) (*capability.Task, error)

func (*Adapter) HealthCheck

func (a *Adapter) HealthCheck(ctx context.Context) (bool, error)

HealthCheck reports whether the Kanboard backend is reachable by calling getMe.

func (*Adapter) ListTasks

func (*Adapter) MoveTask

func (a *Adapter) MoveTask(ctx context.Context, id int, req MoveTaskRequest) (*capability.Task, error)

func (*Adapter) SearchTasks

func (*Adapter) UpdateTask

func (a *Adapter) UpdateTask(ctx context.Context, id int, req UpdateTaskRequest) (*capability.Task, error)

type CreateTaskRequest

type CreateTaskRequest = capability.KanbanCreateTaskRequest

CreateTaskRequest holds fields for creating a task.

type KanboardWebhook

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

KanboardWebhook implements capability.WebhookConverter for the Kanboard provider. It validates the webhook token passed as a query parameter and converts Kanboard webhook payloads into DataEvent records.

func NewWebhook

func NewWebhook() *KanboardWebhook

NewWebhook creates a KanboardWebhook that reads the webhook token from the kanboard provider config at verification time.

func (*KanboardWebhook) Convert

func (*KanboardWebhook) Convert(body []byte, _ map[string]string) ([]types.DataEvent, error)

Convert transforms the raw Kanboard webhook body into a DataEvent record. The Kanboard webhook payload follows the format:

{"event_name": "task.create", "event_data": {...}}

Task-related events are mapped to kanban.task.* event types. Comment, subtask, file, and link events are not yet mapped.

func (*KanboardWebhook) VerifySignature

func (w *KanboardWebhook) VerifySignature(headers map[string]string, _ []byte) error

VerifySignature validates the webhook token from the query parameter. Kanboard passes the token as a URL query string parameter ?token=TOKEN. The eventsource webhook handler injects query params as X-Query-* headers.

func (*KanboardWebhook) WebhookPath

func (*KanboardWebhook) WebhookPath() string

WebhookPath returns the URL path that receives webhook events from Kanboard. The full URL is /webhook/provider/kanboard/events?token=TOKEN.

type MoveTaskRequest

type MoveTaskRequest = capability.KanbanMoveTaskRequest

MoveTaskRequest holds fields for moving a task.

type SearchQuery

type SearchQuery = capability.KanbanSearchQuery

SearchQuery wraps pagination for searching tasks.

type Service

type Service interface {
	ListTasks(ctx context.Context, q *TaskQuery) (*capability.ListResult[capability.Task], error)
	GetTask(ctx context.Context, id int) (*capability.Task, error)
	CreateTask(ctx context.Context, req CreateTaskRequest) (*capability.Task, error)
	UpdateTask(ctx context.Context, id int, req UpdateTaskRequest) (*capability.Task, error)
	DeleteTask(ctx context.Context, id int) error
	MoveTask(ctx context.Context, id int, req MoveTaskRequest) (*capability.Task, error)
	CompleteTask(ctx context.Context, id int) error
	GetColumns(ctx context.Context, projectID int) ([]map[string]any, error)
	SearchTasks(ctx context.Context, q *SearchQuery) (*capability.ListResult[capability.Task], error)
	HealthCheck(ctx context.Context) (bool, error)
}

Service defines the kanban capability contract.

func New

func New() Service

func NewWithClient

func NewWithClient(client client) Service

type TaskQuery

type TaskQuery = capability.KanbanTaskQuery

TaskQuery wraps pagination and filters for listing tasks.

type UpdateTaskRequest

type UpdateTaskRequest = capability.KanbanUpdateTaskRequest

UpdateTaskRequest holds fields for updating a task.

Jump to

Keyboard shortcuts

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