server

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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