Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidKey = errors.New("invalid auth key")
ErrInvalidKey is returned when an authorization is is invalid or does not have sufficient privilege.
var ErrInvalidPort = errors.New("invalid port number")
ErrInvalidPort is returned when
var ErrInvalidSessionID = errors.New("invalid session ID")
ErrInvalidSessionID is returned when a requested session ID is not found.
var ErrMissingKey = errors.New("missing auth key")
ErrMissingKey is returned when a request to an privileged resource does not contain an authorization key.
Functions ¶
func Error ¶
Error responds to client with an error. The error is logged and translated to proper HTTP status response.
Types ¶
type Action ¶
type Action struct {
// contains filtered or unexported fields
}
Action takes HTTP requests and serves tunneling service.
func (*Action) GetServicePort ¶
GetServicePort handles port binding request, backed by given service.
func (*Action) GetSession ¶
GetSession handles GET /session/:id request.
func (*Action) GetTCPPort ¶
GetTCPPort handles GET /tcp/:port request, backed by tcp.Binder.
func (*Action) GetUDPPort ¶
GetUDPPort handles GET /udp/:port request, backed by udp.Binder.