Documentation ¶
Index ¶
- Variables
- type CursorPagination
- func (*CursorPagination) Descriptor() ([]byte, []int)deprecated
- func (x *CursorPagination) GetDirection() PaginationDirection
- func (x *CursorPagination) GetPageSize() int32
- func (x *CursorPagination) GetPageToken() string
- func (*CursorPagination) ProtoMessage()
- func (x *CursorPagination) ProtoReflect() protoreflect.Message
- func (x *CursorPagination) Reset()
- func (x *CursorPagination) String() string
- type CursorPaginationResponse
- func (*CursorPaginationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CursorPaginationResponse) GetNext() bool
- func (x *CursorPaginationResponse) GetPageToken() string
- func (x *CursorPaginationResponse) GetPrev() bool
- func (x *CursorPaginationResponse) GetTotal() int32
- func (*CursorPaginationResponse) ProtoMessage()
- func (x *CursorPaginationResponse) ProtoReflect() protoreflect.Message
- func (x *CursorPaginationResponse) Reset()
- func (x *CursorPaginationResponse) String() string
- type CursorPaginationResponseValidator
- type CursorPaginationValidator
- type Error
- type PagePagination
- func (*PagePagination) Descriptor() ([]byte, []int)deprecated
- func (x *PagePagination) GetPage() int32
- func (x *PagePagination) GetPageSize() int32
- func (*PagePagination) ProtoMessage()
- func (x *PagePagination) ProtoReflect() protoreflect.Message
- func (x *PagePagination) Reset()
- func (x *PagePagination) String() string
- type PagePaginationResponse
- func (*PagePaginationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PagePaginationResponse) GetNext() bool
- func (x *PagePaginationResponse) GetPrev() bool
- func (x *PagePaginationResponse) GetTotal() int32
- func (*PagePaginationResponse) ProtoMessage()
- func (x *PagePaginationResponse) ProtoReflect() protoreflect.Message
- func (x *PagePaginationResponse) Reset()
- func (x *PagePaginationResponse) String() string
- type PagePaginationResponseValidator
- type PagePaginationValidator
- type Pagination
- func (*Pagination) Descriptor() ([]byte, []int)deprecated
- func (x *Pagination) GetCursor() *CursorPagination
- func (x *Pagination) GetPage() *PagePagination
- func (m *Pagination) GetPagination() isPagination_Pagination
- func (*Pagination) ProtoMessage()
- func (x *Pagination) ProtoReflect() protoreflect.Message
- func (x *Pagination) Reset()
- func (x *Pagination) String() string
- type PaginationDirection
- func (PaginationDirection) Descriptor() protoreflect.EnumDescriptor
- func (x PaginationDirection) Enum() *PaginationDirection
- func (PaginationDirection) EnumDescriptor() ([]byte, []int)deprecated
- func (x PaginationDirection) Number() protoreflect.EnumNumber
- func (x PaginationDirection) String() string
- func (PaginationDirection) Type() protoreflect.EnumType
- type PaginationValidator
- type Pagination_Cursor
- type Pagination_Page
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Error_name = map[int32]string{ 0: "ERROR_UNSPECIFIED", 1: "ERROR_PAGINATION_INVALID", 2: "ERROR_PAGINATION_DIRECTION_INVALID", 3: "ERROR_PAGINATION_PAGE_INVALID", 4: "ERROR_PAGINATION_PAGE_SIZE_INVALID", 5: "ERROR_PAGINATION_PAGE_TOKEN_INVALID", } Error_value = map[string]int32{ "ERROR_UNSPECIFIED": 0, "ERROR_PAGINATION_INVALID": 1, "ERROR_PAGINATION_DIRECTION_INVALID": 2, "ERROR_PAGINATION_PAGE_INVALID": 3, "ERROR_PAGINATION_PAGE_SIZE_INVALID": 4, "ERROR_PAGINATION_PAGE_TOKEN_INVALID": 5, } )
Enum value maps for Error.
View Source
var ( PaginationDirection_name = map[int32]string{ 0: "PAGINATION_DIRECTION_UNSPECIFIED", 1: "PAGINATION_DIRECTION_NEXT", 2: "PAGINATION_DIRECTION_PREV", } PaginationDirection_value = map[string]int32{ "PAGINATION_DIRECTION_UNSPECIFIED": 0, "PAGINATION_DIRECTION_NEXT": 1, "PAGINATION_DIRECTION_PREV": 2, } )
Enum value maps for PaginationDirection.
View Source
var File_genproto_pagination_v1_error_proto protoreflect.FileDescriptor
View Source
var File_genproto_pagination_v1_pagination_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CursorPagination ¶
type CursorPagination struct { PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // Page token. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Page size. Direction PaginationDirection `protobuf:"varint,3,opt,name=direction,proto3,enum=genproto.pagination.v1.PaginationDirection" json:"direction,omitempty"` // Direction. // contains filtered or unexported fields }
func (*CursorPagination) Descriptor
deprecated
func (*CursorPagination) Descriptor() ([]byte, []int)
Deprecated: Use CursorPagination.ProtoReflect.Descriptor instead.
func (*CursorPagination) GetDirection ¶
func (x *CursorPagination) GetDirection() PaginationDirection
func (*CursorPagination) GetPageSize ¶
func (x *CursorPagination) GetPageSize() int32
func (*CursorPagination) GetPageToken ¶
func (x *CursorPagination) GetPageToken() string
func (*CursorPagination) ProtoMessage ¶
func (*CursorPagination) ProtoMessage()
func (*CursorPagination) ProtoReflect ¶
func (x *CursorPagination) ProtoReflect() protoreflect.Message
func (*CursorPagination) Reset ¶
func (x *CursorPagination) Reset()
func (*CursorPagination) String ¶
func (x *CursorPagination) String() string
type CursorPaginationResponse ¶
type CursorPaginationResponse struct { Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // Total. PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // Page token. Next bool `protobuf:"varint,3,opt,name=next,proto3" json:"next,omitempty"` // Is there a next page? Prev bool `protobuf:"varint,4,opt,name=prev,proto3" json:"prev,omitempty"` // Is there a previous page? // contains filtered or unexported fields }
func (*CursorPaginationResponse) Descriptor
deprecated
func (*CursorPaginationResponse) Descriptor() ([]byte, []int)
Deprecated: Use CursorPaginationResponse.ProtoReflect.Descriptor instead.
func (*CursorPaginationResponse) GetNext ¶
func (x *CursorPaginationResponse) GetNext() bool
func (*CursorPaginationResponse) GetPageToken ¶
func (x *CursorPaginationResponse) GetPageToken() string
func (*CursorPaginationResponse) GetPrev ¶
func (x *CursorPaginationResponse) GetPrev() bool
func (*CursorPaginationResponse) GetTotal ¶
func (x *CursorPaginationResponse) GetTotal() int32
func (*CursorPaginationResponse) ProtoMessage ¶
func (*CursorPaginationResponse) ProtoMessage()
func (*CursorPaginationResponse) ProtoReflect ¶
func (x *CursorPaginationResponse) ProtoReflect() protoreflect.Message
func (*CursorPaginationResponse) Reset ¶
func (x *CursorPaginationResponse) Reset()
func (*CursorPaginationResponse) String ¶
func (x *CursorPaginationResponse) String() string
type CursorPaginationResponseValidator ¶
type CursorPaginationResponseValidator interface { Validate(req *CursorPaginationResponse) []*errdetails.BadRequest_FieldViolation ValidateTotal(total_ int32) *errdetails.BadRequest_FieldViolation ValidatePageToken(pageToken_ string) *errdetails.BadRequest_FieldViolation ValidateNext(next_ bool) *errdetails.BadRequest_FieldViolation ValidatePrev(prev_ bool) *errdetails.BadRequest_FieldViolation Optional() CursorPaginationResponseValidator WithRuleTotal(rule validator.NumberRule[int32]) CursorPaginationResponseValidator WithRulePageToken(rule validator.StringRule) CursorPaginationResponseValidator WithRuleNext(rule validator.BoolRule) CursorPaginationResponseValidator WithRulePrev(rule validator.BoolRule) CursorPaginationResponseValidator }
func NewCursorPaginationResponseValidator ¶
func NewCursorPaginationResponseValidator() CursorPaginationResponseValidator
type CursorPaginationValidator ¶
type CursorPaginationValidator interface { Validate(req *CursorPagination) []*errdetails.BadRequest_FieldViolation ValidateDirection(direction_ PaginationDirection) *errdetails.BadRequest_FieldViolation ValidatePageToken(pageToken_ string) *errdetails.BadRequest_FieldViolation ValidatePageSize(pageSize_ int32) *errdetails.BadRequest_FieldViolation Optional() CursorPaginationValidator WithRuleDirection(rule validator.NumberRule[int32]) CursorPaginationValidator WithRulePageToken(rule validator.StringRule) CursorPaginationValidator WithRulePageSize(rule validator.NumberRule[int32]) CursorPaginationValidator }
func NewCursorPaginationValidator ¶
func NewCursorPaginationValidator() CursorPaginationValidator
type Error ¶
type Error int32
func (Error) Descriptor ¶
func (Error) Descriptor() protoreflect.EnumDescriptor
func (Error) EnumDescriptor
deprecated
func (Error) Number ¶
func (x Error) Number() protoreflect.EnumNumber
func (Error) Type ¶
func (Error) Type() protoreflect.EnumType
type PagePagination ¶
type PagePagination struct { Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // Page. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Page size. // contains filtered or unexported fields }
func (*PagePagination) Descriptor
deprecated
func (*PagePagination) Descriptor() ([]byte, []int)
Deprecated: Use PagePagination.ProtoReflect.Descriptor instead.
func (*PagePagination) GetPage ¶
func (x *PagePagination) GetPage() int32
func (*PagePagination) GetPageSize ¶
func (x *PagePagination) GetPageSize() int32
func (*PagePagination) ProtoMessage ¶
func (*PagePagination) ProtoMessage()
func (*PagePagination) ProtoReflect ¶
func (x *PagePagination) ProtoReflect() protoreflect.Message
func (*PagePagination) Reset ¶
func (x *PagePagination) Reset()
func (*PagePagination) String ¶
func (x *PagePagination) String() string
type PagePaginationResponse ¶
type PagePaginationResponse struct { Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` // Total. Next bool `protobuf:"varint,2,opt,name=next,proto3" json:"next,omitempty"` // Is there a next page? Prev bool `protobuf:"varint,3,opt,name=prev,proto3" json:"prev,omitempty"` // Is there a previous page? // contains filtered or unexported fields }
func (*PagePaginationResponse) Descriptor
deprecated
func (*PagePaginationResponse) Descriptor() ([]byte, []int)
Deprecated: Use PagePaginationResponse.ProtoReflect.Descriptor instead.
func (*PagePaginationResponse) GetNext ¶
func (x *PagePaginationResponse) GetNext() bool
func (*PagePaginationResponse) GetPrev ¶
func (x *PagePaginationResponse) GetPrev() bool
func (*PagePaginationResponse) GetTotal ¶
func (x *PagePaginationResponse) GetTotal() int32
func (*PagePaginationResponse) ProtoMessage ¶
func (*PagePaginationResponse) ProtoMessage()
func (*PagePaginationResponse) ProtoReflect ¶
func (x *PagePaginationResponse) ProtoReflect() protoreflect.Message
func (*PagePaginationResponse) Reset ¶
func (x *PagePaginationResponse) Reset()
func (*PagePaginationResponse) String ¶
func (x *PagePaginationResponse) String() string
type PagePaginationResponseValidator ¶
type PagePaginationResponseValidator interface { Validate(req *PagePaginationResponse) []*errdetails.BadRequest_FieldViolation ValidateTotal(total_ int32) *errdetails.BadRequest_FieldViolation ValidateNext(next_ bool) *errdetails.BadRequest_FieldViolation ValidatePrev(prev_ bool) *errdetails.BadRequest_FieldViolation Optional() PagePaginationResponseValidator WithRuleTotal(rule validator.NumberRule[int32]) PagePaginationResponseValidator WithRuleNext(rule validator.BoolRule) PagePaginationResponseValidator WithRulePrev(rule validator.BoolRule) PagePaginationResponseValidator }
func NewPagePaginationResponseValidator ¶
func NewPagePaginationResponseValidator() PagePaginationResponseValidator
type PagePaginationValidator ¶
type PagePaginationValidator interface { Validate(req *PagePagination) []*errdetails.BadRequest_FieldViolation ValidatePage(page_ int32) *errdetails.BadRequest_FieldViolation ValidatePageSize(pageSize_ int32) *errdetails.BadRequest_FieldViolation Optional() PagePaginationValidator WithRulePage(rule validator.NumberRule[int32]) PagePaginationValidator WithRulePageSize(rule validator.NumberRule[int32]) PagePaginationValidator }
func NewPagePaginationValidator ¶
func NewPagePaginationValidator() PagePaginationValidator
type Pagination ¶
type Pagination struct { // Types that are assignable to Pagination: // // *Pagination_Cursor // *Pagination_Page Pagination isPagination_Pagination `protobuf_oneof:"pagination"` // contains filtered or unexported fields }
func (*Pagination) Descriptor
deprecated
func (*Pagination) Descriptor() ([]byte, []int)
Deprecated: Use Pagination.ProtoReflect.Descriptor instead.
func (*Pagination) GetCursor ¶
func (x *Pagination) GetCursor() *CursorPagination
func (*Pagination) GetPage ¶
func (x *Pagination) GetPage() *PagePagination
func (*Pagination) GetPagination ¶
func (m *Pagination) GetPagination() isPagination_Pagination
func (*Pagination) ProtoMessage ¶
func (*Pagination) ProtoMessage()
func (*Pagination) ProtoReflect ¶
func (x *Pagination) ProtoReflect() protoreflect.Message
func (*Pagination) Reset ¶
func (x *Pagination) Reset()
func (*Pagination) String ¶
func (x *Pagination) String() string
type PaginationDirection ¶
type PaginationDirection int32
const ( PaginationDirection_PAGINATION_DIRECTION_UNSPECIFIED PaginationDirection = 0 // — PaginationDirection_PAGINATION_DIRECTION_NEXT PaginationDirection = 1 // Next. PaginationDirection_PAGINATION_DIRECTION_PREV PaginationDirection = 2 // Previous. )
func (PaginationDirection) Descriptor ¶
func (PaginationDirection) Descriptor() protoreflect.EnumDescriptor
func (PaginationDirection) Enum ¶
func (x PaginationDirection) Enum() *PaginationDirection
func (PaginationDirection) EnumDescriptor
deprecated
func (PaginationDirection) EnumDescriptor() ([]byte, []int)
Deprecated: Use PaginationDirection.Descriptor instead.
func (PaginationDirection) Number ¶
func (x PaginationDirection) Number() protoreflect.EnumNumber
func (PaginationDirection) String ¶
func (x PaginationDirection) String() string
func (PaginationDirection) Type ¶
func (PaginationDirection) Type() protoreflect.EnumType
type PaginationValidator ¶
type PaginationValidator interface { Validate(req *Pagination) []*errdetails.BadRequest_FieldViolation ValidateCursor(cursor_ *CursorPagination) []*errdetails.BadRequest_FieldViolation ValidatePage(page_ *PagePagination) []*errdetails.BadRequest_FieldViolation Optional() PaginationValidator WithRuleCursor(v CursorPaginationValidator) PaginationValidator WithRulePage(v PagePaginationValidator) PaginationValidator }
func NewPaginationValidator ¶
func NewPaginationValidator() PaginationValidator
type Pagination_Cursor ¶
type Pagination_Cursor struct {
Cursor *CursorPagination `protobuf:"bytes,1,opt,name=cursor,proto3,oneof"` // Cursor.
}
type Pagination_Page ¶
type Pagination_Page struct {
Page *PagePagination `protobuf:"bytes,2,opt,name=page,proto3,oneof"` // Page.
}
Click to show internal directories.
Click to hide internal directories.