output

package
v0.2.0-comments-crd Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentJSON added in v0.3.0

type CommentJSON struct {
	EntityID string     `json:"entityId"`
	Author   *UserJSON  `json:"author"`
	Text     *string    `json:"text"`
	Created  time.Time  `json:"created"`
	Updated  *time.Time `json:"updated"`
	Deleted  bool       `json:"deleted"`
}

type CommentRemovalJSON added in v0.3.0

type CommentRemovalJSON struct {
	EntityID string `json:"entityId"`
	Removed  bool   `json:"removed"`
}

type FieldJSON

type FieldJSON struct {
	EntityID     string            `json:"entityId,omitempty"`
	Name         string            `json:"name"`
	Type         string            `json:"type"`
	Cardinality  string            `json:"cardinality,omitempty"`
	Value        any               `json:"value"`
	StateMachine bool              `json:"stateMachine,omitempty"`
	Transitions  []FieldOptionJSON `json:"transitions,omitempty"`
}

type FieldOptionJSON

type FieldOptionJSON struct {
	EntityID string `json:"entityId"`
	Name     string `json:"name"`
}

type Format

type Format string
const (
	FormatHuman Format = "human"
	FormatJSON  Format = "json"
	FormatPlain Format = "plain"
)

type IssueJSON

type IssueJSON struct {
	ID          string      `json:"id"`
	EntityID    string      `json:"entityId"`
	Summary     string      `json:"summary"`
	Description string      `json:"description,omitempty"`
	Project     ProjectJSON `json:"project"`
	Reporter    *UserJSON   `json:"reporter,omitempty"`
	Updater     *UserJSON   `json:"updater,omitempty"`
	Created     time.Time   `json:"created"`
	Updated     time.Time   `json:"updated"`
	Resolved    *time.Time  `json:"resolved,omitempty"`
	Fields      []FieldJSON `json:"fields,omitempty"`
	Tags        []TagJSON   `json:"tags,omitempty"`
}

type IssueSummaryJSON added in v0.3.0

type IssueSummaryJSON struct {
	ID       string      `json:"id"`
	EntityID string      `json:"entityId"`
	Summary  string      `json:"summary"`
	Project  ProjectJSON `json:"project"`
	Created  time.Time   `json:"created"`
	Updated  time.Time   `json:"updated"`
	Resolved *time.Time  `json:"resolved"`
}

type ProjectJSON

type ProjectJSON struct {
	EntityID  string `json:"entityId"`
	Name      string `json:"name"`
	ShortName string `json:"shortName"`
}

type Renderer

type Renderer struct {
	Out    io.Writer
	Format Format
}

func New

func New(out io.Writer, jsonMode, plainMode bool) (*Renderer, error)

func (*Renderer) Comment added in v0.3.0

func (r *Renderer) Comment(comment domain.Comment) error

func (*Renderer) CommentRemoval added in v0.3.0

func (r *Renderer) CommentRemoval(id string) error

func (*Renderer) Comments added in v0.3.0

func (r *Renderer) Comments(comments []domain.Comment) error

func (*Renderer) Field

func (r *Renderer) Field(field domain.IssueField) error

func (*Renderer) Fields

func (r *Renderer) Fields(fields []domain.IssueField) error

func (*Renderer) Issue

func (r *Renderer) Issue(issue domain.Issue) error

func (*Renderer) IssueSummaries added in v0.3.0

func (r *Renderer) IssueSummaries(items []domain.IssueSummary) error

func (*Renderer) JSON

func (r *Renderer) JSON(v any) error

func (*Renderer) SavedSearch added in v0.3.0

func (r *Renderer) SavedSearch(search domain.SavedSearch, issues []domain.IssueSummary) error

func (*Renderer) Tags

func (r *Renderer) Tags(tags []domain.Tag) error

func (*Renderer) User

func (r *Renderer) User(user domain.User) error

type SavedSearchJSON added in v0.3.0

type SavedSearchJSON struct {
	EntityID string             `json:"entityId"`
	Name     string             `json:"name"`
	Query    string             `json:"query"`
	Owner    *UserJSON          `json:"owner"`
	Issues   []IssueSummaryJSON `json:"issues"`
}

type TagJSON

type TagJSON struct {
	EntityID string `json:"entityId,omitempty"`
	Name     string `json:"name"`
}

type UserJSON

type UserJSON struct {
	EntityID string `json:"entityId"`
	Login    string `json:"login"`
	Name     string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

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