mirror of
https://github.com/safing/portbase
synced 2026-04-28 11:50:02 +00:00
Start database interface/model/iterator revamp
This commit is contained in:
parent
e40d66e103
commit
f8ff7d143e
6 changed files with 66 additions and 0 deletions
18
database/iterator/iterator.go
Normal file
18
database/iterator/iterator.go
Normal 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),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue