Start database interface/model/iterator revamp

This commit is contained in:
Daniel 2018-08-31 17:36:32 +02:00
parent e40d66e103
commit f8ff7d143e
6 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,18 @@
package iterator
import (
"github.com/Safing/portbase/database/model"
)
// Iterator defines the iterator structure.
type Iterator struct {
Next chan model.Model
Error error
}
// New creates a new Iterator.
func New() *Iterator {
return &Iterator{
Next: make(chan model.Model, 10),
}
}