Documentation
¶
Index ¶
- Variables
- func Execute(args []string) error
- func NewRootCmd() *cobra.Command
- func OutputList[T any](app *App, ctx context.Context, items []T, emptyMessage string, ...) error
- func WithApp(ctx context.Context, app *App) context.Context
- type App
- func (a *App) AccountParams() url.Values
- func (a *App) AddAccountIDs(params url.Values)
- func (a *App) BaseURL() string
- func (a *App) Client(ctx context.Context) (*api.Client, error)
- func (a *App) ColorEnabled(ctx context.Context) bool
- func (a *App) Confirm(prompt string) (bool, error)
- func (a *App) IsTextOutput(ctx context.Context) bool
- func (a *App) Output(ctx context.Context, data any, textFn func(io.Writer)) error
- func (a *App) OutputEvent(ctx context.Context, data any, textFn func(io.Writer)) error
- func (a *App) OutputFormat(ctx context.Context) string
- func (a *App) OutputTextf(ctx context.Context, data any, format string, args ...any) error
- func (a *App) ProgressWriter(ctx context.Context) io.Writer
- func (a *App) ResolveChatByName(ctx context.Context, client *api.Client, name string, ...) (string, error)
- func (a *App) ResolveChatIDFromArgOrFlag(ctx context.Context, client *api.Client, args []string, name, label string, ...) (string, error)
- func (a *App) ResolveChatIDFromFlags(ctx context.Context, client *api.Client, name, chatID, nameFlag, idFlag string, ...) (string, error)
- func (a *App) Table(ctx context.Context, w io.Writer, headers []string) *outfmt.TableWriter
- type Config
- type InboxItem
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "dev" Commit = "unknown" BuildDate = "unknown" )
These are set via ldflags during build
Functions ¶
func NewRootCmd ¶
func OutputList ¶ added in v0.1.7
Types ¶
type App ¶ added in v0.1.7
func AppFromContext ¶ added in v0.1.7
func (*App) AccountParams ¶ added in v0.1.7
func (*App) AddAccountIDs ¶ added in v0.1.7
func (*App) OutputEvent ¶ added in v0.1.7
func (*App) OutputTextf ¶ added in v0.1.7
func (*App) ProgressWriter ¶ added in v0.1.7
ProgressWriter returns stderr when JSON output is requested to keep stdout clean.
func (*App) ResolveChatByName ¶ added in v0.1.7
func (*App) ResolveChatIDFromArgOrFlag ¶ added in v0.1.7
func (*App) ResolveChatIDFromFlags ¶ added in v0.1.7
type InboxItem ¶ added in v0.1.6
type InboxItem struct {
ChatID string `json:"chatID"`
ChatTitle string `json:"chatTitle"`
Network string `json:"network"`
ChatType string `json:"chatType"`
Message string `json:"message"`
Sender string `json:"sender"`
Timestamp time.Time `json:"timestamp"`
}
InboxItem represents an unread message with chat context
Click to show internal directories.
Click to hide internal directories.