model

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HelpText = fmt.Sprintf(`
  %s
%s
  %s

  %s
%s
  %s
%s
  %s
%s
`,
		helpHeaderStyle.Render("cueitup Reference Manual"),
		helpSectionStyle.Render(`
  (scroll line by line with j/k/arrow keys or by half a page with <c-d>/<c-u>)

  cueitup has 3 views:
  - Message List View
  - Message Value View
  - Help View (this one)
`),
		helpHeaderStyle.Render("Keyboard Shortcuts"),
		helpHeaderStyle.Render("General"),
		helpSectionStyle.Render(`
      <tab>                          Switch focus to next section
      <s-tab>                        Switch focus to previous section
      1                              Maximize message value view
      ?                              Show help view
`),
		helpHeaderStyle.Render("Message List View"),
		helpSectionStyle.Render(`
      h/<Up>                         Move cursor up
      k/<Down>                       Move cursor down
      n                              Fetch the next message from the queue
      N                              Fetch up to 10 more messages from the queue
      }                              Fetch up to 100 more messages from the queue
      d                              Toggle deletion mode; cueitup will delete messages
                                         after reading them
      <ctrl+s>                       Toggle contextual search prompt
      <ctrl+f>                       Toggle contextual filtering ON/OFF
      <ctrl+p>                       Toggle queue message count polling ON/OFF; ON by default
      p                              Toggle persist mode (cueitup will start persisting
                                         messages, at the location
                                         messages/<topic-name>/<timestamp-when-cueitup-started>/<unix-epoch>-<message-id>.md
      s                              Toggle skipping mode; cueitup will consume messages,
                                         but not populate its internal list, effectively
                                         skipping over them
`),
		helpHeaderStyle.Render("Message Value View   "),
		helpSectionStyle.Render(`
      q                              Minimize section, and return focus to list view
      [,h                            Show details for the previous entry in the list
      ],l                            Show details for the next entry in the list
`),
	)
)

Functions

func DeleteMessages

func DeleteMessages(client *sqs.Client, queueUrl string, messages []types.Message) tea.Cmd

func GetQueueMsgCount

func GetQueueMsgCount(client *sqs.Client, queueUrl string) tea.Cmd

func InitialModel

func InitialModel(sqsClient *sqs.Client, queueUrl string, msgConsumptionConf MsgConsumptionConf) model

func RightPadTrim

func RightPadTrim(s string, length int) string

func Trim

func Trim(s string, length int) string

Types

type ContextSearchValuesSetMsg added in v0.1.1

type ContextSearchValuesSetMsg struct {
	// contains filtered or unexported fields
}

type HideHelpMsg added in v0.1.1

type HideHelpMsg struct{}

type KMsgChosenMsg

type KMsgChosenMsg struct {
	// contains filtered or unexported fields
}

type KMsgValueReadyMsg

type KMsgValueReadyMsg struct {
	// contains filtered or unexported fields
}

type MsgConsumptionConf

type MsgConsumptionConf struct {
	Format     MsgFmt
	SubsetKey  string
	ContextKey string
}

type MsgCountTickMsg

type MsgCountTickMsg struct{}

type MsgFmt

type MsgFmt uint
const (
	JsonFmt MsgFmt = iota
	PlainTxtFmt
)

type QueueMsgCountFetchedMsg

type QueueMsgCountFetchedMsg struct {
	// contains filtered or unexported fields
}

type RecordSavedToDiskMsg

type RecordSavedToDiskMsg struct {
	// contains filtered or unexported fields
}

type SQSMsgFetchedMsg added in v0.2.1

type SQSMsgFetchedMsg struct {
	// contains filtered or unexported fields
}

type SQSMsgsDeletedMsg

type SQSMsgsDeletedMsg struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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