Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultTLS = false DefaultAuth = false DefaultCert = "cert.pem" DefaultKey = "key.pem" DefaultAddress = "0.0.0.0" DefaultPort = 0 DefaultPrefix = "/" DefaultLogFormat = "console" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Permissions `mapstructure:",squash"` Debug bool Address string Port int TLS bool Cert string Key string Prefix string NoSniff bool LogFormat string `mapstructure:"log_format"` Auth bool CORS CORS Users []User }
func ParseConfig ¶ added in v4.3.0
type Permissions ¶ added in v4.3.0
func (Permissions) Allowed ¶ added in v4.3.0
func (p Permissions) Allowed(r *http.Request) bool
Allowed checks if the user has permission to access a directory/file
func (*Permissions) Validate ¶ added in v4.3.0
func (p *Permissions) Validate() error
Click to show internal directories.
Click to hide internal directories.