request

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateFilter

type DateFilter struct {
	DateBegin string `json:"dateBein" explain:"起始时间"`
	DateEnd   string `json:"dateEnd" explain:"结束时间"`
	RangeEnum int    `json:"rangeEnum" explain:"1-今天,2-本周,3-本月,4-今年"`
}

func (*DateFilter) Scope

func (d *DateFilter) Scope() (time.Time, time.Time)

赋值本周期,并返回下周期日期

type DateRangeReq

type DateRangeReq[T ~string | time.Time] RangeReq[T]

type PageReq

type PageReq struct {
	PageNo   int `json:"pageNo"`
	PageSize int `json:"pageSize"`
}

type PageReqInter

type PageReqInter interface {
	PageNo() int
	PageSize() int
}

type PageSortReq

type PageSortReq struct {
	PageReq
	*SortReq
}

type PageSortReqInter

type PageSortReqInter interface {
	PageReqInter
	SortReqInter
}

type RangeReq

type RangeReq[T constraints.Range] struct {
	RangeField string `json:"dateField,omitempty"`
	RangeStart T      `json:"dateStart,omitempty"`
	RangeEnd   T      `json:"dateEnd,omitempty"`
	Include    bool   `json:"include,omitempty"`
}

type SortReq

type SortReq struct {
	SortField string   `json:"sortField,omitempty"`
	SortType  SortType `json:"sortType,omitempty"`
}

func (*SortReq) Column

func (receiver *SortReq) Column() string

func (*SortReq) Type

func (receiver *SortReq) Type() SortType

type SortReqInter

type SortReqInter interface {
	Column() string
	Type() SortType
}

type SortType

type SortType int
const (
	SortTypePlacement SortType = iota
	SortTypeASC
	SortTypeDESC
)

Jump to

Keyboard shortcuts

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