Help us shape the future of Go! Take the 2026 Go Developer Survey

linear

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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

View Source
const (
	OpProjectRead   = "project.read"
	OpProjectCreate = "project.create"
	OpTaskRead      = "task.read"
	OpTaskWrite     = "task.write"
	OpCommentWrite  = "comment.write"
	// OpCommentRead lists an issue's comments, so agents can read human
	// input left in Linear.
	OpCommentRead = "comment.read"
)

Operations supported by the adapter (pkg/compile/catalog.go).

View Source
const DefaultEndpoint = "https://api.linear.app/graphql"

DefaultEndpoint is Linear's GraphQL API.

View Source
const MarkerPrefix = "steadmesh-op:"

MarkerPrefix precedes the operation id embedded in created records.

Variables

This section is empty.

Functions

func Marker

func Marker(operationID string) string

Marker returns the marker text for an operation id.

func New

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.

func (*Adapter) ReadOnly

func (a *Adapter) ReadOnly(operation string) bool

ReadOnly reports whether an operation has no side effects.

func (*Adapter) Verify

func (a *Adapter) Verify(ctx context.Context) error

Verify runs the viewer query and, when cfg.AccountID is set, checks that the key belongs to that organisation (id or url key).

Jump to

Keyboard shortcuts

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