Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPageRpcServer(s grpc.ServiceRegistrar, srv PageRpcServer)
- type BatchResp
- type CountResp
- type EmptyReq
- type EmptyResp
- type FindPageListReq
- func (*FindPageListReq) Descriptor() ([]byte, []int)deprecated
- func (x *FindPageListReq) GetPage() int64
- func (x *FindPageListReq) GetPageSize() int64
- func (x *FindPageListReq) GetSorts() []string
- func (*FindPageListReq) ProtoMessage()
- func (x *FindPageListReq) ProtoReflect() protoreflect.Message
- func (x *FindPageListReq) Reset()
- func (x *FindPageListReq) String() string
- type FindPageListResp
- func (*FindPageListResp) Descriptor() ([]byte, []int)deprecated
- func (x *FindPageListResp) GetList() []*PageDetails
- func (x *FindPageListResp) GetTotal() int64
- func (*FindPageListResp) ProtoMessage()
- func (x *FindPageListResp) ProtoReflect() protoreflect.Message
- func (x *FindPageListResp) Reset()
- func (x *FindPageListResp) String() string
- type IdReq
- type IdsReq
- type PageDetails
- func (*PageDetails) Descriptor() ([]byte, []int)deprecated
- func (x *PageDetails) GetCarouselCovers() []string
- func (x *PageDetails) GetCreatedAt() int64
- func (x *PageDetails) GetId() int64
- func (x *PageDetails) GetIsCarousel() int64
- func (x *PageDetails) GetPageCover() string
- func (x *PageDetails) GetPageLabel() string
- func (x *PageDetails) GetPageName() string
- func (x *PageDetails) GetUpdatedAt() int64
- func (*PageDetails) ProtoMessage()
- func (x *PageDetails) ProtoReflect() protoreflect.Message
- func (x *PageDetails) Reset()
- func (x *PageDetails) String() string
- type PageNewReq
- func (*PageNewReq) Descriptor() ([]byte, []int)deprecated
- func (x *PageNewReq) GetCarouselCovers() []string
- func (x *PageNewReq) GetId() int64
- func (x *PageNewReq) GetIsCarousel() int64
- func (x *PageNewReq) GetPageCover() string
- func (x *PageNewReq) GetPageLabel() string
- func (x *PageNewReq) GetPageName() string
- func (*PageNewReq) ProtoMessage()
- func (x *PageNewReq) ProtoReflect() protoreflect.Message
- func (x *PageNewReq) Reset()
- func (x *PageNewReq) String() string
- type PageRpcClient
- type PageRpcServer
- type UnimplementedPageRpcServer
- func (UnimplementedPageRpcServer) AddPage(context.Context, *PageNewReq) (*PageDetails, error)
- func (UnimplementedPageRpcServer) DeletePage(context.Context, *IdsReq) (*BatchResp, error)
- func (UnimplementedPageRpcServer) FindPageList(context.Context, *FindPageListReq) (*FindPageListResp, error)
- func (UnimplementedPageRpcServer) UpdatePage(context.Context, *PageNewReq) (*PageDetails, error)
- type UnsafePageRpcServer
- type UserIdReq
Constants ¶
const ( PageRpc_AddPage_FullMethodName = "/pagerpc.PageRpc/AddPage" PageRpc_UpdatePage_FullMethodName = "/pagerpc.PageRpc/UpdatePage" PageRpc_DeletePage_FullMethodName = "/pagerpc.PageRpc/DeletePage" PageRpc_FindPageList_FullMethodName = "/pagerpc.PageRpc/FindPageList" )
Variables ¶
var File_page_proto protoreflect.FileDescriptor
var PageRpc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pagerpc.PageRpc", HandlerType: (*PageRpcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddPage", Handler: _PageRpc_AddPage_Handler, }, { MethodName: "UpdatePage", Handler: _PageRpc_UpdatePage_Handler, }, { MethodName: "DeletePage", Handler: _PageRpc_DeletePage_Handler, }, { MethodName: "FindPageList", Handler: _PageRpc_FindPageList_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "page.proto", }
PageRpc_ServiceDesc is the grpc.ServiceDesc for PageRpc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPageRpcServer ¶
func RegisterPageRpcServer(s grpc.ServiceRegistrar, srv PageRpcServer)
Types ¶
type BatchResp ¶
type BatchResp struct { SuccessCount int64 `protobuf:"varint,1,opt,name=success_count,json=successCount,proto3" json:"success_count,omitempty"` // contains filtered or unexported fields }
func (*BatchResp) Descriptor
deprecated
func (*BatchResp) GetSuccessCount ¶
func (*BatchResp) ProtoMessage ¶
func (*BatchResp) ProtoMessage()
func (*BatchResp) ProtoReflect ¶
func (x *BatchResp) ProtoReflect() protoreflect.Message
type CountResp ¶
type CountResp struct { Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*CountResp) Descriptor
deprecated
func (*CountResp) ProtoMessage ¶
func (*CountResp) ProtoMessage()
func (*CountResp) ProtoReflect ¶
func (x *CountResp) ProtoReflect() protoreflect.Message
type EmptyReq ¶
type EmptyReq struct {
// contains filtered or unexported fields
}
func (*EmptyReq) Descriptor
deprecated
func (*EmptyReq) ProtoMessage ¶
func (*EmptyReq) ProtoMessage()
func (*EmptyReq) ProtoReflect ¶
func (x *EmptyReq) ProtoReflect() protoreflect.Message
type EmptyResp ¶
type EmptyResp struct {
// contains filtered or unexported fields
}
func (*EmptyResp) Descriptor
deprecated
func (*EmptyResp) ProtoMessage ¶
func (*EmptyResp) ProtoMessage()
func (*EmptyResp) ProtoReflect ¶
func (x *EmptyResp) ProtoReflect() protoreflect.Message
type FindPageListReq ¶
type FindPageListReq struct { Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` Sorts []string `protobuf:"bytes,3,rep,name=sorts,proto3" json:"sorts,omitempty"` // 排序 // contains filtered or unexported fields }
func (*FindPageListReq) Descriptor
deprecated
func (*FindPageListReq) Descriptor() ([]byte, []int)
Deprecated: Use FindPageListReq.ProtoReflect.Descriptor instead.
func (*FindPageListReq) GetPage ¶
func (x *FindPageListReq) GetPage() int64
func (*FindPageListReq) GetPageSize ¶
func (x *FindPageListReq) GetPageSize() int64
func (*FindPageListReq) GetSorts ¶
func (x *FindPageListReq) GetSorts() []string
func (*FindPageListReq) ProtoMessage ¶
func (*FindPageListReq) ProtoMessage()
func (*FindPageListReq) ProtoReflect ¶
func (x *FindPageListReq) ProtoReflect() protoreflect.Message
func (*FindPageListReq) Reset ¶
func (x *FindPageListReq) Reset()
func (*FindPageListReq) String ¶
func (x *FindPageListReq) String() string
type FindPageListResp ¶
type FindPageListResp struct { List []*PageDetails `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*FindPageListResp) Descriptor
deprecated
func (*FindPageListResp) Descriptor() ([]byte, []int)
Deprecated: Use FindPageListResp.ProtoReflect.Descriptor instead.
func (*FindPageListResp) GetList ¶
func (x *FindPageListResp) GetList() []*PageDetails
func (*FindPageListResp) GetTotal ¶
func (x *FindPageListResp) GetTotal() int64
func (*FindPageListResp) ProtoMessage ¶
func (*FindPageListResp) ProtoMessage()
func (*FindPageListResp) ProtoReflect ¶
func (x *FindPageListResp) ProtoReflect() protoreflect.Message
func (*FindPageListResp) Reset ¶
func (x *FindPageListResp) Reset()
func (*FindPageListResp) String ¶
func (x *FindPageListResp) String() string
type IdReq ¶
type IdReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*IdReq) Descriptor
deprecated
func (*IdReq) ProtoMessage ¶
func (*IdReq) ProtoMessage()
func (*IdReq) ProtoReflect ¶
func (x *IdReq) ProtoReflect() protoreflect.Message
type IdsReq ¶
type IdsReq struct { Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*IdsReq) Descriptor
deprecated
func (*IdsReq) ProtoMessage ¶
func (*IdsReq) ProtoMessage()
func (*IdsReq) ProtoReflect ¶
func (x *IdsReq) ProtoReflect() protoreflect.Message
type PageDetails ¶
type PageDetails struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 页面id PageName string `protobuf:"bytes,2,opt,name=page_name,json=pageName,proto3" json:"page_name,omitempty"` // 页面名 PageLabel string `protobuf:"bytes,3,opt,name=page_label,json=pageLabel,proto3" json:"page_label,omitempty"` // 页面标签 PageCover string `protobuf:"bytes,4,opt,name=page_cover,json=pageCover,proto3" json:"page_cover,omitempty"` // 页面封面 IsCarousel int64 `protobuf:"varint,5,opt,name=is_carousel,json=isCarousel,proto3" json:"is_carousel,omitempty"` // 是否轮播 CarouselCovers []string `protobuf:"bytes,6,rep,name=carousel_covers,json=carouselCovers,proto3" json:"carousel_covers,omitempty"` // 轮播列表 CreatedAt int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 创建时间 UpdatedAt int64 `protobuf:"varint,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // 更新时间 // contains filtered or unexported fields }
func (*PageDetails) Descriptor
deprecated
func (*PageDetails) Descriptor() ([]byte, []int)
Deprecated: Use PageDetails.ProtoReflect.Descriptor instead.
func (*PageDetails) GetCarouselCovers ¶
func (x *PageDetails) GetCarouselCovers() []string
func (*PageDetails) GetCreatedAt ¶
func (x *PageDetails) GetCreatedAt() int64
func (*PageDetails) GetId ¶
func (x *PageDetails) GetId() int64
func (*PageDetails) GetIsCarousel ¶
func (x *PageDetails) GetIsCarousel() int64
func (*PageDetails) GetPageCover ¶
func (x *PageDetails) GetPageCover() string
func (*PageDetails) GetPageLabel ¶
func (x *PageDetails) GetPageLabel() string
func (*PageDetails) GetPageName ¶
func (x *PageDetails) GetPageName() string
func (*PageDetails) GetUpdatedAt ¶
func (x *PageDetails) GetUpdatedAt() int64
func (*PageDetails) ProtoMessage ¶
func (*PageDetails) ProtoMessage()
func (*PageDetails) ProtoReflect ¶
func (x *PageDetails) ProtoReflect() protoreflect.Message
func (*PageDetails) Reset ¶
func (x *PageDetails) Reset()
func (*PageDetails) String ¶
func (x *PageDetails) String() string
type PageNewReq ¶
type PageNewReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 页面id PageName string `protobuf:"bytes,2,opt,name=page_name,json=pageName,proto3" json:"page_name,omitempty"` // 页面名 PageLabel string `protobuf:"bytes,3,opt,name=page_label,json=pageLabel,proto3" json:"page_label,omitempty"` // 页面标签 PageCover string `protobuf:"bytes,4,opt,name=page_cover,json=pageCover,proto3" json:"page_cover,omitempty"` // 页面封面 IsCarousel int64 `protobuf:"varint,5,opt,name=is_carousel,json=isCarousel,proto3" json:"is_carousel,omitempty"` // 是否轮播 CarouselCovers []string `protobuf:"bytes,6,rep,name=carousel_covers,json=carouselCovers,proto3" json:"carousel_covers,omitempty"` // 轮播列表 // contains filtered or unexported fields }
************* blog 页面管理 *************
func (*PageNewReq) Descriptor
deprecated
func (*PageNewReq) Descriptor() ([]byte, []int)
Deprecated: Use PageNewReq.ProtoReflect.Descriptor instead.
func (*PageNewReq) GetCarouselCovers ¶
func (x *PageNewReq) GetCarouselCovers() []string
func (*PageNewReq) GetId ¶
func (x *PageNewReq) GetId() int64
func (*PageNewReq) GetIsCarousel ¶
func (x *PageNewReq) GetIsCarousel() int64
func (*PageNewReq) GetPageCover ¶
func (x *PageNewReq) GetPageCover() string
func (*PageNewReq) GetPageLabel ¶
func (x *PageNewReq) GetPageLabel() string
func (*PageNewReq) GetPageName ¶
func (x *PageNewReq) GetPageName() string
func (*PageNewReq) ProtoMessage ¶
func (*PageNewReq) ProtoMessage()
func (*PageNewReq) ProtoReflect ¶
func (x *PageNewReq) ProtoReflect() protoreflect.Message
func (*PageNewReq) Reset ¶
func (x *PageNewReq) Reset()
func (*PageNewReq) String ¶
func (x *PageNewReq) String() string
type PageRpcClient ¶
type PageRpcClient interface { // 创建页面 AddPage(ctx context.Context, in *PageNewReq, opts ...grpc.CallOption) (*PageDetails, error) // 更新页面 UpdatePage(ctx context.Context, in *PageNewReq, opts ...grpc.CallOption) (*PageDetails, error) // 删除页面 DeletePage(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*BatchResp, error) // 查询页面列表 FindPageList(ctx context.Context, in *FindPageListReq, opts ...grpc.CallOption) (*FindPageListResp, error) }
PageRpcClient is the client API for PageRpc service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPageRpcClient ¶
func NewPageRpcClient(cc grpc.ClientConnInterface) PageRpcClient
type PageRpcServer ¶
type PageRpcServer interface { // 创建页面 AddPage(context.Context, *PageNewReq) (*PageDetails, error) // 更新页面 UpdatePage(context.Context, *PageNewReq) (*PageDetails, error) // 删除页面 DeletePage(context.Context, *IdsReq) (*BatchResp, error) // 查询页面列表 FindPageList(context.Context, *FindPageListReq) (*FindPageListResp, error) // contains filtered or unexported methods }
PageRpcServer is the server API for PageRpc service. All implementations must embed UnimplementedPageRpcServer for forward compatibility
type UnimplementedPageRpcServer ¶
type UnimplementedPageRpcServer struct { }
UnimplementedPageRpcServer must be embedded to have forward compatible implementations.
func (UnimplementedPageRpcServer) AddPage ¶
func (UnimplementedPageRpcServer) AddPage(context.Context, *PageNewReq) (*PageDetails, error)
func (UnimplementedPageRpcServer) DeletePage ¶
func (UnimplementedPageRpcServer) FindPageList ¶
func (UnimplementedPageRpcServer) FindPageList(context.Context, *FindPageListReq) (*FindPageListResp, error)
func (UnimplementedPageRpcServer) UpdatePage ¶
func (UnimplementedPageRpcServer) UpdatePage(context.Context, *PageNewReq) (*PageDetails, error)
type UnsafePageRpcServer ¶
type UnsafePageRpcServer interface {
// contains filtered or unexported methods
}
UnsafePageRpcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PageRpcServer will result in compilation errors.
type UserIdReq ¶
type UserIdReq struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserIdReq) Descriptor
deprecated
func (*UserIdReq) ProtoMessage ¶
func (*UserIdReq) ProtoMessage()
func (*UserIdReq) ProtoReflect ¶
func (x *UserIdReq) ProtoReflect() protoreflect.Message