class Amber::Configuration::AppConfig

Included Modules

Defined in:

amber/configuration/app_config.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]
def self.new #

[View source]

Instance Method Detail

def custom(key : Symbol, type : T.class) : T forall T #

Retrieve a registered custom configuration section by key and type.

Example

stripe = Amber.settings.custom(:stripe, MyApp::StripeConfig)
stripe.api_key # => "sk_test_..."

[View source]
def custom_configs : Hash(String, YAML::Serializable) #

Custom configuration sections loaded at runtime.


[View source]
def custom_configs=(custom_configs : Hash(String, YAML::Serializable)) #

Custom configuration sections loaded at runtime.


[View source]
def database : DatabaseConfig #

[View source]
def database=(database : DatabaseConfig) #

[View source]
def jobs : JobsConfig #

[View source]
def jobs=(jobs : JobsConfig) #

[View source]
def logging : LoggingConfig #

[View source]
def logging=(logging : LoggingConfig) #

[View source]
def mailer : MailerConfig #

[View source]
def mailer=(mailer : MailerConfig) #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def pubsub : PubSubConfig #

[View source]
def pubsub=(pubsub : PubSubConfig) #

[View source]
def secrets : Hash(String, String) #

[View source]
def secrets=(secrets : Hash(String, String)) #

[View source]
def server : ServerConfig #

[View source]
def server=(server : ServerConfig) #

[View source]
def session : SessionConfig #

[View source]
def session=(session : SessionConfig) #

[View source]
def static : StaticConfig #

[View source]
def static=(static : StaticConfig) #

[View source]
def validate!(environment : Amber::Environment::Env | Nil = nil) : Nil #

Run validation on all subsystem configurations. Collects all errors and raises a single ConfigurationError if any are found.


[View source]