Add devweb support for auto-reloading webapp.
This commit is contained in:
17
db/util.go
17
db/util.go
@@ -223,3 +223,20 @@ VALUES
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var MagicAllLabel = "[all]"
|
||||
|
||||
type Paginator struct {
|
||||
Label string
|
||||
Offset int
|
||||
Count int
|
||||
}
|
||||
|
||||
// Index returns ranges of metadata for messages as defined by paginator.
|
||||
func (c *Conn) Index(p *Paginator) error {
|
||||
if p.Label == MagicAllLabel {
|
||||
// Paginate all messages.
|
||||
}
|
||||
// Else, filter by label.
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user