com

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKeyEnteredCmd

func APIKeyEnteredCmd(key string) func() tea.Msg

Command to trigger APIKeyEntered

func APILanguagesReceivedCmd

func APILanguagesReceivedCmd() func() tea.Msg

Command to trigger APILanguagesReceived

func APITranslationReceivedCmd

func APITranslationReceivedCmd() func() tea.Msg

Command to trigger APITranslationReceived

func ContentSizeCmd

func ContentSizeCmd() func() tea.Msg

Command to trogger ContentSizeMsg

func FormalityBtnSelectedCmd

func FormalityBtnSelectedCmd() func() tea.Msg

Command to trigger FormalityBtnSelected

func FormalitySelectedCmd

func FormalitySelectedCmd(formality string) func() tea.Msg

Command to trigger FormalitySelected

func InsertModeEnteredCmd

func InsertModeEnteredCmd() func() tea.Msg

Command to trigger insert mode

func InsertModeExitedCmd

func InsertModeExitedCmd() func() tea.Msg

Command to exit insert mode

func SrcLangBtnSelectedCmd

func SrcLangBtnSelectedCmd() func() tea.Msg

Command to trigger SrcLangBtnSelected

func SrcLangSelectedCmd

func SrcLangSelectedCmd(language deeplapi.Language) func() tea.Msg

Command to trigger SrcLangSelected

func StartLoadingCmd

func StartLoadingCmd() func() tea.Msg

Command to trigger StartLoading

func StopLoadingCmd

func StopLoadingCmd() func() tea.Msg

Command to trigger StopLoading

func TarLangBtnSelectedCmd

func TarLangBtnSelectedCmd() func() tea.Msg

Command to trigger TarLangBtnSelected

func TarLangSelectedCmd

func TarLangSelectedCmd(language deeplapi.Language) func() tea.Msg

Command to trigger TarLangSelected

func ThrowErr

func ThrowErr(err error) func() tea.Msg

tea command to throw an error

func TranslateBtnSelectedCmd

func TranslateBtnSelectedCmd() func() tea.Msg

Command to trigger TranslateBtnSelected

Types

type APIKeyEnteredMsg

type APIKeyEnteredMsg struct {
	Key string
}

Describe the action that the user entered an API key

type APILanguagesReceivedMsg

type APILanguagesReceivedMsg struct{}

Previously requested available languages have been received

type APITranslationReceivedMsg

type APITranslationReceivedMsg struct{}

Previously requested translation has been received

type ContentSizeMsg

type ContentSizeMsg struct{}

Describes that the size available to a view changed Difference to tea.WindowSizeMsg: this one contains the screen height substracted by header and footer height, and the screen width substracted by global margins The new size is accessible to the context.

type Err

type Err struct {
	Err error
}

Represents the event that an error occured

func (Err) Error

func (e Err) Error() string

Get error message as string

type FormalityBtnSelectedMsg

type FormalityBtnSelectedMsg struct{}

Describes the action of the user selecting the formality button

type FormalitySelectedMsg

type FormalitySelectedMsg struct {
	Formality string
}

Describes the action of the user selecting a formality for the translation

type InsertModeEnteredMsg

type InsertModeEnteredMsg struct{}

Describes the action of the user entering insert mode All navigational inputs shall be ignored for the time being

type InsertModeExitedMsg

type InsertModeExitedMsg struct{}

Describes the action of the user exiting insert mode

type SrcLangBtnSelectedMsg

type SrcLangBtnSelectedMsg struct{}

Describes the action of the user selecting the source language button

type SrcLangSelectedMsg

type SrcLangSelectedMsg struct {
	Language deeplapi.Language
}

Describes the action the of the user selecting a source language

type StartLoadingMsg

type StartLoadingMsg struct{}

Describes that a loading process started in the background

type StopLoadingMsg

type StopLoadingMsg struct{}

Describes that a loading process stopped in the background

type TarLangBtnSelectedMsg

type TarLangBtnSelectedMsg struct{}

Describes the action of the user selecting the target language button

type TarLangSelectedMsg

type TarLangSelectedMsg struct {
	Language deeplapi.Language
}

Describes the action of the user selecting a target language

type TranslateBtnSelectedMsg

type TranslateBtnSelectedMsg struct{}

Describes the action of the user selecting the translate button

Jump to

Keyboard shortcuts

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