Documentation ¶
Index ¶
- Variables
- type Pagination
- func (p *Pagination) Count() *int64
- func (*Pagination) Descriptor() ([]byte, []int)deprecated
- func (x *Pagination) GetCurrent() int32
- func (x *Pagination) GetPageSize() int32
- func (x *Pagination) GetRawTotal() int64
- func (x *Pagination) GetTotal() int32
- func (p *Pagination) Limit() int
- func (p *Pagination) Offset() int
- func (p *Pagination) Paginate() func(db *gorm.DB) *gorm.DB
- func (*Pagination) ProtoMessage()
- func (x *Pagination) ProtoReflect() protoreflect.Message
- func (x *Pagination) Reset()
- func (p *Pagination) Resp() *Pagination
- func (x *Pagination) String() string
- type Registry
- func (*Registry) Descriptor() ([]byte, []int)deprecated
- func (x *Registry) GetEnabled() bool
- func (x *Registry) GetEndpoints() []string
- func (x *Registry) GetNamespace() string
- func (x *Registry) GetOnlyDiscovery() bool
- func (*Registry) ProtoMessage()
- func (x *Registry) ProtoReflect() protoreflect.Message
- func (x *Registry) Reset()
- func (x *Registry) String() string
- type Tracing
Constants ¶
This section is empty.
Variables ¶
View Source
var File_pagination_proto protoreflect.FileDescriptor
View Source
var File_registry_proto protoreflect.FileDescriptor
View Source
var File_tracing_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Pagination ¶
type Pagination struct { Current int32 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"` PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` RawTotal *int64 `protobuf:"varint,4,opt,name=raw_total,json=rawTotal,proto3,oneof" json:"raw_total,omitempty"` // contains filtered or unexported fields }
通用的分页信息
func PageWrap ¶
func PageWrap(p *Pagination) *Pagination
func (*Pagination) Descriptor
deprecated
func (*Pagination) Descriptor() ([]byte, []int)
Deprecated: Use Pagination.ProtoReflect.Descriptor instead.
func (*Pagination) GetCurrent ¶
func (x *Pagination) GetCurrent() int32
func (*Pagination) GetPageSize ¶
func (x *Pagination) GetPageSize() int32
func (*Pagination) GetRawTotal ¶
func (x *Pagination) GetRawTotal() int64
func (*Pagination) GetTotal ¶
func (x *Pagination) GetTotal() int32
func (*Pagination) Offset ¶
func (p *Pagination) Offset() int
Offset 返回分页查询的偏移量, 已自动处理分页数。 min:1, max:unlimited
func (*Pagination) ProtoMessage ¶
func (*Pagination) ProtoMessage()
func (*Pagination) ProtoReflect ¶
func (x *Pagination) ProtoReflect() protoreflect.Message
func (*Pagination) Reset ¶
func (x *Pagination) Reset()
func (*Pagination) Resp ¶
func (p *Pagination) Resp() *Pagination
func (*Pagination) String ¶
func (x *Pagination) String() string
type Registry ¶
type Registry struct { // 是否启用服务注册 Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // 是否只作为服务发现,不自注册 OnlyDiscovery bool `protobuf:"varint,2,opt,name=only_discovery,json=onlyDiscovery,proto3" json:"only_discovery,omitempty"` // 服务注册中心地址 Endpoints []string `protobuf:"bytes,3,rep,name=endpoints,proto3" json:"endpoints,omitempty"` // 服务命名空间 Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` // contains filtered or unexported fields }
func (*Registry) Descriptor
deprecated
func (*Registry) GetEnabled ¶
func (*Registry) GetEndpoints ¶
func (*Registry) GetNamespace ¶
func (*Registry) GetOnlyDiscovery ¶
func (*Registry) ProtoMessage ¶
func (*Registry) ProtoMessage()
func (*Registry) ProtoReflect ¶
func (x *Registry) ProtoReflect() protoreflect.Message
type Tracing ¶
type Tracing struct { // 链路上报服务入口 Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // 服务名称 CustomName string `protobuf:"bytes,3,opt,name=custom_name,json=customName,proto3" json:"custom_name,omitempty"` // contains filtered or unexported fields }
func (*Tracing) Descriptor
deprecated
func (*Tracing) GetCustomName ¶
func (*Tracing) GetEndpoint ¶
func (*Tracing) ProtoMessage ¶
func (*Tracing) ProtoMessage()
func (*Tracing) ProtoReflect ¶
func (x *Tracing) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.