Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Server: struct { Host string `json:"host"` Port int `json:"port"` }{ Host: "localhost", Port: 8080, }, Database: struct { RegistryPath string `json:"registry_path"` DataDir string `json:"data_dir"` }{ RegistryPath: "data/registry.db", DataDir: "data/databases", }, Auth: struct { Secret string `json:"secret"` TokenExpiry int `json:"token_expiry"` }{ Secret: "change-me-in-production", TokenExpiry: 24, }, }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Server struct {
Host string `json:"host"`
Port int `json:"port"`
} `json:"server"`
Database struct {
RegistryPath string `json:"registry_path"`
DataDir string `json:"data_dir"`
} `json:"database"`
Auth struct {
Secret string `json:"secret"`
TokenExpiry int `json:"token_expiry"` // in hours
} `json:"auth"`
}
func LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.