Documentation ¶
Overview ¶
Package server serves a web interface for interacting with dotfiles stored in a database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Addr string // Address to listen at. DBPath string // The path to store the sqlite database file. Secure bool // Tell the server code that the host is using https. ProxyHeaders bool // Sets request IP from reverse proxy headers. Host string // Overrides http.Request.Host when not empty. SMTP *SMTPConfig // Sets up a SMTP Client SMTPConfigPath string // Sets SMTP from this file's JSON when not empty. }
Config configures the server.
type Page ¶
type Page struct { Title string SuccessMessage string ErrorMessage string Links []Link Vars map[string]string Data map[string]interface{} Table *db.HTMLTable Session *db.UserSession // contains filtered or unexported fields }
Page renders pages and tracks request state. Exported fields/methods may be used within templates.
func (*Page) Owned ¶
Owned returns whether the logged in user owns the page. Pages without the {username} var are owned by every user.
func (*Page) UserCreatedAt ¶
UserCreatedAt returns the logged in user's creation date.
Click to show internal directories.
Click to hide internal directories.