package output type Image struct { Data []byte ContentType string Filename string } // Ref identifies a post an output has already published so it can later be // replied to or deleted. The fields are output specific; only the ones the // publishing output filled in are meaningful to it. type Ref struct { ID string `json:"id,omitempty"` // twitter: tweet ID URI string `json:"uri,omitempty"` // bluesky: at:// URI of the record CID string `json:"cid,omitempty"` // bluesky: record CID RootURI string `json:"rooturi,omitempty"` RootCID string `json:"rootcid,omitempty"` } // IsZero reports whether the ref points at nothing. func (r Ref) IsZero() bool { return r == Ref{} } // Post is a single message to distribute. type Post struct { Text string Images []Image // ReplyTo is the Ref this same output returned for the post being // replied to, or nil for a top level post. ReplyTo *Ref } type OutputInterface interface { Write(Post) (Ref, error) Delete(Ref) error GetName() string }