Documentation ¶
Index ¶
- Variables
- func BgBlack(s string) string
- func BgBlue(s string) string
- func BgGreen(s string) string
- func BgRed(s string) string
- func FgBlack(s string) string
- func FgBlue(s string) string
- func FgGreen(s string) string
- func FgRed(s string) string
- func NewMooze(s *Screen, t Terminal, tu *TerminalUnix, r *Request) *mooze
- func Run()
- type Request
- type Screen
- func (s *Screen) ClearLine()
- func (s *Screen) ClearScreen()
- func (s *Screen) HideCursor()
- func (s *Screen) LoadAlternateScreen()
- func (s *Screen) MoveCursorDown()
- func (s *Screen) MoveCursorTo(x, y int)
- func (s *Screen) MoveCursorUp()
- func (s *Screen) Print(v ...interface{})
- func (s *Screen) Println(v ...interface{})
- func (s *Screen) ShowCursor()
- func (s *Screen) UnloadAlternateScreen()
- type StdReadWriter
- type Terminal
- type TerminalUnix
- func (t *TerminalUnix) GetWindowResizeChan() (chan os.Signal, chan bool)
- func (t *TerminalUnix) HandleResize()
- func (t *TerminalUnix) MakeNonblock()
- func (t *TerminalUnix) MakeRaw()
- func (t *TerminalUnix) Read(buf []byte) []byte
- func (t *TerminalUnix) ReadBodyString() (string, error)
- func (t *TerminalUnix) ReadHeaderString() (string, error)
- func (t *TerminalUnix) ReadMethodString() (string, error)
- func (t *TerminalUnix) ReadString() (string, error)
- func (t *TerminalUnix) ReadStringTyped(ts string) (string, error)
- func (t *TerminalUnix) ReadUrlString() (string, error)
- func (t *TerminalUnix) RestoreNonblock()
- func (t *TerminalUnix) RestoreRaw()
Constants ¶
This section is empty.
Variables ¶
View Source
var BgColorBlack string = "\033[40m"
View Source
var BgColorBlue string = "\033[44m"
View Source
var BgColorCyan string = "\033[46m"
View Source
var BgColorGreen string = "\033[42m"
View Source
var BgColorMagenta string = "\033[45m"
View Source
var BgColorRed string = "\033[41m"
View Source
var BgColorYellow string = "\033[43m"
View Source
var ColorReset string = "\033[0m"
View Source
var FgColorBlack string = "\033[30m"
View Source
var FgColorBlue string = "\033[34m"
View Source
var FgColorCyan string = "\033[36m"
View Source
var FgColorGreen string = "\033[32m"
View Source
var FgColorMagenta string = "\033[35m"
View Source
var FgColorRed string = "\033[31m"
View Source
var FgColorYellow string = "\033[33m"
View Source
var HttpMethod = httpMethodStruct{
GET: "GET",
POST: "POST",
}
Functions ¶
Types ¶
type Request ¶
type Request struct { Url string Method string Body string BodyBuffer *bytes.Buffer Headers map[string]string Client *http.Client }
func NewRequest ¶
func NewRequest() *Request
func (*Request) ParseHeaders ¶
ParseHeaders() parses request headers: map(key: value) into string("key:value") and returns parsed string
func (*Request) ParseHeadersOptions ¶
func (*Request) SetHttpClient ¶
func (r *Request) SetHttpClient()
type Screen ¶
type Screen struct { }
func (*Screen) ClearScreen ¶
func (s *Screen) ClearScreen()
func (*Screen) HideCursor ¶
func (s *Screen) HideCursor()
func (*Screen) LoadAlternateScreen ¶
func (s *Screen) LoadAlternateScreen()
func (*Screen) MoveCursorDown ¶
func (s *Screen) MoveCursorDown()
func (*Screen) MoveCursorTo ¶
func (*Screen) MoveCursorUp ¶
func (s *Screen) MoveCursorUp()
func (*Screen) ShowCursor ¶
func (s *Screen) ShowCursor()
func (*Screen) UnloadAlternateScreen ¶
func (s *Screen) UnloadAlternateScreen()
type TerminalUnix ¶
type TerminalUnix struct { W int H int In *os.File State *terminal.State Prompt *terminal.Terminal UrlPrompt *terminal.Terminal MethodPrompt *terminal.Terminal BodyPrompt *terminal.Terminal HeaderPrompt *terminal.Terminal }
func NewTerminalUnix ¶
func NewTerminalUnix() *TerminalUnix
func (*TerminalUnix) GetWindowResizeChan ¶
func (t *TerminalUnix) GetWindowResizeChan() (chan os.Signal, chan bool)
func (*TerminalUnix) HandleResize ¶
func (t *TerminalUnix) HandleResize()
func (*TerminalUnix) MakeNonblock ¶
func (t *TerminalUnix) MakeNonblock()
func (*TerminalUnix) MakeRaw ¶
func (t *TerminalUnix) MakeRaw()
func (*TerminalUnix) Read ¶
func (t *TerminalUnix) Read(buf []byte) []byte
func (*TerminalUnix) ReadBodyString ¶
func (t *TerminalUnix) ReadBodyString() (string, error)
func (*TerminalUnix) ReadHeaderString ¶
func (t *TerminalUnix) ReadHeaderString() (string, error)
func (*TerminalUnix) ReadMethodString ¶
func (t *TerminalUnix) ReadMethodString() (string, error)
func (*TerminalUnix) ReadString ¶
func (t *TerminalUnix) ReadString() (string, error)
func (*TerminalUnix) ReadStringTyped ¶
func (t *TerminalUnix) ReadStringTyped(ts string) (string, error)
func (*TerminalUnix) ReadUrlString ¶
func (t *TerminalUnix) ReadUrlString() (string, error)
func (*TerminalUnix) RestoreNonblock ¶
func (t *TerminalUnix) RestoreNonblock()
func (*TerminalUnix) RestoreRaw ¶
func (t *TerminalUnix) RestoreRaw()
Click to show internal directories.
Click to hide internal directories.