Documentation
¶
Overview ¶
Package linear is the Linear work-tracker adapter (ADR-0003). Linear has no idempotency keys, so created records carry an "steadmesh-op:<operation id>" marker that FindByOperation searches for after an ambiguous outcome (§10.3).
Index ¶
- Constants
- func Marker(operationID string) string
- func New(cfg connectors.Config) (connectors.Tracker, error)
- type Adapter
- func (a *Adapter) FindByOperation(ctx context.Context, operation string, params json.RawMessage, ...) (*connectors.Result, error)
- func (a *Adapter) Invoke(ctx context.Context, operation string, params json.RawMessage, ...) (connectors.Result, error)
- func (a *Adapter) ReadOnly(operation string) bool
- func (a *Adapter) Verify(ctx context.Context) error
Constants ¶
const ( OpProjectRead = "project.read" OpProjectCreate = "project.create" OpTaskRead = "task.read" OpTaskWrite = "task.write" OpCommentWrite = "comment.write" )
Operations supported by the adapter (pkg/compile/catalog.go).
const DefaultEndpoint = "https://api.linear.app/graphql"
DefaultEndpoint is Linear's GraphQL API.
const MarkerPrefix = "steadmesh-op:"
MarkerPrefix precedes the operation id embedded in created records.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg connectors.Config) (connectors.Tracker, error)
New builds a Linear adapter. cfg.Secret["api_key"] is required; cfg.Extra["team_id"] is the default team for created records.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements connectors.Tracker for Linear.
func (*Adapter) FindByOperation ¶
func (a *Adapter) FindByOperation(ctx context.Context, operation string, params json.RawMessage, operationID string) (*connectors.Result, error)
FindByOperation looks for the effect of an earlier attempt of operationID. It returns (nil, nil) when no effect is found.
func (*Adapter) Invoke ¶
func (a *Adapter) Invoke(ctx context.Context, operation string, params json.RawMessage, operationID string) (connectors.Result, error)
Invoke performs an operation.