in src/main/scala/com/gu/fastly/Config.scala [22:55]
def load(): Config = {
val properties = loadProperties(
"fastly-cache-purger-config",
"fastly-cache-purger.properties"
) getOrElse sys.error(
"Could not load config file from s3. This lambda will not run."
)
val fastlyDotcomServiceId =
getMandatoryConfig(properties, "fastly.serviceId")
val fastlyDotcomApiKey = getMandatoryConfig(properties, "fastly.apiKey")
val fastlyGuardianAppsServiceId =
getMandatoryConfig(properties, "fastly.apiNextgen.serviceId")
val fastlyMapiServiceId =
getMandatoryConfig(properties, "fastly.MapiServiceId")
val fastlyMapiApiKey = getMandatoryConfig(properties, "fastly.MapiApiKey")
val decachedContentTopic =
getMandatoryConfig(properties, "decached.content.topic")
Config(
fastlyDotcomServiceId,
fastlyMapiServiceId,
fastlyGuardianAppsServiceId,
fastlyDotcomApiKey,
fastlyMapiApiKey,
decachedContentTopic,
getAmpFlusherPrivateKey()
)
}