server

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAddr = "127.0.0.1:8822"
	AppName     = "sshc"
)

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken() (string, error)

Types

type Config

type Config struct {
	Addr     string
	Open     bool
	Readonly bool
	WebDir   string
	Token    string
}

func ValidateConfig

func ValidateConfig(config Config) (Config, error)

type Server

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

func New

func New(config Config) (*Server, error)

func (*Server) Config

func (s *Server) Config() Config

func (*Server) Handler

func (s *Server) Handler() http.Handler

func (*Server) Shutdown

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

func (*Server) Start

func (s *Server) Start(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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