Documentation
¶
Index ¶
- Variables
- func GetFreePort() (int, error)
- func NewSSHServer(SSHPort int, db *storage.DB, forwarder *Forwarder, emailer *ValTownEmail) *ssh.Server
- type AuthMiddleware
- type Email
- type ErrorPayload
- type ErrorResponse
- type Forwarder
- type ListAppsResponse
- type LoginParams
- type LoginResponse
- type RootHandler
- type SignupParams
- type SignupResponse
- type SubdomainHandler
- type UserResponse
- type ValTownEmail
- type VerifyEmailParams
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ContextKeyEmail = &contextKey{"email"}
)
Functions ¶
func GetFreePort ¶
GetFreePort asks the kernel for a free open port that is ready to use.
func NewSSHServer ¶
Types ¶
type AuthMiddleware ¶
type AuthMiddleware struct {
// contains filtered or unexported fields
}
func NewAuthMiddleware ¶
func NewAuthMiddleware(handler http.Handler, db *storage.DB) *AuthMiddleware
func (*AuthMiddleware) ServeHTTP ¶
func (me *AuthMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ErrorPayload ¶
type ErrorPayload struct {
Message string
}
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
type Forwarder ¶
Forwarder can be enabled by creating a Forwarder and adding the HandleSSHRequest callback to the server's RequestHandlers under tcpip-forward and cancel-tcpip-forward.
func NewForwarder ¶
func (*Forwarder) HandleSSHRequest ¶
type ListAppsResponse ¶
type ListAppsResponse struct {
Apps []string
}
type LoginParams ¶
type LoginParams struct {
Email string
}
type LoginResponse ¶
type LoginResponse struct {
Username string
}
type RootHandler ¶
type RootHandler struct {
// contains filtered or unexported fields
}
func NewRootHandler ¶
func NewRootHandler(db *storage.DB, forwarder *Forwarder) *RootHandler
func (*RootHandler) ServeHTTP ¶
func (me *RootHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type SignupParams ¶
type SignupResponse ¶
type SignupResponse struct {
Username string
}
type SubdomainHandler ¶
type SubdomainHandler struct {
// contains filtered or unexported fields
}
func NewSubdomainHandler ¶
func NewSubdomainHandler(db *storage.DB, forwarder *Forwarder) *SubdomainHandler
func (*SubdomainHandler) ServeHTTP ¶
func (me *SubdomainHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type UserResponse ¶
type ValTownEmail ¶
type ValTownEmail struct {
// contains filtered or unexported fields
}
func NewValTownEmail ¶
func NewValTownEmail(token string) *ValTownEmail
func (*ValTownEmail) SendEmail ¶
func (me *ValTownEmail) SendEmail(email Email) error
type VerifyEmailParams ¶
type VerifyEmailParams struct {
Code string
}
Click to show internal directories.
Click to hide internal directories.