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

io.github.kijuky.zio.jira.JiraIssueRepo.scala Maven / Gradle / Ivy

There is a newer version: 1.2.4
Show newest version
package io.github.kijuky.zio.jira

import com.atlassian.jira.rest.client.api.domain.input.IssueInput
import zio.*

trait JiraIssueRepo {
  def list(filterId: Long): Task[Seq[JiraIssue]]
  def list(jql: String): Task[Seq[JiraIssue]]
  def save(issue: JiraIssue): Task[Unit]
}

object JiraIssueRepo {
  def list(filterId: Long): RIO[JiraIssueRepo, Seq[JiraIssue]] =
    ZIO.serviceWithZIO(_.list(filterId))
  def list(jql: String): RIO[JiraIssueRepo, Seq[JiraIssue]] =
    ZIO.serviceWithZIO(_.list(jql))
  def save(issue: JiraIssue): RIO[JiraIssueRepo, Unit] =
    ZIO.serviceWith(_.save(issue))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy