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

comment

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package comment implements the command layer for governed comment operations. All transport calls use the generated server comment operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd(f *cmdutil.Factory, connect Connect) *cobra.Command

Types

type Actor

type Actor struct {
	ID     string  `json:"id"`
	Name   *string `json:"name"`
	Handle *string `json:"handle"`
	URN    *string `json:"urn"`
}

Actor is a public identity projection; no nested user/account object is exposed.

type Author

type Author struct {
	Kind   string `json:"kind"`
	Worker *Actor `json:"worker"`
	User   *Actor `json:"user"`
	Agent  *Actor `json:"agent"`
	App    *Actor `json:"app"`
}

type Comment

type Comment struct {
	ID                 string  `json:"id"`
	URN                string  `json:"urn"`
	PortalURL          *string `json:"portalUrl"`
	Target             Target  `json:"target"`
	ThreadRootID       *string `json:"threadRootId"`
	IsTopLevel         bool    `json:"isTopLevel"`
	AnchorRevision     int     `json:"anchorRevision"`
	AnchorApprovalHash *string `json:"anchorApprovalHash"`
	AnchorIsCurrent    bool    `json:"anchorIsCurrent"`
	Quote              *string `json:"quote"`
	Body               *string `json:"body"`
	State              *string `json:"state"`
	Deleted            bool    `json:"deleted"`
	DeletedAt          *string `json:"deletedAt"`
	DeletedBy          *Actor  `json:"deletedBy"`
	EditedAt           *string `json:"editedAt"`
	EditedBy           *Actor  `json:"editedBy"`
	ResolvedAt         *string `json:"resolvedAt"`
	ResolvedBy         *Actor  `json:"resolvedBy"`
	Author             Author  `json:"author"`
	ProvenanceUser     *Actor  `json:"provenanceUser"`
	CreatedAt          string  `json:"createdAt"`
	UpdatedAt          *string `json:"updatedAt"`
	RevSeq             int     `json:"revSeq"`
}

Comment is the stable CLI output contract. Nullable bodies preserve stubs.

type Connect

type Connect func(context.Context) (Service, error)

func ConnectGraphQL

func ConnectGraphQL(f *cmdutil.Factory) Connect

type Page

type Page struct {
	Items []Thread `json:"items"`
	Total int      `json:"total"`
}

type Service

Service is the seam for the generated adapter. Nil edit fields mean preserve; an explicit empty quote means clear. Implementations return mapped CLI errors.

type Target

type Target struct {
	ID       string `json:"id"`
	URN      string `json:"urn"`
	Name     string `json:"name"`
	NodeType string `json:"nodeType"`
	Revision int    `json:"revision"`
}

type Thread

type Thread struct {
	Root       Comment   `json:"root"`
	Replies    []Comment `json:"replies"`
	ReplyCount int       `json:"replyCount"`
}

Jump to

Keyboard shortcuts

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