final case class H2Storage(xa: doobie.Transactor[IO]) extends ~>[StoreOp, IO] with Product with Serializable
- Source
- h2.scala
- Alphabetic
- By Inheritance
- H2Storage
- Product
- Equals
- FunctionK
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new H2Storage(xa: doobie.Transactor[IO])
Type Members
- type AuditRow = (ID, Instant, Option[Long], String, String, String, Option[String])
- type BlueprintRow = (GUID, String, Option[String], Option[Sha256], Long, String, Instant)
- type DeploymentRow = (ID, ID, ID, String, Instant, WorkflowRef, PlanRef, GUID, ExpirationPolicyRef, Option[String])
- type DeploymentWithStatusRow = (ID, ID, ID, String, Instant, WorkflowRef, PlanRef, GUID, ExpirationPolicyRef, Option[String], DeploymentStatusString)
- type LoadbalancerRow = (ID, ID, String, ID, String, MajorVersion, Instant, GUID, String)
- 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
- type ReleaseTuple = (String, String, Instant, Option[Long], Option[String], Option[String], String, String, Long, Instant, Option[String], GUID)
- type RouteRow = (Int, String, String, String, String)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addUnit(vunit: @@[UnitDef, Versioned], repo_id: ID): doobie.ConnectionIO[Unit]
-
def
and[H[_]](h: FunctionK[StoreOp, H]): FunctionK[StoreOp, [γ$4$]Tuple2K[IO, H, γ$4$]]
- Definition Classes
- FunctionK
-
def
andThen[H[_]](f: FunctionK[IO, H]): FunctionK[StoreOp, H]
- Definition Classes
- FunctionK
-
def
apply[A](s: StoreOp[A]): IO[A]
- Definition Classes
- H2Storage → FunctionK
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def audit[A](event: AuditEvent[A]): doobie.ConnectionIO[ID]
- def auditLogFromRow(row: AuditRow): AuditLog
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
compose[E[_]](f: FunctionK[E, StoreOp]): FunctionK[E, IO]
- Definition Classes
- FunctionK
- def countDeploymentsByStatus(since: Long): doobie.ConnectionIO[List[(String, Int)]]
- def createDatacenter(dc: Datacenter): doobie.ConnectionIO[Unit]
- def createDeployment(unitId: ID, hash: String, namespace: Namespace, wf: WorkflowRef, plan: PlanRef, expPolicy: String): doobie.ConnectionIO[ID]
- def createDeploymentExpiration(id: ID, exp: Instant): doobie.ConnectionIO[ID]
- def createDeploymentResource(deploymentId: ID, name: String, uri: URI): doobie.ConnectionIO[ID]
- def createDeploymentStatus(id: ID, status: DeploymentStatus, msg: Option[String]): doobie.ConnectionIO[Unit]
- def createManualDeployment(datacenter: Datacenter, namespace: NamespaceName, serviceType: String, version: String, hash: String, description: String, port: Int, exp: Instant): doobie.ConnectionIO[GUID]
-
def
createNamespace(dc: String, name: NamespaceName): doobie.ConnectionIO[ID]
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. - def createRelease(r: DeploymentEvent): doobie.ConnectionIO[Unit]
- def createTrafficShift(nsid: ID, to: Deployment, policy: TrafficShiftPolicy, dur: FiniteDuration): doobie.ConnectionIO[ID]
- def deleteAndThenCreateExpiration(id: ID, exp: Instant): doobie.ConnectionIO[ID]
- def deleteExpirations(id: ID): doobie.ConnectionIO[Int]
- def deleteLoadbalancerDeployment(lbid: ID): doobie.ConnectionIO[Int]
- def deleteRepositories(repos: NonEmptyList[Repo]): doobie.ConnectionIO[Unit]
- def deploymentFromRow(row: DeploymentRow): doobie.ConnectionIO[Deployment]
- def deploymentWithStatusFromRow(row: DeploymentWithStatusRow): doobie.ConnectionIO[(Deployment, DeploymentStatus)]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def fetchDeployments(sql: doobie.ConnectionIO[List[DeploymentRow]]): doobie.ConnectionIO[Set[Deployment]]
- def fetchDeploymentsWithStatuses(sql: doobie.ConnectionIO[List[DeploymentWithStatusRow]]): doobie.ConnectionIO[Set[(Deployment, DeploymentStatus)]]
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
findBlueprint(name: String, revision: Revision): doobie.ConnectionIO[Option[Blueprint]]
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.
- def findDeployment(stackName: StackName): doobie.ConnectionIO[Option[Deployment]]
- def findDeploymentExpiration(id: ID): doobie.ConnectionIO[Option[Instant]]
- def findLastReleaseDeploymentStatus(r: Slug, u: UnitName): doobie.ConnectionIO[Option[DeploymentStatus]]
- def findLoadbalancerDeployment(name: String, v: MajorVersion, nsid: ID): doobie.ConnectionIO[Option[LoadbalancerDeployment]]
- def findRelease(id: Long): doobie.ConnectionIO[SortedMap[Released, List[ReleasedDeployment]]]
-
def
findReleaseByDeploymentGuid(guid: GUID): doobie.ConnectionIO[Option[(Released, ReleasedDeployment)]]
Given a deployment ID, find all the associated gubbins.
- def findReleasedByUnitNameAndVersion(un: UnitName, v: Version): doobie.ConnectionIO[Option[Released]]
-
def
findRepository(u: User, slug: Slug): doobie.ConnectionIO[Option[Repo]]
Fetch a single repository based on the supplied slug.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getCurrentTargetForServiceName(ns: ID, sn: ServiceName): doobie.ConnectionIO[Option[Target]]
This will first try to find a traffic shift, if none is found, it will try to find the latest matching deployment
- def getDeployment(id: ID): doobie.ConnectionIO[Deployment]
- def getDeploymentByGuid(guid: GUID): doobie.ConnectionIO[Option[Deployment]]
- def getDeploymentResources(id: ID): doobie.ConnectionIO[Set[(String, URI)]]
- def getDeploymentStatus(id: ID): doobie.ConnectionIO[Option[DeploymentStatus]]
- def getDeploymentsForServiceNameByStatus(sn: ServiceName, ns: ID, status: NonEmptyList[DeploymentStatus]): doobie.ConnectionIO[List[Deployment]]
- def getLatestReleaseForLoadbalancer(name: String, mv: MajorVersion): doobie.ConnectionIO[Option[Released]]
- def getLoadbalancer(name: String, v: MajorVersion): doobie.ConnectionIO[Option[DCLoadbalancer]]
- def getLoadbalancerDeployment(id: ID): doobie.ConnectionIO[Option[LoadbalancerDeployment]]
- def getLoadbalancerDeploymentByGUID(guid: GUID): doobie.ConnectionIO[Option[LoadbalancerDeployment]]
- def getLoadbalancerRoutes(id: ID): doobie.ConnectionIO[Vector[Route]]
- def getMostAndLeastDeployed(since: Long, number: Int, sortOrder: String): doobie.ConnectionIO[List[(String, Int)]]
- def getNamespace(dc: String, nsName: NamespaceName): doobie.ConnectionIO[Option[Namespace]]
- def getNamespaceByID(id: ID): doobie.ConnectionIO[Namespace]
- def getTrafficShiftForServiceName(ns: ID, sn: ServiceName): doobie.ConnectionIO[Option[TrafficShift]]
- def getUnit(name: String, version: Version): doobie.ConnectionIO[Option[DCUnit]]
- def getUnitById(id: ID): doobie.ConnectionIO[DCUnit]
- def getUnitDependencies(id: ID): doobie.ConnectionIO[Set[ServiceName]]
- def getUnitResources(id: ID): doobie.ConnectionIO[Set[String]]
- def insertBlueprint(name: String, description: Option[String], sha256: Sha256, template: String): doobie.ConnectionIO[ID]
- def insertLoadbalancer(lb: Loadbalancer, version: MajorVersion, repoId: ID): doobie.ConnectionIO[ID]
- def insertLoadbalancerDeployment(lbid: ID, nsid: ID, hash: String, address: String): doobie.ConnectionIO[ID]
- def insertLoadbalancerIfAbsent(lbv: @@[Loadbalancer, Versioned], repoId: ID): doobie.ConnectionIO[ID]
-
def
insertOrUpdateRepositories(list: List[Repo]): doobie.ConnectionIO[Unit]
Does what it says on the function.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def killRelease(slug: Slug, version: String): doobie.ConnectionIO[Either[Throwable, Unit]]
-
def
linkRepositoriesToUser(list: List[Repo], u: User): doobie.ConnectionIO[Unit]
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.
- def listAuditLog(limit: Long, offset: Long, action: Option[String], category: Option[String]): doobie.ConnectionIO[List[AuditLog]]
- def listAuditLogByReleaseId(limit: Long, offset: Long, releaseId: Long): doobie.ConnectionIO[List[AuditLog]]
-
val
listBlueprints: doobie.ConnectionIO[List[Blueprint]]
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.
- def listDatacenters: doobie.ConnectionIO[Set[String]]
- def listDeploymentStatuses(id: ID): doobie.ConnectionIO[List[(DeploymentStatus, Option[StatusMessage], Instant)]]
- def listDeploymentsForDatacenter(dc: String): doobie.ConnectionIO[Set[Deployment]]
- def listDeploymentsForNamespaceByStatus(ns: ID, stats: NonEmptyList[DeploymentStatus], unit: Option[UnitName] = None): doobie.ConnectionIO[Set[(Deployment, DeploymentStatus)]]
- def listDeploymentsForUnitByStatus(nsid: ID, name: UnitName, stats: NonEmptyList[DeploymentStatus]): doobie.ConnectionIO[Set[Deployment]]
- def listLoadbalancerDeploymentsForNamespace(nsid: ID): doobie.ConnectionIO[Vector[LoadbalancerDeployment]]
- def listNamespacesForDatacenter(dc: String): doobie.ConnectionIO[Set[Namespace]]
- def listRecentReleasesForRepository(slug: Slug): doobie.ConnectionIO[SortedMap[Released, List[ReleasedDeployment]]]
- def listReleases(limit: Int): doobie.ConnectionIO[SortedMap[Released, List[ReleasedDeployment]]]
-
def
listRepositories(u: User): doobie.ConnectionIO[List[Repo]]
Fetch all repositories for a given user.
-
def
listRepositoriesWithActiveHooks(u: User): doobie.ConnectionIO[List[Repo]]
List all the repositories the user has access too that have webhooks enabled.
-
def
listRepositoriesWithOwner(u: User, owner: String): doobie.ConnectionIO[List[Repo]]
Fetch all repositories for a given owner, that the specified user has access too.
- def listShiftableDeployments(unit: UnitDef, ns: ID): doobie.ConnectionIO[List[Deployment]]
- def listUnitsByStatus(nsid: ID, statuses: NonEmptyList[DeploymentStatus]): doobie.ConnectionIO[Vector[(GUID, ServiceName)]]
- val log: Logger
- implicit val metaFeatureVersion: doobie.Meta[FeatureVersion]
- implicit val metaFiniteDuration: doobie.Meta[FiniteDuration]
- implicit val metaInstant: doobie.Meta[Instant]
- implicit val metaMajorVersion: doobie.Meta[MajorVersion]
- implicit val metaVersion: doobie.Meta[Version]
- implicit val namespaceName: doobie.Meta[NamespaceName]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
or[H[_]](h: FunctionK[H, IO]): FunctionK[[γ$1$]EitherK[StoreOp, H, γ$1$], IO]
- Definition Classes
- FunctionK
- def reverseTrafficShift(toID: ID, rev: Instant): doobie.ConnectionIO[Option[ID]]
- def rowToReleased(row: (String, String, Instant, Long, String)): Option[Released]
- def startTrafficShift(from: ID, to: ID, st: Instant): doobie.ConnectionIO[Option[ID]]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def unitDependencies(id: ID): doobie.ConnectionIO[Set[ServiceName]]
- def unitPorts(id: ID): doobie.ConnectionIO[Set[Port]]
-
def
updateDeploymentBlueprint(id: ID, bp: Option[RenderedBlueprint]): doobie.ConnectionIO[Unit]
update the renderedBlueprint field of a deployment.
update the renderedBlueprint field of a deployment. This is not a generalized update on
Deployment
as that would lead to wider mutabiltiy, which is highly discouraged. - def verifyDeployable(dcName: String, ns: NamespaceName, unit: UnitDef): doobie.ConnectionIO[ValidatedNel[NelsonError, Unit]]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val xa: doobie.Transactor[IO]