internal

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_trtl_internal_pagination_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type PageCursor

type PageCursor struct {
	PageSize  int32  `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // the number of results returned on each iteration.
	NextKey   []byte `protobuf:"bytes,2,opt,name=next_key,json=nextKey,proto3" json:"next_key,omitempty"`     // the key to start the iteration from
	Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`                // the namespace the cursor is iterating on
	// contains filtered or unexported fields
}

Implements a protocol buffer struct for state managed pagination. This struct will be marshaled into a url-safe base64 encoded string and sent to the user as the next_page_token. The server should decode this struct to determine where to continue iteration for the next page. Note that the server should check to make sure the page size in the cursor matches the page size in the request. See https://cloud.google.com/apis/design/design_patterns#list_pagination for more.

func (*PageCursor) Descriptor deprecated

func (*PageCursor) Descriptor() ([]byte, []int)

Deprecated: Use PageCursor.ProtoReflect.Descriptor instead.

func (*PageCursor) Dump

func (pc *PageCursor) Dump() (token string, err error)

Dump a PageCursor into a page_token string.

func (*PageCursor) GetNamespace

func (x *PageCursor) GetNamespace() string

func (*PageCursor) GetNextKey

func (x *PageCursor) GetNextKey() []byte

func (*PageCursor) GetPageSize

func (x *PageCursor) GetPageSize() int32

func (*PageCursor) Load

func (pc *PageCursor) Load(token string) (err error)

Load a PageCursor from a page_token string.

func (*PageCursor) ProtoMessage

func (*PageCursor) ProtoMessage()

func (*PageCursor) ProtoReflect

func (x *PageCursor) ProtoReflect() protoreflect.Message

func (*PageCursor) Reset

func (x *PageCursor) Reset()

func (*PageCursor) String

func (x *PageCursor) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL