types

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package types

@author: xwc1125

Package types

@author: xwc1125

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonError

type JsonError interface {
	Code() int
	Error() string
	Msg() string
}

type KV

type KV[K any, V any] struct {
	Key   K `json:"key"`
	Value V `json:"value"`
}

type PageQuery

type PageQuery interface {
	GetNeedSearch() interface{}
	GetPageIndex() int64
	GetPageSize() int64
	GetOffset() int64
	GetStartTime() int64
	GetEndTime() int64
	GetOrder() string
}

type Pagination

type Pagination struct {
	// 用于分页设置的参数
	PageIndex int64 `json:"pageIndex" form:"pageIndex"` // 当前页
	PageSize  int64 `json:"pageSize" form:"pageSize"`   // 每页的数量

	OrderName string `json:"orderName,omitempty" form:"orderName"` // 用于指定的排序

	// 时间范围
	StartTime string `json:"startTime,omitempty" form:"startTime"` // 2006-01-02
	EndTime   string `json:"endTime,omitempty" form:"endTime"`     // 2006-01-02

	ParamMap map[string]interface{}
	// contains filtered or unexported fields
}

Pagination 分页参数

func (*Pagination) GetEndTime

func (p *Pagination) GetEndTime() int64

GetEndTime 获取结束时间的毫秒值

func (*Pagination) GetOffset

func (p *Pagination) GetOffset() int64

func (*Pagination) GetOrder

func (p *Pagination) GetOrder() string

GetOrder 获取排序组合

func (*Pagination) GetPageIndex

func (p *Pagination) GetPageIndex() int64

func (*Pagination) GetPageSize

func (p *Pagination) GetPageSize() int64

func (*Pagination) GetStartTime

func (p *Pagination) GetStartTime() int64

GetStartTime 获取起始时间的毫秒值

Directories

Path Synopsis
Package response
Package response

Jump to

Keyboard shortcuts

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