The new design defines 4 distinct functions, List, ListPage, ListRefresh and ListRefreshPage. The first two are used during the initial pagination, and the other two are used during refreshing.
20 lines
515 B
Go
20 lines
515 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package pagination
|
|
|
|
import (
|
|
"github.com/hashicorp/boundary/internal/db/timestamp"
|
|
"github.com/hashicorp/boundary/internal/types/resource"
|
|
)
|
|
|
|
// Item defines a subset of a boundary.Resource that can
|
|
// be used as an input to a DB operation for the purposes
|
|
// of pagination and sorting.
|
|
type Item interface {
|
|
GetPublicId() string
|
|
GetCreateTime() *timestamp.Timestamp
|
|
GetUpdateTime() *timestamp.Timestamp
|
|
GetResourceType() resource.Type
|
|
}
|