{"modulePath":"github.com/sysatom/framework","version":"v0.0.0-20250603095622-116c032940b7","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package config\n\n## Functions\n\n```go\nfunc Load(path ...string)\n```\n\n## Types\n\n```go\ntype Log struct {\n\t// Log level: debug, info, warn, error, fatal, panic\n\tLevel string `json:\"level\" yaml:\"level\" mapstructure:\"level\"`\n}\n```\n\n```go\ntype MySQL struct {\n\t// MySQL DSN\n\tDSN string `json:\"dsn\" yaml:\"dsn\" mapstructure:\"dsn\"`\n\t// MySQL max open connections\n\tMaxOpenConns int `json:\"max_open_conns\" yaml:\"max_open_conns\" mapstructure:\"max_open_conns\"`\n\t// MySQL max idle connections\n\tMaxIdleConns int `json:\"max_idle_conns\" yaml:\"max_idle_conns\" mapstructure:\"max_idle_conns\"`\n\t// MySQL max connection lifetime\n\tConnMaxLifetime int `json:\"conn_max_lifetime\" yaml:\"conn_max_lifetime\" mapstructure:\"conn_max_lifetime\"`\n\t// MySQL max connection lifetime\n\tSQLTime int `json:\"sql_time\" yaml:\"sql_time\" mapstructure:\"sql_time\"`\n}\n```\n\n```go\ntype Redis struct {\n\t// Redis host\n\tHost string `json:\"host\" yaml:\"host\" mapstructure:\"host\"`\n\t// Redis port\n\tPort int `json:\"port\" yaml:\"port\" mapstructure:\"port\"`\n\t// Redis database\n\tDB int `json:\"db\" yaml:\"db\" mapstructure:\"db\"`\n\t// Redis password\n\tPassword string `json:\"password\" yaml:\"pass\" mapstructure:\"password\"`\n}\n```\n\n```go\ntype StoreType struct {\n\t// Maximum number of results to return from adapter.\n\tMaxResults int `json:\"max_results\" yaml:\"max_results\" mapstructure:\"max_results\"`\n\t// MySQL config\n\tMySQL MySQL `json:\"mysql\" yaml:\"mysql\" mapstructure:\"mysql\"`\n}\n```\n\n```go\ntype Type struct {\n\t// HTTP(S) address:port to listen on for websocket and long polling clients. Either a\n\t// numeric or a canonical name, e.g. \":80\" or \":https\". Could include a host name, e.g.\n\t// \"localhost:80\".\n\t// Could be blank: if TLS is not configured, will use \":80\", otherwise \":443\".\n\t// Can be overridden from the command line, see option --listen.\n\tListen string `json:\"listen\" yaml:\"listen\" mapstructure:\"listen\"`\n\t// Base URL path where the streaming and large file API calls are served, default is '/'.\n\t// Can be overridden from the command line, see option --api_path.\n\tApiPath string `json:\"api_path\" yaml:\"api_path\" mapstructure:\"api_path\"`\n\t// App Url\n\tURL string `json:\"url\" yaml:\"url\" mapstructure:\"url\"`\n\t// JWT secret\n\tJWTSecret string `json:\"jwt_secret\" yaml:\"jwt_secret\" mapstructure:\"jwt_secret\"`\n\n\t// Configs for subsystems\n\tStore StoreType    `json:\"store_config\" yaml:\"store_config\" mapstructure:\"store_config\"`\n\tMedia *mediaConfig `json:\"media\" yaml:\"media\" mapstructure:\"media\"`\n\n\t// Redis\n\tRedis Redis `json:\"redis\" yaml:\"redis\" mapstructure:\"redis\"`\n\n\t// Log\n\tLog Log `json:\"log\" yaml:\"log\" mapstructure:\"log\"`\n\n\t// Config for vendors\n\tVendors interface{} `json:\"vendors\" yaml:\"vendors\" mapstructure:\"vendors\"`\n}\n```\nContentx of the configuration file\n\n```go\nvar App Type\n```\n\n```go\nfunc NewConfig() Type\n```\n\n","path":"github.com/sysatom/framework/pkg/config","name":"config","synopsis":"","isRedistributable":true}
