github.com/unicornultrafoundation/go-u2u@v1.0.0-rc1.0.20240205080301-e74a83d3fadc/utils/migration/id_store.go (about)

     1  package migration
     2  
     3  // IDStore interface for stores id in migrations
     4  type IDStore interface {
     5  	GetID() string
     6  	SetID(string)
     7  }
     8  
     9  type inmemIDStore struct {
    10  	lastID string
    11  }
    12  
    13  func (p *inmemIDStore) GetID() string {
    14  	return string(p.lastID)
    15  }
    16  
    17  func (p *inmemIDStore) SetID(id string) {
    18  	p.lastID = id
    19  }