1package connections
2
3import "github.com/git-bug/git-bug/entity"
4
5// CursorEdge is a minimal edge carrying only a cursor. Use it with
6// connections.Connection when the edge type needs no additional fields.
7type CursorEdge struct {
8 Cursor string
9}
10
11func (e CursorEdge) GetCursor() string { return e.Cursor }
12
13// LazyBugEdge is a special relay edge used to implement a lazy loading connection
14type LazyBugEdge struct {
15 Id entity.Id
16 Cursor string
17}
18
19// GetCursor return the cursor of a LazyBugEdge
20func (lbe LazyBugEdge) GetCursor() string {
21 return lbe.Cursor
22}
23
24// LazyIdentityEdge is a special relay edge used to implement a lazy loading connection
25type LazyIdentityEdge struct {
26 Id entity.Id
27 Cursor string
28}
29
30// GetCursor return the cursor of a LazyIdentityEdge
31func (lbe LazyIdentityEdge) GetCursor() string {
32 return lbe.Cursor
33}