Something went wrong. Try again.
An unofficial terminal client for Tangled, optimized for humans and agents. tgcli.wisp.place
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110package spindle
import ( "github.com/bluesky-social/indigo/atproto/syntax")
const ( nsidQueryPipelines syntax.NSID = "org.tangled.ci.queryPipelines" nsidGetPipeline syntax.NSID = "org.tangled.ci.getPipeline" nsidCancelPipeline syntax.NSID = "org.tangled.ci.cancelPipeline" nsidNotifyEvent syntax.NSID = "org.tangled.event.notifyEvent" nsidApprovePipeline syntax.NSID = "org.tangled.ci.approvePipeline" nsidRetryPipeline syntax.NSID = "org.tangled.ci.retryPipeline" nsidSubscribeLogs syntax.NSID = "org.tangled.ci.subscribePipelineLogs")
// Workflow is one workflow executed by a pipeline.type Workflow struct { ID string `json:"id"` Name string `json:"name"` Status string `json:"status"` Error string `json:"error,omitempty"` StartedAt string `json:"startedAt,omitempty"` FinishedAt string `json:"finishedAt,omitempty"`}
// Pipeline is a CI pipeline returned by a spindle.type Pipeline struct { ID string `json:"id"` Commit string `json:"commit"` CreatedAt string `json:"createdAt,omitempty"` Repo string `json:"repo,omitempty"` SourceRepo string `json:"sourceRepo,omitempty"` Trigger map[string]any `json:"trigger"` Workflows []Workflow `json:"workflows"`}
type QueryPipelinesOutput struct { Pipelines []Pipeline `json:"pipelines"` Cursor string `json:"cursor,omitempty"` Total int `json:"total"`}
type CancelPipelineInput struct { Pipeline string `json:"pipeline"` Repo string `json:"repo"` Workflows []string `json:"workflows,omitempty"`}
type TriggerPipelineInput struct { Repo string `json:"repo"` Event ManualTrigger `json:"event"`}
type ManualTrigger struct { LexiconTypeID string `json:"$type"` SHA string `json:"commit"` Repo string `json:"repo"` Ref string `json:"ref,omitempty"` Workflows []string `json:"workflows,omitempty"`}
type ApprovePipelineInput struct { Repo string `json:"repo"` Pipeline string `json:"pipeline"`}
type RetryPipelineInput struct { Repo string `json:"repo"` Pipeline string `json:"pipeline"` Workflows []string `json:"workflows,omitempty"`}
type RetryPipelineOutput struct { Pipeline string `json:"pipeline"`}
type TriggerPipelineOutput struct { Pipelines []string `json:"pipelines"` Message string `json:"message,omitempty"`}
// PipelineLogControl marks the start or end of a workflow step.type PipelineLogControl struct { Outcome string `json:"outcome,omitempty"` Kind string `json:"kind"` Step int64 `json:"step"` Time string `json:"time"` Status string `json:"status,omitempty"` Content string `json:"content"` Workflow string `json:"workflow"` Command *string `json:"command,omitempty"`}
// PipelineLogData is one line of workflow output.type PipelineLogData struct { Step int64 `json:"step"` Time string `json:"time"` Stream string `json:"stream"` Content string `json:"content"` Workflow string `json:"workflow"`}
// PipelineLogEvent is one event from a log subscription.type PipelineLogEvent struct { Type string `json:"type"` Control *PipelineLogControl `json:"control,omitempty"` Data *PipelineLogData `json:"data,omitempty"`}