request

package
v1.6.13 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT, Apache-2.0 Imports: 2 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

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

type CursorAny

type CursorAny = Cursor[any]

type Filter

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

type FilterMap

type FilterMap map[string]Filter

type FilterType

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

func (FilterType) RangeType

func (f FilterType) RangeType() RangeType

type Filters

type Filters []Filter

type Id

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

type List

type List struct {
	PaginationEmbedded
	Filters Filters `json:"filters,omitempty"`
}

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

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

type Pageable

type Pageable interface {
	PageNo() uint32
	PageSize() uint32
	Sort() []Sort
}

type Pagination

type Pagination struct {
	No   uint32 `json:"no"`
	Size uint32 `json:"size"`
	Sort []Sort `json:"sort"`
}

type PaginationEmbedded

type PaginationEmbedded struct {
	PageNo   uint32 `json:"pageNo"`
	PageSize uint32 `json:"pageSize"`
	Sort     []Sort `json:"sort"`
}

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

type RangeAny = Range[any]

type RangeType

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

func (RangeType) ContainsBegin

func (r RangeType) ContainsBegin() bool

func (RangeType) ContainsEnd

func (r RangeType) ContainsEnd() bool

type Sort

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

type SortType

type SortType uint8
const (
	SortTypeAsc SortType
	SortTypeDesc
)

Jump to

Keyboard shortcuts

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