All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mill.contrib.gitlab.GitlabAuthHeaders.scala Maven / Gradle / Ivy

There is a newer version: 0.12.2-20-231ff6
Show newest version
package mill.contrib.gitlab

/**
 * Actual headers to inject to http requests to gitlab.
 *
 * @param headers header -> value pairs
 */
case class GitlabAuthHeaders(headers: Seq[(String, String)])

object GitlabAuthHeaders {
  def apply(header: String, value: String): GitlabAuthHeaders =
    GitlabAuthHeaders(Seq(header -> value))

  def privateToken(token: String): GitlabAuthHeaders = GitlabAuthHeaders("Private-Token", token)
  def deployToken(token: String): GitlabAuthHeaders = GitlabAuthHeaders("Deploy-Token", token)
  def jobToken(token: String): GitlabAuthHeaders = GitlabAuthHeaders("Job-Token", token)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy