Versions in this module Expand all Collapse all v0 v0.2.0 Jun 8, 2024 Changes in this version + var ContextKeyEmail = &contextKey + func GetFreePort() (int, error) + func NewSSHServer(SSHPort int, db *storage.DB, forwarder *Forwarder, emailer *ValTownEmail) *ssh.Server + type AuthMiddleware struct + func NewAuthMiddleware(handler http.Handler, db *storage.DB) *AuthMiddleware + func (me *AuthMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Email struct + Bcc string + Cc string + From string + Html string + Subject string + Text string + To string + type ErrorPayload struct + Message string + type ErrorResponse struct + Message string + type Forwarder struct + func NewForwarder(db *storage.DB) *Forwarder + func (me *Forwarder) HandleSSHRequest(ctx ssh.Context, srv *ssh.Server, req *gossh.Request) (bool, []byte) + func (me *Forwarder) SendRequest(user string, reqType string, payload []byte) (bool, []byte, error) + type ListAppsResponse struct + Apps []string + type LoginParams struct + Email string + type LoginResponse struct + Username string + type RootHandler struct + func NewRootHandler(db *storage.DB, forwarder *Forwarder) *RootHandler + func (me *RootHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type SignupParams struct + Email string + Username string + type SignupResponse struct + Username string + type SubdomainHandler struct + func NewSubdomainHandler(db *storage.DB, forwarder *Forwarder) *SubdomainHandler + func (me *SubdomainHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type UserResponse struct + Email string + ID string + Name string + type ValTownEmail struct + func NewValTownEmail(token string) *ValTownEmail + func (me *ValTownEmail) SendEmail(email Email) error + type VerifyEmailParams struct + Code string