Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Hostname string `env:"HOSTNAME,required"` Development bool `env:"DEVELOPMENT,default=false"` // LogLevel string `env:"LOG_LEVEL,default=info"` Http HttpConfig }
type Dependencies ¶
type Dependencies struct { Log *logrus.Logger Database database.DB Config *Config Domains struct { Auth domains.AccountsDomain Archiver domains.ArchiverDomain } }
func NewDependencies ¶
type HttpConfig ¶
type HttpConfig struct { Enabled bool `env:"HTTP_ENABLED,default=True"` Port int `env:"HTTP_PORT,default=8080"` Address string `env:"HTTP_ADDRESS,default=:"` RootPath string `env:"HTTP_ROOT_PATH,default=/"` AccessLog bool `env:"HTTP_ACCESS_LOG,default=True"` SecretKey string `env:"HTTP_SECRET_KEY"` // Fiber Specific BodyLimit int `env:"HTTP_BODY_LIMIT,default=1024"` ReadTimeout time.Duration `env:"HTTP_READ_TIMEOUT,default=10s"` WriteTimeout time.Duration `env:"HTTP_WRITE_TIMEOUT,default=10s"` IDLETimeout time.Duration `env:"HTTP_IDLE_TIMEOUT,default=10s"` DisableKeepAlive bool `env:"HTTP_DISABLE_KEEP_ALIVE,default=true"` DisablePreParseMultipartForm bool `env:"HTTP_DISABLE_PARSE_MULTIPART_FORM,default=true"` Routes struct { Bookmark struct { Path string `env:"ROUTES_BOOKMARK_PATH,default=/bookmark"` } Frontend struct { Path string `env:"ROUTES_STATIC_PATH,default=/"` MaxAge time.Duration `env:"ROUTES_STATIC_MAX_AGE,default=720h"` } System struct { Path string `env:"ROUTES_SYSTEM_PATH,default=/system"` } API struct { Path string `env:"ROUTE_API_PATH,default=/api/v1"` } } Storage struct { DataDir string `env:"DATA_DIR"` } }
Click to show internal directories.
Click to hide internal directories.