You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
953 B

package com.xsn.explorer.data
import com.alexitc.playsonify.core.ApplicationResult
import com.alexitc.playsonify.models.ordering.FieldOrdering
import com.alexitc.playsonify.models.pagination.{Limit, PaginatedQuery, PaginatedResult}
import com.xsn.explorer.models.fields.BlockField
import com.xsn.explorer.models.persisted.{Block, BlockHeader}
import com.xsn.explorer.models.values.{Blockhash, Height}
import scala.language.higherKinds
trait BlockDataHandler[F[_]] {
def getBy(blockhash: Blockhash): F[Block]
def getBy(height: Height): F[Block]
def getBy(
paginatedQuery: PaginatedQuery,
ordering: FieldOrdering[BlockField]): F[PaginatedResult[Block]]
def delete(blockhash: Blockhash): F[Block]
def getLatestBlock(): F[Block]
def getFirstBlock(): F[Block]
def getHeaders(limit: Limit, lastSeenHash: Option[Blockhash]): F[List[BlockHeader]]
}
trait BlockBlockingDataHandler extends BlockDataHandler[ApplicationResult]