def apply()

in app/models/FlexibleStack.scala [17:40]


  def apply(stack: String, stage: String): FlexibleStack = {
    val secondarySuffix = "-secondary"
    val domain = AppConfig.domainFromStage(stage)

    val isSecondary = stack.endsWith(secondarySuffix)

    val suffix = if (isSecondary) secondarySuffix else ""

    val displayName = s"Composer$suffix ($stage)"
    val apiPrefix = if (isSecondary) s"http://apiv2.$stage.$stack.gudiscovery.:8080" else s"http://flexible-api.$stage.$stack.gudiscovery.:8080"
    val composerPrefix = s"https://composer$suffix.$domain"
    val snapshotBucket = s"$stack-snapshotter-${stage.toLowerCase}"

    FlexibleStack(
      s"$stage:$stack",
      displayName,
      stack,
      stage,
      isSecondary,
      apiPrefix,
      composerPrefix,
      snapshotBucket
    )
  }