Documentation
¶
Index ¶
- Variables
- func BuildURL(r *http.Request, fragments ...string) *url.URL
- func CalculateExpirationTime(hours int) string
- func CleanTempFile(file *os.File)
- func HashPassword(password string) (string, error)
- func ParseExpirationHours(expirationStr string) int
- func SanitizeFilename(filename string) string
- func ShowInline(contentType string) bool
- func SitePasswordMiddleware(sitePasswordHash string) func(http.Handler) http.Handler
- func ValidateContentType(h http.Header) bool
- func VerifyPassword(password, hashedPassword string) (bool, error)
- type FileUploadResponse
- type OptionFn
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var StaticFS embed.FS
View Source
var TemplatesFS embed.FS
Functions ¶
func CalculateExpirationTime ¶ added in v0.10.0
CalculateExpirationTime calculates expiration time from current time plus hours
func CleanTempFile ¶
func HashPassword ¶ added in v0.10.0
HashPassword creates an Argon2id hash of the password
func ParseExpirationHours ¶ added in v0.10.0
ParseExpirationHours parses expiration from form value and returns hours as int Returns default of 24 hours (1 day) if invalid or not provided
func SanitizeFilename ¶
func ShowInline ¶
func SitePasswordMiddleware ¶ added in v0.7.0
func ValidateContentType ¶
func VerifyPassword ¶ added in v0.10.0
VerifyPassword verifies a password against its Argon2id hash
Types ¶
type FileUploadResponse ¶ added in v0.10.0
type OptionFn ¶
type OptionFn func(*Server)
func MaxRequests ¶ added in v0.5.0
func MaxUploadSize ¶
func SitePassword ¶ added in v0.7.0
func UseStorage ¶
Click to show internal directories.
Click to hide internal directories.