param

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT, Apache-2.0 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 Cursor added in v0.3.9

type Cursor[T any] struct {
	Field string `json:"field,omitempty"`
	Prev  T      `json:"prev,omitempty"`
	Size  int    `json:"size,omitempty"`
}

type CursorAny added in v0.6.0

type CursorAny = Cursor[any]

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 Equal added in v0.6.0

type Equal[T any] struct {
	Field string `json:"field,omitempty"`
	Value T      `json:"value,omitempty"`
}

type Field added in v0.6.0

type Field[T any] struct {
	Field  string    `json:"field,omitempty"`
	Type   RangeType `json:"type,omitempty"`
	Value  T         `json:"value,omitempty"`
	Values []T       `json:"values,omitempty"`
}

type FilterType added in v0.6.0

type FilterType int8
const (
	FilterTypeEqual FilterType = iota
	FilterTypeNotEqual
	FilterTypeFuzzy
	FilterTypeIn
	FilterTypeNotIn
	FilterTypeIsNull
	FilterTypeIsNotNull
	FilterTypeRange = 16
)

func (FilterType) RangeType added in v0.6.0

func (f FilterType) RangeType() RangeType

type IPage

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

type IPageSort

type IPageSort interface {
	IPage
	ISort
}

type ISort

type ISort interface {
	SortType() SortType
}

type Id added in v0.3.8

type Id struct {
	Id uint `json:"id"`
}

type In added in v0.6.0

type In[T any] struct {
	Field  string `json:"field,omitempty"`
	Values []T    `json:"values,omitempty"`
}

type List

type List struct {
	PageMultiSort
	Filter map[string]Field[any] `json:"filter,omitempty"`
}

type MultiSort added in v0.3.9

type MultiSort []Sort

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 Ordered added in v0.3.1

type Ordered interface {
	constraints.Ordered | time.Time
}

type Page

type Page struct {
	No   int `json:"no"`
	Size int `json:"size"`
}

type PageEmbed added in v0.3.9

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

type PageMultiSort added in v0.6.0

type PageMultiSort struct {
	Page Page      `json:"page"`
	Sort MultiSort `json:"sort,omitempty"`
}

type PageSort

type PageSort struct {
	Page Page  `json:"page"`
	Sort *Sort `json:"sort,omitempty"`
}

type PageSortEmbed added in v0.3.9

type PageSortEmbed struct {
	PageEmbed
	*SortEmbed
}

type Range

type Range[T any] struct {
	Field string    `json:"field,omitempty"`
	Begin T         `json:"begin"`
	End   T         `json:"end"`
	Type  RangeType `json:"type,omitempty"`
}

type RangeAny added in v0.6.0

type RangeAny = Range[any]

type RangeInTwoField added in v0.6.0

type RangeInTwoField[T any] struct {
	BeginField string    `json:"beginField,omitempty"`
	EndField   string    `json:"endField,omitempty"`
	Begin      T         `json:"begin"`
	End        T         `json:"end"`
	Type       RangeType `json:"type,omitempty"`
}

type RangeInTwoFieldAny added in v0.6.0

type RangeInTwoFieldAny = RangeInTwoField[any]

type RangeType added in v0.3.8

type RangeType int8
const (
	RangeTypeContainsEnd RangeType = 1 << iota
	RangeTypeContainsBegin
	RangeTypeHasEnd
	RangeTypeHasBegin
)

func (RangeType) ContainsBegin added in v0.3.8

func (r RangeType) ContainsBegin() bool

func (RangeType) ContainsEnd added in v0.3.8

func (r RangeType) ContainsEnd() bool

func (RangeType) HasBegin added in v0.3.8

func (r RangeType) HasBegin() bool

func (RangeType) HasEnd added in v0.3.8

func (r RangeType) HasEnd() bool

type Rangeable added in v0.3.1

type Rangeable interface {
	constraints.Ordered | time.Time | ~*time.Time | ~string
}

type Sort

type Sort struct {
	Field string   `json:"field"`
	Type  SortType `json:"type,omitempty"`
}

type SortEmbed added in v0.3.9

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

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