github.com/onflow/flow-go@v0.33.17/storage/epoch_setups.go (about)

     1  // (c) 2019 Dapper Labs - ALL RIGHTS RESERVED
     2  
     3  package storage
     4  
     5  import (
     6  	"github.com/onflow/flow-go/model/flow"
     7  	"github.com/onflow/flow-go/storage/badger/transaction"
     8  )
     9  
    10  type EpochSetups interface {
    11  
    12  	// StoreTx allows us to store a new epoch setup in a DB transaction while going through the cache.
    13  	StoreTx(*flow.EpochSetup) func(*transaction.Tx) error
    14  
    15  	// ByID will return the EpochSetup event by its ID.
    16  	// Error returns:
    17  	// * storage.ErrNotFound if no EpochSetup with the ID exists
    18  	ByID(flow.Identifier) (*flow.EpochSetup, error)
    19  }