Documentation
¶
Overview ¶
Package config provides FileBrowser-specific configuration.
Package config provides FileBrowser-specific configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
sharedconfig.Config `yaml:",inline"`
// InstanceURL is the FileBrowser server URL (e.g., "http://localhost:8080").
InstanceURL string `yaml:"instance_url"`
// Username is the FileBrowser username.
Username string `yaml:"username"`
// Password is the FileBrowser password (supports ${ENV_VAR} interpolation).
Password string `yaml:"password"`
// DefaultExpires is the default expiration time for shares.
DefaultExpires int `yaml:"default_expires"`
// DefaultUnit is the default time unit for expiration (s, m, h, d).
DefaultUnit string `yaml:"default_unit"`
}
Config is the FileBrowser-specific configuration. It embeds the shared Config and adds FileBrowser-specific fields.
func LoadFromBytes ¶
LoadFromBytes parses a YAML config into c.
type TokenData ¶
type TokenData struct {
// Token is the JWT token.
Token string `json:"token"`
// SavedAt is when the token was saved.
SavedAt time.Time `json:"saved_at"`
// ExpiresAt is when the token expires (optional, from JWT).
ExpiresAt time.Time `json:"expires_at,omitempty"`
}
TokenData represents the saved authentication token.
Click to show internal directories.
Click to hide internal directories.