query

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "query"
)

Variables

View Source
var (
	Sort_name = map[int32]string{
		0: "ASC",
		1: "DESC",
	}
	Sort_value = map[string]int32{
		"ASC":  0,
		"DESC": 1,
	}
)

Enum value maps for Sort.

View Source
var File_pb_page_proto protoreflect.FileDescriptor
View Source
var File_pb_simplequery_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type MustSimpleQuery

type MustSimpleQuery struct {

	// 关键字过滤
	// @gotags: json:"keywords" form:"keywords" uri:"keywords" binding:"required"
	Keywords string `protobuf:"bytes,1,opt,name=keywords,proto3" json:"keywords" form:"keywords" uri:"keywords" binding:"required"`
	// 排序字段
	// @gotags: json:"orderby" form:"orderby" uri:"orderby"
	Orderby string `protobuf:"bytes,2,opt,name=orderby,proto3" json:"orderby" form:"orderby" uri:"orderby"`
	// 排序
	// @gotags: json:"ordersort" form:"ordersort" uri:"ordersort"
	Ordersort Sort `protobuf:"varint,3,opt,name=ordersort,proto3,enum=query.Sort" json:"ordersort" form:"ordersort" uri:"ordersort"`
	// contains filtered or unexported fields
}

func DefaultMustSimpleQuery

func DefaultMustSimpleQuery() *MustSimpleQuery

func (*MustSimpleQuery) Descriptor deprecated

func (*MustSimpleQuery) Descriptor() ([]byte, []int)

Deprecated: Use MustSimpleQuery.ProtoReflect.Descriptor instead.

func (*MustSimpleQuery) GetKeywords

func (x *MustSimpleQuery) GetKeywords() string

func (*MustSimpleQuery) GetOrderby

func (x *MustSimpleQuery) GetOrderby() string

func (*MustSimpleQuery) GetOrdersort

func (x *MustSimpleQuery) GetOrdersort() Sort

func (*MustSimpleQuery) ProtoMessage

func (*MustSimpleQuery) ProtoMessage()

func (*MustSimpleQuery) ProtoReflect

func (x *MustSimpleQuery) ProtoReflect() protoreflect.Message

func (*MustSimpleQuery) Reset

func (x *MustSimpleQuery) Reset()

func (*MustSimpleQuery) String

func (x *MustSimpleQuery) String() string

type Page

type Page struct {

	// 每页条数
	// @gotags: json:"page_size" form:"page_size" uri:"page_size"
	PageSize uint64 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size" form:"page_size" uri:"page_size"`
	// 当前页
	// @gotags: json:"page_number" form:"page_number" uri:"page_number"
	PageNumber uint64 `protobuf:"varint,2,opt,name=page_number,json=pageNumber,proto3" json:"page_number" form:"page_number" uri:"page_number"`
	// contains filtered or unexported fields
}

func DefaultPage

func DefaultPage() *Page

func (*Page) Descriptor deprecated

func (*Page) Descriptor() ([]byte, []int)

Deprecated: Use Page.ProtoReflect.Descriptor instead.

func (*Page) GetPageNumber

func (x *Page) GetPageNumber() uint64

func (*Page) GetPageSize

func (x *Page) GetPageSize() uint64

func (*Page) OffSet

func (p *Page) OffSet() int64

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) ProtoReflect

func (x *Page) ProtoReflect() protoreflect.Message

func (*Page) Reset

func (x *Page) Reset()

func (*Page) String

func (x *Page) String() string

type ShouldSimpleQuery

type ShouldSimpleQuery struct {

	// 关键字过滤
	// @gotags: json:"keywords" form:"keywords" uri:"keywords"
	Keywords string `protobuf:"bytes,1,opt,name=keywords,proto3" json:"keywords" form:"keywords" uri:"keywords"`
	// 排序字段
	// @gotags: json:"orderby" form:"orderby" uri:"orderby"
	Orderby string `protobuf:"bytes,2,opt,name=orderby,proto3" json:"orderby" form:"orderby" uri:"orderby"`
	// 排序
	// @gotags: json:"ordersort" form:"ordersort" uri:"ordersort"
	Ordersort Sort `protobuf:"varint,3,opt,name=ordersort,proto3,enum=query.Sort" json:"ordersort" form:"ordersort" uri:"ordersort"`
	// contains filtered or unexported fields
}

func DefaultShouldSimpleQuery

func DefaultShouldSimpleQuery() *ShouldSimpleQuery

func (*ShouldSimpleQuery) Descriptor deprecated

func (*ShouldSimpleQuery) Descriptor() ([]byte, []int)

Deprecated: Use ShouldSimpleQuery.ProtoReflect.Descriptor instead.

func (*ShouldSimpleQuery) GetKeywords

func (x *ShouldSimpleQuery) GetKeywords() string

func (*ShouldSimpleQuery) GetOrderby

func (x *ShouldSimpleQuery) GetOrderby() string

func (*ShouldSimpleQuery) GetOrdersort

func (x *ShouldSimpleQuery) GetOrdersort() Sort

func (*ShouldSimpleQuery) ProtoMessage

func (*ShouldSimpleQuery) ProtoMessage()

func (*ShouldSimpleQuery) ProtoReflect

func (x *ShouldSimpleQuery) ProtoReflect() protoreflect.Message

func (*ShouldSimpleQuery) Reset

func (x *ShouldSimpleQuery) Reset()

func (*ShouldSimpleQuery) String

func (x *ShouldSimpleQuery) String() string

type Sort

type Sort int32
const (
	// 正序
	Sort_ASC Sort = 0
	// 倒序
	Sort_DESC Sort = 1
)

func (Sort) Descriptor

func (Sort) Descriptor() protoreflect.EnumDescriptor

func (Sort) Enum

func (x Sort) Enum() *Sort

func (Sort) EnumDescriptor deprecated

func (Sort) EnumDescriptor() ([]byte, []int)

Deprecated: Use Sort.Descriptor instead.

func (Sort) Number

func (x Sort) Number() protoreflect.EnumNumber

func (Sort) String

func (x Sort) String() string

func (Sort) Type

func (Sort) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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