refactor: decouple gotty app with terminal backends
This commit is contained in:
19
backends/interface.go
Normal file
19
backends/interface.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package backends
|
||||
|
||||
import (
|
||||
"io"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
type ClientContextManager interface {
|
||||
New(params url.Values) (ClientContext, error)
|
||||
}
|
||||
|
||||
type ClientContext interface {
|
||||
WindowTitle() (string, error)
|
||||
Start(exitCh chan bool)
|
||||
InputWriter() io.Writer
|
||||
OutputReader() io.Reader
|
||||
ResizeTerminal(width, height uint16) error
|
||||
TearDown() error
|
||||
}
|
||||
Reference in New Issue
Block a user