github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/pkg/term/deprecated.go (about) 1 // Package term provides structures and helper functions to work with 2 // terminal (state, sizes). 3 // 4 // Deprecated: use github.com/moby/term instead 5 package term // import "github.com/demonoid81/moby/pkg/term" 6 7 import ( 8 "github.com/moby/term" 9 ) 10 11 // EscapeError is special error which returned by a TTY proxy reader's Read() 12 // method in case its detach escape sequence is read. 13 // Deprecated: use github.com/moby/term.EscapeError 14 type EscapeError = term.EscapeError 15 16 // State represents the state of the terminal. 17 // Deprecated: use github.com/moby/term.State 18 type State = term.State 19 20 // Winsize represents the size of the terminal window. 21 // Deprecated: use github.com/moby/term.Winsize 22 type Winsize = term.Winsize 23 24 var ( 25 // ASCII list the possible supported ASCII key sequence 26 ASCII = term.ASCII 27 28 // ToBytes converts a string representing a suite of key-sequence to the corresponding ASCII code. 29 // Deprecated: use github.com/moby/term.ToBytes 30 ToBytes = term.ToBytes 31 32 // StdStreams returns the standard streams (stdin, stdout, stderr). 33 // Deprecated: use github.com/moby/term.StdStreams 34 StdStreams = term.StdStreams 35 36 // GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. 37 // Deprecated: use github.com/moby/term.GetFdInfo 38 GetFdInfo = term.GetFdInfo 39 40 // GetWinsize returns the window size based on the specified file descriptor. 41 // Deprecated: use github.com/moby/term.GetWinsize 42 GetWinsize = term.GetWinsize 43 44 // IsTerminal returns true if the given file descriptor is a terminal. 45 // Deprecated: use github.com/moby/term.IsTerminal 46 IsTerminal = term.IsTerminal 47 48 // RestoreTerminal restores the terminal connected to the given file descriptor 49 // to a previous state. 50 // Deprecated: use github.com/moby/term.RestoreTerminal 51 RestoreTerminal = term.RestoreTerminal 52 53 // SaveState saves the state of the terminal connected to the given file descriptor. 54 // Deprecated: use github.com/moby/term.SaveState 55 SaveState = term.SaveState 56 57 // DisableEcho applies the specified state to the terminal connected to the file 58 // descriptor, with echo disabled. 59 // Deprecated: use github.com/moby/term.DisableEcho 60 DisableEcho = term.DisableEcho 61 62 // SetRawTerminal puts the terminal connected to the given file descriptor into 63 // raw mode and returns the previous state. On UNIX, this puts both the input 64 // and output into raw mode. On Windows, it only puts the input into raw mode. 65 // Deprecated: use github.com/moby/term.SetRawTerminal 66 SetRawTerminal = term.SetRawTerminal 67 68 // SetRawTerminalOutput puts the output of terminal connected to the given file 69 // descriptor into raw mode. On UNIX, this does nothing and returns nil for the 70 // state. On Windows, it disables LF -> CRLF translation. 71 // Deprecated: use github.com/moby/term.SetRawTerminalOutput 72 SetRawTerminalOutput = term.SetRawTerminalOutput 73 74 // MakeRaw puts the terminal connected to the given file descriptor into raw 75 // mode and returns the previous state of the terminal so that it can be restored. 76 // Deprecated: use github.com/moby/term.MakeRaw 77 MakeRaw = term.MakeRaw 78 79 // NewEscapeProxy returns a new TTY proxy reader which wraps the given reader 80 // and detects when the specified escape keys are read, in which case the Read 81 // method will return an error of type EscapeError. 82 // Deprecated: use github.com/moby/term.NewEscapeProxy 83 NewEscapeProxy = term.NewEscapeProxy 84 )