server

package
v0.0.0-...-108cf52 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArcadeMap = map[string]func(s *session.Session) games.Game{
	"Menu": MakeMenu,
}

Functions

func MakeMenu

func MakeMenu(s *session.Session) games.Game

Types

type Menu struct {
	Session      *session.Session
	MenuIdx      int
	SelectionIdx int
	Finished     int
	Destination  string
}
func (m *Menu) Init() tea.Cmd
func (m *Menu) Redirect() string
func (m *Menu) Status() int
func (m *Menu) Update(msg tea.Msg) (tea.Model, tea.Cmd)
func (m *Menu) View() string

type Server

type Server struct {
	Connection *ssh.Server
	Host       string
	Port       int
}

func MakeServer

func MakeServer(host string, port int) (*Server, error)

MakeServer makes a new server object

func (*Server) Run

func (srv *Server) Run() error

Run starts the server blockingly and gracefully shuts down on keyboard interrupt

type SessionModel

type SessionModel struct {
	Session *session.Session
	Current games.Game
}

func (*SessionModel) Init

func (m *SessionModel) Init() tea.Cmd

func (*SessionModel) Update

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

func (*SessionModel) View

func (m *SessionModel) View() string

Jump to

Keyboard shortcuts

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