requestui

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreateRequestLabel = "" /* 249-byte string literal not displayed */
	RenameRequestLabel = "Rename your request."
	CopyRequestLabel   = "Choose name for your request."
)
View Source
const (
	CreateRequest        = "CReq"
	CreateSimpleRequest  = "CSmplReq"
	CreateComplexRequest = "CCmplxReq"
	DeleteRequest        = "DReq"
	EditRequest          = "EReq"
	PrintRequest         = "PReq"
	PrintFailedRequest   = "PEReq"
	RenameRequest        = "RnReq"
	CopyRequest          = "CpReq"
)
View Source
const (
	YamlTemplate = `` /* 290-byte string literal not displayed */

	StarlarkTemplate = `` /* 441-byte string literal not displayed */

	LuaTemplate = `` /* 343-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func InitStyle

func InitStyle(theme *styles.Theme, commonStyles *styles.CommonStyle)

func RefreshProfiles

func RefreshProfiles(loadedProfiles []*model.Profile)

Types

type ActivateProfile

type ActivateProfile struct{}

type ActiveView

type ActiveView int
const (
	List ActiveView = iota
	Prompt
	Keyprompt
	Duplicate
	Preview
	Stopwatch
	Profiles
)

type CopyRequestMsg

type CopyRequestMsg struct {
	Request Request
}

type CreateRequestFinishedMsg

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

type CreateRequestMsg

type CreateRequestMsg struct {
	Type string
}

type DeleteRequestConfirmedMsg

type DeleteRequestConfirmedMsg struct {
	Request Request
}

type DeleteRequestMsg

type DeleteRequestMsg struct {
	Request Request
}

type EditRequestFinishedMsg

type EditRequestFinishedMsg struct {
	Request Request
	// contains filtered or unexported fields
}

type EditRequestMsg

type EditRequestMsg struct {
	Request Request
}

type Mode

type Mode int
const (
	Select Mode = iota
	Edit
)

type Model

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

func New

func New(loadedRequests []*model.RequestMold, loadedProfiles []*model.Profile) Model

func (Model) HandlePostAction

func (m Model) HandlePostAction()

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) SetSize

func (m *Model) SetSize(w, h int)

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type PostAction

type PostAction struct {
	Type             string
	Payload          interface{}
	AddtionalContext interface{}
}

type PreviewRequestMsg

type PreviewRequestMsg struct {
	Request Request
}

type RenameRequestMsg

type RenameRequestMsg struct {
	Request Request
}

type Request

type Request struct {
	Name    string
	Url     string
	Method  string
	Profile *model.Profile
}

func (Request) Description

func (i Request) Description() string

func (Request) FilterValue

func (i Request) FilterValue() string

func (Request) Title

func (i Request) Title() string

type RunRequestFinishedMsg

type RunRequestFinishedMsg string

type RunRequestFinishedWithFailureMsg

type RunRequestFinishedWithFailureMsg string

type RunRequestMsg

type RunRequestMsg struct {
	Request Request
}

type ShowKeyprompt

type ShowKeyprompt struct {
	Label   string
	Entries []keyprompt.KeypromptEntry
	Type    string
	Payload interface{}
}

type Styles

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

Jump to

Keyboard shortcuts

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