Documentation
¶
Index ¶
- func FormatChannel(ch api.Channel) []string
- func FormatContact(contact api.Contact) []string
- func FormatConversation(conv api.Conversation) []string
- func FormatConversationWithUpdated(conv api.Conversation) []string
- func FormatInbox(inbox api.Inbox) []string
- func FormatMessage(msg api.Message) []string
- func FormatTag(tag api.Tag) []string
- func FormatTeammate(tm api.Teammate) []string
- func FormatTimestamp(ts float64) string
- func FormatTimestampLayout(ts float64, layout string) string
- func FormatTimestampRFC3339(ts float64) string
- func IsJSON(ctx context.Context) bool
- func WithMode(ctx context.Context, mode Mode) context.Context
- func WriteJSON(w io.Writer, v any) error
- type Mode
- type PlainTable
- type Table
- type TableWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatChannel ¶
FormatChannel formats a channel for table output.
func FormatContact ¶
FormatContact formats a contact for table output.
func FormatConversation ¶
func FormatConversation(conv api.Conversation) []string
FormatConversation formats a conversation for table output.
func FormatConversationWithUpdated ¶ added in v0.1.2
func FormatConversationWithUpdated(conv api.Conversation) []string
FormatConversationWithUpdated formats a conversation with UPDATED column. Shows waiting_since for snoozed, otherwise shows created_at.
func FormatInbox ¶
FormatInbox formats an inbox for table output.
func FormatMessage ¶
FormatMessage formats a message for table output.
func FormatTeammate ¶
FormatTeammate formats a teammate for table output.
func FormatTimestamp ¶
func FormatTimestampLayout ¶
func FormatTimestampRFC3339 ¶
Types ¶
type Mode ¶
func FromContext ¶
type PlainTable ¶
type PlainTable struct {
// contains filtered or unexported fields
}
func NewPlainTable ¶
func NewPlainTable(out io.Writer) *PlainTable
func (*PlainTable) AddRow ¶
func (t *PlainTable) AddRow(cols ...string)
func (*PlainTable) Flush ¶
func (t *PlainTable) Flush() error
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table provides simple table output using tabwriter.
type TableWriter ¶
func NewTableWriter ¶
func NewTableWriter(out io.Writer, plain bool) TableWriter
Click to show internal directories.
Click to hide internal directories.