dto

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToPBPaginationResponse

func ToPBPaginationResponse(p *PaginationResponse) *v1.PaginationResponse

Types

type PaginationRequest

type PaginationRequest struct {
	PageNum    int32        `json:"page_num"`
	PageSize   int32        `json:"page_size"`
	SortFields []*SortField `json:"sort_fields"`
}

func FromPBPaginationRequest

func FromPBPaginationRequest(p *v1.PaginationRequest) *PaginationRequest

type PaginationResponse

type PaginationResponse struct {
	Page  int64 `json:"page"`
	Total int64 `json:"total"`
	Count int64 `json:"count"`
}

type SortField

type SortField struct {
	Field string `json:"field"`
	Order int32  `json:"order"` // 0: asc, 1: desc
}

func FromPBSortField

func FromPBSortField(s *v1.SortField) *SortField

Jump to

Keyboard shortcuts

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