pagination

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pagination_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type PaginationRequest

type PaginationRequest struct {
	// contains filtered or unexported fields
}

func (*PaginationRequest) Descriptor deprecated

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

Deprecated: Use PaginationRequest.ProtoReflect.Descriptor instead.

func (*PaginationRequest) ProtoMessage

func (*PaginationRequest) ProtoMessage()

func (*PaginationRequest) ProtoReflect

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

func (*PaginationRequest) Reset

func (x *PaginationRequest) Reset()

func (*PaginationRequest) String

func (x *PaginationRequest) String() string

func (*PaginationRequest) Validate

func (m *PaginationRequest) Validate() error

Validate checks the field values on PaginationRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PaginationRequest) ValidateAll

func (m *PaginationRequest) ValidateAll() error

ValidateAll checks the field values on PaginationRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PaginationRequestMultiError, or nil if none found.

type PaginationRequestMultiError

type PaginationRequestMultiError []error

PaginationRequestMultiError is an error wrapping multiple validation errors returned by PaginationRequest.ValidateAll() if the designated constraints aren't met.

func (PaginationRequestMultiError) AllErrors

func (m PaginationRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PaginationRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type PaginationRequestValidationError

type PaginationRequestValidationError struct {
	// contains filtered or unexported fields
}

PaginationRequestValidationError is the validation error returned by PaginationRequest.Validate if the designated constraints aren't met.

func (PaginationRequestValidationError) Cause

Cause function returns cause value.

func (PaginationRequestValidationError) Error

Error satisfies the builtin error interface

func (PaginationRequestValidationError) ErrorName

ErrorName returns error name.

func (PaginationRequestValidationError) Field

Field function returns field value.

func (PaginationRequestValidationError) Key

Key function returns key value.

func (PaginationRequestValidationError) Reason

Reason function returns reason value.

type PaginationResponse

type PaginationResponse struct {

	// current page number.
	CurrentPage int32 `protobuf:"varint,1,opt,name=current_page,json=currentPage,proto3" json:"current_page,omitempty"`
	// previous page number, 1 if on the first page.
	PreviousPage int32 `protobuf:"varint,2,opt,name=previous_page,json=previousPage,proto3" json:"previous_page,omitempty"`
	// next page number, total_pages if on the last page.
	NextPage int32 `protobuf:"varint,3,opt,name=next_page,json=nextPage,proto3" json:"next_page,omitempty"`
	// number of items per page.
	PerPage int32 `protobuf:"varint,4,opt,name=per_page,json=perPage,proto3" json:"per_page,omitempty"`
	// total pages with current settings (deprecated due to performance concerns).
	//
	// Deprecated: Do not use.
	TotalPages int32 `protobuf:"varint,5,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
	// total number of items (deprecated due to performance concerns).
	//
	// Deprecated: Do not use.
	TotalCount int32 `protobuf:"varint,6,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
	// contains filtered or unexported fields
}

func (*PaginationResponse) Descriptor deprecated

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

Deprecated: Use PaginationResponse.ProtoReflect.Descriptor instead.

func (*PaginationResponse) GetCurrentPage

func (x *PaginationResponse) GetCurrentPage() int32

func (*PaginationResponse) GetNextPage

func (x *PaginationResponse) GetNextPage() int32

func (*PaginationResponse) GetPerPage

func (x *PaginationResponse) GetPerPage() int32

func (*PaginationResponse) GetPreviousPage

func (x *PaginationResponse) GetPreviousPage() int32

func (*PaginationResponse) GetTotalCount deprecated

func (x *PaginationResponse) GetTotalCount() int32

Deprecated: Do not use.

func (*PaginationResponse) GetTotalPages deprecated

func (x *PaginationResponse) GetTotalPages() int32

Deprecated: Do not use.

func (*PaginationResponse) ProtoMessage

func (*PaginationResponse) ProtoMessage()

func (*PaginationResponse) ProtoReflect

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

func (*PaginationResponse) Reset

func (x *PaginationResponse) Reset()

func (*PaginationResponse) String

func (x *PaginationResponse) String() string

func (*PaginationResponse) Validate

func (m *PaginationResponse) Validate() error

Validate checks the field values on PaginationResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PaginationResponse) ValidateAll

func (m *PaginationResponse) ValidateAll() error

ValidateAll checks the field values on PaginationResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PaginationResponseMultiError, or nil if none found.

type PaginationResponseMultiError

type PaginationResponseMultiError []error

PaginationResponseMultiError is an error wrapping multiple validation errors returned by PaginationResponse.ValidateAll() if the designated constraints aren't met.

func (PaginationResponseMultiError) AllErrors

func (m PaginationResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PaginationResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type PaginationResponseValidationError

type PaginationResponseValidationError struct {
	// contains filtered or unexported fields
}

PaginationResponseValidationError is the validation error returned by PaginationResponse.Validate if the designated constraints aren't met.

func (PaginationResponseValidationError) Cause

Cause function returns cause value.

func (PaginationResponseValidationError) Error

Error satisfies the builtin error interface

func (PaginationResponseValidationError) ErrorName

ErrorName returns error name.

func (PaginationResponseValidationError) Field

Field function returns field value.

func (PaginationResponseValidationError) Key

Key function returns key value.

func (PaginationResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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