ssh

package
v0.0.0-...-813d38e Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPublicKeyFromContext

func GetPublicKeyFromContext(ctx context.Context) string

func PublicKeyHandler

func PublicKeyHandler(ctx ssh.Context, key ssh.PublicKey) bool

func SessionHandler

func SessionHandler(s ssh.Session) *tea.Program

func WithPublicKeyMiddleware

func WithPublicKeyMiddleware() wish.Middleware

Types

type PetSaveMsg

type PetSaveMsg struct {
	Pet       *pet.Pet
	PublicKey string
}

type PublicKeyContextKey

type PublicKeyContextKey string
const PublicKeyKey PublicKeyContextKey = "public_key"

type SSHServer

type SSHServer struct {
	// contains filtered or unexported fields
}

func NewSSHServer

func NewSSHServer(ctx context.Context) (*SSHServer, error)

func (*SSHServer) Close

func (s *SSHServer) Close() error

func (*SSHServer) ListenAndServe

func (s *SSHServer) ListenAndServe() error

func (*SSHServer) Serve

func (s *SSHServer) Serve(l net.Listener) error

func (*SSHServer) Shutdown

func (s *SSHServer) Shutdown(ctx context.Context) error

type UI

type UI struct {
	Renderer *lipgloss.Renderer
	// contains filtered or unexported fields
}

func NewUI

func NewUI(ctx context.Context, renderer *lipgloss.Renderer, width int, height int, p *pet.Pet, publicKey string) *UI

func (*UI) Init

func (ui *UI) Init() tea.Cmd

func (*UI) Update

func (ui *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*UI) View

func (ui *UI) View() string

Jump to

Keyboard shortcuts

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