com.gu.permissions.PermissionsConfig.scala Maven / Gradle / Ivy
package com.gu.permissions
import com.amazonaws.auth.AWSCredentialsProvider
import scala.concurrent.duration._
case class PermissionsConfig(
stage: String,
region: String,
awsCredentials: AWSCredentialsProvider,
s3Bucket: String = "permissions-cache",
s3PermissionsFile: String = "permissions.json",
refreshFrequency: FiniteDuration = 1.minute
)
object PermissionsConfig {
def getPermissionsFileKey(config: PermissionsConfig): String = {
s"${config.stage}/${config.s3PermissionsFile}"
}
}