Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogging ¶
func ConfigureLogging(cfg *Configuration)
Types ¶
type Configuration ¶
type Configuration struct { Profiles []string `ignored:"true"` Server ServerConfiguration Database DatabaseConfiguration Security SecurityConfiguration Storage StorageConfiguration Index IndexConfiguration }
Configuration holds all the whole application's configuration.
func (Configuration) HasProfile ¶
func (c Configuration) HasProfile(profile string) bool
HasProfile returns a boolean value indicating whether the given profile is active.
func (Configuration) IsProductionMode ¶
func (c Configuration) IsProductionMode() bool
IsProductionMode returns a boolean value indicating whether the applications runs in production mode (having active profile 'production').
type DatabaseConfiguration ¶
type DatabaseConfiguration struct { Type string `default:"sqlite3"` URL string `default:"database.db"` MigrateDatabase bool `default:"true"` }
DatabaseConfiguration holds all configuration values regarding the database.
type IndexConfiguration ¶
type IndexConfiguration struct {
DocumentsPath string `default:"documents.bleve" split_words:"true"`
}
type SecurityConfiguration ¶
type SecurityConfiguration struct { JWTAlgorithm string `default:"HS256" split_words:"true"` JWTSecret []byte `split_words:"true"` JWTExpirationTime time.Duration `default:"5m" split_words:"true"` JWTRefreshTime time.Duration `default:"24h" split_words:"true"` }
SecurityConfiguration holds all configuration values regarding security.
type ServerConfiguration ¶
type ServerConfiguration struct { PublicURL string `default:"http://localhost:8080"` Port int `default:"8080"` }
ServerConfiguration holds all configuration values regarding the HTTP server.
type StorageConfiguration ¶
type StorageConfiguration struct {
DataPath string `default:"data" split_words:"true"`
}
StorageConfiguration holds all configuration values regarding file storage.
Click to show internal directories.
Click to hide internal directories.