Documentation
¶
Overview ¶
Package trello implements the Trello cloud capability.
Index ¶
- Constants
- func CatalogSpec() capability.Spec
- func Register(app string, svc Service) error
- type Adapter
- func (a *Adapter) CreateCard(ctx context.Context, listID, name, desc string) (*capability.TrelloCard, error)
- func (a *Adapter) DeleteCard(ctx context.Context, cardID string) error
- func (a *Adapter) DeleteWebhook(ctx context.Context, webhookID string) error
- func (a *Adapter) GetBoard(ctx context.Context, boardID string) (*capability.TrelloBoard, error)
- func (a *Adapter) GetCard(ctx context.Context, cardID string) (*capability.TrelloCard, error)
- func (a *Adapter) HealthCheck(ctx context.Context) (bool, error)
- func (a *Adapter) ListBoards(ctx context.Context, q *ListQuery) (*capability.ListResult[capability.TrelloBoard], error)
- func (a *Adapter) ListCards(ctx context.Context, boardID string, q *ListQuery) (*capability.ListResult[capability.TrelloCard], error)
- func (a *Adapter) ListLists(ctx context.Context, boardID string) ([]*capability.TrelloList, error)
- func (a *Adapter) MoveCard(ctx context.Context, cardID, listID string) (*capability.TrelloCard, error)
- func (a *Adapter) RegisterWebhook(ctx context.Context, boardID, callbackURL, description string) (*capability.TrelloWebhook, error)
- func (a *Adapter) SearchCards(ctx context.Context, query string, limit int) ([]*capability.TrelloCard, error)
- func (a *Adapter) UpdateCard(ctx context.Context, cardID, name, desc string) (*capability.TrelloCard, error)
- type ListQuery
- type Service
- type Webhook
Constants ¶
const ( OpListBoards = "list_boards" OpGetBoard = "get_board" OpListLists = "list_lists" OpListCards = "list_cards" OpGetCard = "get_card" OpSearchCards = "search_cards" OpCreateCard = "create_card" OpUpdateCard = "update_card" OpMoveCard = "move_card" OpDeleteCard = "delete_card" OpRegisterWebhook = "register_webhook" OpDeleteWebhook = "delete_webhook" OpHealth = "health" )
Variables ¶
This section is empty.
Functions ¶
func CatalogSpec ¶
func CatalogSpec() capability.Spec
CatalogSpec returns capability metadata for documentation.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements Service using the Trello provider client.
func (*Adapter) CreateCard ¶
func (a *Adapter) CreateCard(ctx context.Context, listID, name, desc string) (*capability.TrelloCard, error)
func (*Adapter) DeleteWebhook ¶
func (*Adapter) GetBoard ¶
func (a *Adapter) GetBoard(ctx context.Context, boardID string) (*capability.TrelloBoard, error)
func (*Adapter) GetCard ¶
func (a *Adapter) GetCard(ctx context.Context, cardID string) (*capability.TrelloCard, error)
func (*Adapter) ListBoards ¶
func (a *Adapter) ListBoards(ctx context.Context, q *ListQuery) (*capability.ListResult[capability.TrelloBoard], error)
func (*Adapter) ListCards ¶
func (a *Adapter) ListCards(ctx context.Context, boardID string, q *ListQuery) (*capability.ListResult[capability.TrelloCard], error)
func (*Adapter) ListLists ¶
func (a *Adapter) ListLists(ctx context.Context, boardID string) ([]*capability.TrelloList, error)
func (*Adapter) MoveCard ¶
func (a *Adapter) MoveCard(ctx context.Context, cardID, listID string) (*capability.TrelloCard, error)
func (*Adapter) RegisterWebhook ¶
func (a *Adapter) RegisterWebhook(ctx context.Context, boardID, callbackURL, description string) (*capability.TrelloWebhook, error)
func (*Adapter) SearchCards ¶
func (a *Adapter) SearchCards(ctx context.Context, query string, limit int) ([]*capability.TrelloCard, error)
func (*Adapter) UpdateCard ¶
func (a *Adapter) UpdateCard(ctx context.Context, cardID, name, desc string) (*capability.TrelloCard, error)
type ListQuery ¶
type ListQuery struct {
Page capability.PageRequest
}
ListQuery wraps pagination for list operations.
type Service ¶
type Service interface {
ListBoards(ctx context.Context, q *ListQuery) (*capability.ListResult[capability.TrelloBoard], error)
GetBoard(ctx context.Context, boardID string) (*capability.TrelloBoard, error)
ListLists(ctx context.Context, boardID string) ([]*capability.TrelloList, error)
ListCards(ctx context.Context, boardID string, q *ListQuery) (*capability.ListResult[capability.TrelloCard], error)
GetCard(ctx context.Context, cardID string) (*capability.TrelloCard, error)
SearchCards(ctx context.Context, query string, limit int) ([]*capability.TrelloCard, error)
CreateCard(ctx context.Context, listID, name, desc string) (*capability.TrelloCard, error)
UpdateCard(ctx context.Context, cardID, name, desc string) (*capability.TrelloCard, error)
MoveCard(ctx context.Context, cardID, listID string) (*capability.TrelloCard, error)
DeleteCard(ctx context.Context, cardID string) error
RegisterWebhook(ctx context.Context, boardID, callbackURL, description string) (*capability.TrelloWebhook, error)
DeleteWebhook(ctx context.Context, webhookID string) error
HealthCheck(ctx context.Context) (bool, error)
}
Service defines the Trello capability contract.
func New ¶
func New() Service
New creates an Adapter from provider config. Returns nil when not configured.
func NewWithClient ¶
func NewWithClient(c client) Service
NewWithClient creates an Adapter with the given client.
type Webhook ¶
type Webhook struct {
// contains filtered or unexported fields
}
Webhook implements capability.WebhookConverter for Trello inbound webhooks.
func NewWebhook ¶
func NewWebhook() *Webhook
NewWebhook creates a Webhook that reads the query token from provider config.
func (*Webhook) SupportsWebhookHEAD ¶
SupportsWebhookHEAD reports that Trello probes webhook URLs with HEAD during registration.
func (*Webhook) VerifySignature ¶
VerifySignature validates the webhook token from the query parameter.
func (*Webhook) WebhookPath ¶
WebhookPath returns the URL path segment for Trello webhooks. Full URL: /webhook/provider/trello/events?token=TOKEN