output

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 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 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 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) 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) JSON

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

func (*Renderer) Tags

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

func (*Renderer) User

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

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