Files
49cb4bb93c Add timestamp filter to listAllNodes endpoint (#161)
* Add timestamp filter for \nodes endpoint

* Add relevant tests

---------

Co-authored-by: James Kwon <[email protected]>
2025-02-02 11:14:38 -05:00

24 lines
554 B
Go

package entity
import (
"registry-backend/ent"
"time"
)
// NodeFilter holds optional parameters for filtering node results
type NodeFilter struct {
PublisherID string
Search string
IncludeBanned *bool
Timestamp *time.Time
}
// ListNodesResult is the structure that holds the paginated result of nodes
type ListNodesResult struct {
Total int `json:"total"`
Nodes []*ent.Node `json:"nodes"`
Page int `json:"page"`
Limit int `json:"limit"`
TotalPages int `json:"totalPages"`
}