Class/Object

nelson.storage

H2Storage

Related Docs: object H2Storage | package storage

Permalink

final case class H2Storage(xa: doobie.Transactor[IO]) extends ~>[StoreOp, IO] with Product with Serializable

Source
h2.scala
Linear Supertypes
Product, Equals, FunctionK[StoreOp, IO], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. H2Storage
  2. Product
  3. Equals
  4. FunctionK
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new H2Storage(xa: doobie.Transactor[IO])

    Permalink

Type Members

  1. type AuditRow = (ID, Instant, Option[Long], String, String, String, Option[String])

    Permalink
  2. type BlueprintRow = (GUID, String, Option[String], Option[Sha256], Long, String, Instant)

    Permalink
  3. type DeploymentRow = (ID, ID, ID, String, Instant, WorkflowRef, PlanRef, GUID, ExpirationPolicyRef, Option[String])

    Permalink
  4. type DeploymentWithStatusRow = (ID, ID, ID, String, Instant, WorkflowRef, PlanRef, GUID, ExpirationPolicyRef, Option[String], DeploymentStatusString)

    Permalink
  5. type LoadbalancerRow = (ID, ID, String, ID, String, MajorVersion, Instant, GUID, String)

    Permalink
  6. case class ReleaseRow(slug: Slug, version: Version, timestamp: Instant, releaseId: Long, releaseHtmlUrl: URI, unitName: String, namespace: String, hash: String, deployid: Long, deployTimestamp: Instant, deployStatus: DeploymentStatus, deployGuid: GUID) extends Product with Serializable

    Permalink
  7. type ReleaseTuple = (String, String, Instant, Option[Long], Option[String], Option[String], String, String, Long, Instant, Option[String], GUID)

    Permalink
  8. type RouteRow = (Int, String, String, String, String)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addUnit(vunit: @@[UnitDef, Versioned], repo_id: ID): doobie.ConnectionIO[Unit]

    Permalink
  5. def and[H[_]](h: FunctionK[StoreOp, H]): FunctionK[StoreOp, [γ$4$]Tuple2K[IO, H, γ$4$]]

    Permalink
    Definition Classes
    FunctionK
  6. def andThen[H[_]](f: FunctionK[IO, H]): FunctionK[StoreOp, H]

    Permalink
    Definition Classes
    FunctionK
  7. def apply[A](s: StoreOp[A]): IO[A]

    Permalink
    Definition Classes
    H2Storage → FunctionK
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def audit[A](event: AuditEvent[A]): doobie.ConnectionIO[ID]

    Permalink
  10. def auditLogFromRow(row: AuditRow): AuditLog

    Permalink
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def compose[E[_]](f: FunctionK[E, StoreOp]): FunctionK[E, IO]

    Permalink
    Definition Classes
    FunctionK
  13. def countDeploymentsByStatus(since: Long): doobie.ConnectionIO[List[(String, Int)]]

    Permalink
  14. def createDatacenter(dc: Datacenter): doobie.ConnectionIO[Unit]

    Permalink
  15. def createDeployment(unitId: ID, hash: String, namespace: Namespace, wf: WorkflowRef, plan: PlanRef, expPolicy: String): doobie.ConnectionIO[ID]

    Permalink

  16. def createDeploymentExpiration(id: ID, exp: Instant): doobie.ConnectionIO[ID]

    Permalink
  17. def createDeploymentResource(deploymentId: ID, name: String, uri: URI): doobie.ConnectionIO[ID]

    Permalink
  18. def createDeploymentStatus(id: ID, status: DeploymentStatus, msg: Option[String]): doobie.ConnectionIO[Unit]

    Permalink

  19. def createManualDeployment(datacenter: Datacenter, namespace: NamespaceName, serviceType: String, version: String, hash: String, description: String, port: Int, exp: Instant): doobie.ConnectionIO[GUID]

    Permalink
  20. def createNamespace(dc: String, name: NamespaceName): doobie.ConnectionIO[ID]

    Permalink

    datacenter is the primary key and here acts as a forigen key for namespaces.

    datacenter is the primary key and here acts as a forigen key for namespaces. We never want two datacenters with the same name.

  21. def createRelease(r: DeploymentEvent): doobie.ConnectionIO[Unit]

    Permalink

  22. def createTrafficShift(nsid: ID, to: Deployment, policy: TrafficShiftPolicy, dur: FiniteDuration): doobie.ConnectionIO[ID]

    Permalink
  23. def deleteAndThenCreateExpiration(id: ID, exp: Instant): doobie.ConnectionIO[ID]

    Permalink
  24. def deleteExpirations(id: ID): doobie.ConnectionIO[Int]

    Permalink
  25. def deleteLoadbalancerDeployment(lbid: ID): doobie.ConnectionIO[Int]

    Permalink
  26. def deleteRepositories(repos: NonEmptyList[Repo]): doobie.ConnectionIO[Unit]

    Permalink
  27. def deploymentFromRow(row: DeploymentRow): doobie.ConnectionIO[Deployment]

    Permalink
  28. def deploymentWithStatusFromRow(row: DeploymentWithStatusRow): doobie.ConnectionIO[(Deployment, DeploymentStatus)]

    Permalink
  29. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  30. def fetchDeployments(sql: doobie.ConnectionIO[List[DeploymentRow]]): doobie.ConnectionIO[Set[Deployment]]

    Permalink
  31. def fetchDeploymentsWithStatuses(sql: doobie.ConnectionIO[List[DeploymentWithStatusRow]]): doobie.ConnectionIO[Set[(Deployment, DeploymentStatus)]]

    Permalink
  32. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  33. def findBlueprint(name: String, revision: Revision): doobie.ConnectionIO[Option[Blueprint]]

    Permalink

    Use cases exist for fetching a single, discrete revision of a blueprint and also generically fetching whatever the latest might be.

    Use cases exist for fetching a single, discrete revision of a blueprint and also generically fetching whatever the latest might be. In this way, we funnel all that through a single function that either uses a different constraint to get a single record, or in the latter case, sorts by descending revision and picks the head record.

  34. def findDeployment(stackName: StackName): doobie.ConnectionIO[Option[Deployment]]

    Permalink
  35. def findDeploymentExpiration(id: ID): doobie.ConnectionIO[Option[Instant]]

    Permalink
  36. def findLastReleaseDeploymentStatus(r: Slug, u: UnitName): doobie.ConnectionIO[Option[DeploymentStatus]]

    Permalink

  37. def findLoadbalancerDeployment(name: String, v: MajorVersion, nsid: ID): doobie.ConnectionIO[Option[LoadbalancerDeployment]]

    Permalink
  38. def findRelease(id: Long): doobie.ConnectionIO[SortedMap[Released, List[ReleasedDeployment]]]

    Permalink

  39. def findReleaseByDeploymentGuid(guid: GUID): doobie.ConnectionIO[Option[(Released, ReleasedDeployment)]]

    Permalink

    Given a deployment ID, find all the associated gubbins.

  40. def findReleasedByUnitNameAndVersion(un: UnitName, v: Version): doobie.ConnectionIO[Option[Released]]

    Permalink
  41. def findRepository(u: User, slug: Slug): doobie.ConnectionIO[Option[Repo]]

    Permalink

    Fetch a single repository based on the supplied slug.

  42. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  43. def getCurrentTargetForServiceName(ns: ID, sn: ServiceName): doobie.ConnectionIO[Option[Target]]

    Permalink

    This will first try to find a traffic shift, if none is found, it will try to find the latest matching deployment

  44. def getDeployment(id: ID): doobie.ConnectionIO[Deployment]

    Permalink
  45. def getDeploymentByGuid(guid: GUID): doobie.ConnectionIO[Option[Deployment]]

    Permalink
  46. def getDeploymentResources(id: ID): doobie.ConnectionIO[Set[(String, URI)]]

    Permalink
  47. def getDeploymentStatus(id: ID): doobie.ConnectionIO[Option[DeploymentStatus]]

    Permalink
  48. def getDeploymentsForServiceNameByStatus(sn: ServiceName, ns: ID, status: NonEmptyList[DeploymentStatus]): doobie.ConnectionIO[List[Deployment]]

    Permalink
  49. def getLatestReleaseForLoadbalancer(name: String, mv: MajorVersion): doobie.ConnectionIO[Option[Released]]

    Permalink
  50. def getLoadbalancer(name: String, v: MajorVersion): doobie.ConnectionIO[Option[DCLoadbalancer]]

    Permalink
  51. def getLoadbalancerDeployment(id: ID): doobie.ConnectionIO[Option[LoadbalancerDeployment]]

    Permalink
  52. def getLoadbalancerDeploymentByGUID(guid: GUID): doobie.ConnectionIO[Option[LoadbalancerDeployment]]

    Permalink
  53. def getLoadbalancerRoutes(id: ID): doobie.ConnectionIO[Vector[Route]]

    Permalink
  54. def getMostAndLeastDeployed(since: Long, number: Int, sortOrder: String): doobie.ConnectionIO[List[(String, Int)]]

    Permalink
  55. def getNamespace(dc: String, nsName: NamespaceName): doobie.ConnectionIO[Option[Namespace]]

    Permalink
  56. def getNamespaceByID(id: ID): doobie.ConnectionIO[Namespace]

    Permalink
  57. def getTrafficShiftForServiceName(ns: ID, sn: ServiceName): doobie.ConnectionIO[Option[TrafficShift]]

    Permalink
  58. def getUnit(name: String, version: Version): doobie.ConnectionIO[Option[DCUnit]]

    Permalink
  59. def getUnitById(id: ID): doobie.ConnectionIO[DCUnit]

    Permalink
  60. def getUnitDependencies(id: ID): doobie.ConnectionIO[Set[ServiceName]]

    Permalink
  61. def getUnitResources(id: ID): doobie.ConnectionIO[Set[String]]

    Permalink
  62. def insertBlueprint(name: String, description: Option[String], sha256: Sha256, template: String): doobie.ConnectionIO[ID]

    Permalink
  63. def insertLoadbalancer(lb: Loadbalancer, version: MajorVersion, repoId: ID): doobie.ConnectionIO[ID]

    Permalink
  64. def insertLoadbalancerDeployment(lbid: ID, nsid: ID, hash: String, address: String): doobie.ConnectionIO[ID]

    Permalink
  65. def insertLoadbalancerIfAbsent(lbv: @@[Loadbalancer, Versioned], repoId: ID): doobie.ConnectionIO[ID]

    Permalink
  66. def insertOrUpdateRepositories(list: List[Repo]): doobie.ConnectionIO[Unit]

    Permalink

    Does what it says on the function.

  67. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  68. def killRelease(slug: Slug, version: String): doobie.ConnectionIO[Either[Throwable, Unit]]

    Permalink
  69. def linkRepositoriesToUser(list: List[Repo], u: User): doobie.ConnectionIO[Unit]

    Permalink

    Given a set of repositories, associate them with a specific user.

    Given a set of repositories, associate them with a specific user. This is used when we are syncing repositories at the behence of a user.

  70. def listAuditLog(limit: Long, offset: Long, action: Option[String], category: Option[String]): doobie.ConnectionIO[List[AuditLog]]

    Permalink
  71. def listAuditLogByReleaseId(limit: Long, offset: Long, releaseId: Long): doobie.ConnectionIO[List[AuditLog]]

    Permalink
  72. val listBlueprints: doobie.ConnectionIO[List[Blueprint]]

    Permalink

    Fetches the latest blueprint revision for every known blueprint.

    Fetches the latest blueprint revision for every known blueprint. The idea here is to provide insight into what blueprints exist in the system; given we have the inspection API for checking specific revisions, simply showing what's available and a pointer to the latest revision, should be informative enough.

  73. def listDatacenters: doobie.ConnectionIO[Set[String]]

    Permalink
  74. def listDeploymentStatuses(id: ID): doobie.ConnectionIO[List[(DeploymentStatus, Option[StatusMessage], Instant)]]

    Permalink

  75. def listDeploymentsForDatacenter(dc: String): doobie.ConnectionIO[Set[Deployment]]

    Permalink

  76. def listDeploymentsForNamespaceByStatus(ns: ID, stats: NonEmptyList[DeploymentStatus], unit: Option[UnitName] = None): doobie.ConnectionIO[Set[(Deployment, DeploymentStatus)]]

    Permalink
  77. def listDeploymentsForUnitByStatus(nsid: ID, name: UnitName, stats: NonEmptyList[DeploymentStatus]): doobie.ConnectionIO[Set[Deployment]]

    Permalink

  78. def listLoadbalancerDeploymentsForNamespace(nsid: ID): doobie.ConnectionIO[Vector[LoadbalancerDeployment]]

    Permalink
  79. def listNamespacesForDatacenter(dc: String): doobie.ConnectionIO[Set[Namespace]]

    Permalink
  80. def listRecentReleasesForRepository(slug: Slug): doobie.ConnectionIO[SortedMap[Released, List[ReleasedDeployment]]]

    Permalink

  81. def listReleases(limit: Int): doobie.ConnectionIO[SortedMap[Released, List[ReleasedDeployment]]]

    Permalink

  82. def listRepositories(u: User): doobie.ConnectionIO[List[Repo]]

    Permalink

    Fetch all repositories for a given user.

  83. def listRepositoriesWithActiveHooks(u: User): doobie.ConnectionIO[List[Repo]]

    Permalink

    List all the repositories the user has access too that have webhooks enabled.

  84. def listRepositoriesWithOwner(u: User, owner: String): doobie.ConnectionIO[List[Repo]]

    Permalink

    Fetch all repositories for a given owner, that the specified user has access too.

  85. def listShiftableDeployments(unit: UnitDef, ns: ID): doobie.ConnectionIO[List[Deployment]]

    Permalink
  86. def listUnitsByStatus(nsid: ID, statuses: NonEmptyList[DeploymentStatus]): doobie.ConnectionIO[Vector[(GUID, ServiceName)]]

    Permalink
  87. val log: Logger

    Permalink
  88. implicit val metaFeatureVersion: doobie.Meta[FeatureVersion]

    Permalink
  89. implicit val metaFiniteDuration: doobie.Meta[FiniteDuration]

    Permalink
  90. implicit val metaInstant: doobie.Meta[Instant]

    Permalink
  91. implicit val metaMajorVersion: doobie.Meta[MajorVersion]

    Permalink
  92. implicit val metaVersion: doobie.Meta[Version]

    Permalink
  93. implicit val namespaceName: doobie.Meta[NamespaceName]

    Permalink
  94. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  95. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  96. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  97. def or[H[_]](h: FunctionK[H, IO]): FunctionK[[γ$1$]EitherK[StoreOp, H, γ$1$], IO]

    Permalink
    Definition Classes
    FunctionK
  98. def reverseTrafficShift(toID: ID, rev: Instant): doobie.ConnectionIO[Option[ID]]

    Permalink
  99. def rowToReleased(row: (String, String, Instant, Long, String)): Option[Released]

    Permalink
  100. def startTrafficShift(from: ID, to: ID, st: Instant): doobie.ConnectionIO[Option[ID]]

    Permalink
  101. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  102. def unitDependencies(id: ID): doobie.ConnectionIO[Set[ServiceName]]

    Permalink
  103. def unitPorts(id: ID): doobie.ConnectionIO[Set[Port]]

    Permalink
  104. def verifyDeployable(dcName: String, ns: NamespaceName, unit: UnitDef): doobie.ConnectionIO[ValidatedNel[NelsonError, Unit]]

    Permalink
  105. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  106. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  107. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  108. val xa: doobie.Transactor[IO]

    Permalink

Inherited from Product

Inherited from Equals

Inherited from FunctionK[StoreOp, IO]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped