param

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 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 Client

type Client struct {
	ID     string `json:"id,omitempty"`
	Secret string `json:"secret,omitempty"`
	Domain string `json:"domain,omitempty"`
	UserID string `json:"userID,omitempty"`
}

type DateFilter

type DateFilter struct {
	DateBegin string `json:"dateBegin" 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 DateRange

type DateRange[T ~string | time.Time] Range[T]

type IPage

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

type IPageSort

type IPageSort interface {
	IPage
	ISort
}

type ISort

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

type List

type List[T constraints.Ordered] struct {
	PageSort
	*Range[T]
}

func NewList

func NewList[T constraints.Ordered](pageNo, pageSize int) *List[T]

func (*List[T]) WithRange

func (req *List[T]) WithRange(field string, start, end T, include bool) *List[T]

func (*List[T]) WithSort

func (req *List[T]) WithSort(field string, typ SortType) *List[T]

type OauthReq

type OauthReq struct {
	ResponseType   string `json:"responseType,omitempty"`
	ClientID       string `json:"clientID,omitempty"`
	Scope          string `json:"scope,omitempty"`
	RedirectURI    string `json:"redirectURI,omitempty"`
	State          string `json:"state,omitempty"`
	UserID         string `json:"userID,omitempty"`
	AccessTokenExp int64  `json:"accessTokenExp,omitempty"`
	ClientSecret   string `json:"clientSecret,omitempty"`
	Code           string `json:"code,omitempty"`
	RefreshToken   string `json:"refreshToken,omitempty"`
	GrantType      string `json:"grantType,omitempty"`
	AccessType     string `json:"accessType,omitempty"`
	LoginURI       string `json:"loginURI,omitempty"`
}

type Page

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

type PageSort

type PageSort struct {
	Page
	*Sort
}

type Range

type Range[T constraints.Range] struct {
	RangeField string `json:"rangeField,omitempty"`
	RangeBegin T      `json:"rangeBegin,omitempty"`
	RangeEnd   T      `json:"rangeEnd,omitempty"`
	Include    bool   `json:"include,omitempty"`
}

type Sort

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

func (*Sort) Column

func (receiver *Sort) Column() string

func (*Sort) Type

func (receiver *Sort) Type() SortType

type SortType

type SortType int
const (
	SortTypeAsc SortType
	SortTypeDesc
)

Jump to

Keyboard shortcuts

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