代码拉取完成,页面将自动刷新
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ChapterServiceClient is the client API for ChapterService 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.
type ChapterServiceClient interface {
GetChapter(ctx context.Context, in *GetChapterRequest, opts ...grpc.CallOption) (*GetChapterResponse, error)
ListChapters(ctx context.Context, in *ListChaptersRequest, opts ...grpc.CallOption) (*ListChaptersResponse, error)
CreateChapter(ctx context.Context, in *CreateChapterRequest, opts ...grpc.CallOption) (*CreateChapterResponse, error)
UpdateChapter(ctx context.Context, in *UpdateChapterRequest, opts ...grpc.CallOption) (*UpdateChapterResponse, error)
DeleteChapter(ctx context.Context, in *DeleteChapterRequest, opts ...grpc.CallOption) (*DeleteChapterResponse, error)
UpdateChapterContent(ctx context.Context, in *UpdateChapterContentRequest, opts ...grpc.CallOption) (*UpdateChapterContentResponse, error)
}
type chapterServiceClient struct {
cc grpc.ClientConnInterface
}
func NewChapterServiceClient(cc grpc.ClientConnInterface) ChapterServiceClient {
return &chapterServiceClient{cc}
}
func (c *chapterServiceClient) GetChapter(ctx context.Context, in *GetChapterRequest, opts ...grpc.CallOption) (*GetChapterResponse, error) {
out := new(GetChapterResponse)
err := c.cc.Invoke(ctx, "/pb.ChapterService/GetChapter", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *chapterServiceClient) ListChapters(ctx context.Context, in *ListChaptersRequest, opts ...grpc.CallOption) (*ListChaptersResponse, error) {
out := new(ListChaptersResponse)
err := c.cc.Invoke(ctx, "/pb.ChapterService/ListChapters", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *chapterServiceClient) CreateChapter(ctx context.Context, in *CreateChapterRequest, opts ...grpc.CallOption) (*CreateChapterResponse, error) {
out := new(CreateChapterResponse)
err := c.cc.Invoke(ctx, "/pb.ChapterService/CreateChapter", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *chapterServiceClient) UpdateChapter(ctx context.Context, in *UpdateChapterRequest, opts ...grpc.CallOption) (*UpdateChapterResponse, error) {
out := new(UpdateChapterResponse)
err := c.cc.Invoke(ctx, "/pb.ChapterService/UpdateChapter", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *chapterServiceClient) DeleteChapter(ctx context.Context, in *DeleteChapterRequest, opts ...grpc.CallOption) (*DeleteChapterResponse, error) {
out := new(DeleteChapterResponse)
err := c.cc.Invoke(ctx, "/pb.ChapterService/DeleteChapter", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *chapterServiceClient) UpdateChapterContent(ctx context.Context, in *UpdateChapterContentRequest, opts ...grpc.CallOption) (*UpdateChapterContentResponse, error) {
out := new(UpdateChapterContentResponse)
err := c.cc.Invoke(ctx, "/pb.ChapterService/UpdateChapterContent", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ChapterServiceServer is the server API for ChapterService service.
// All implementations should embed UnimplementedChapterServiceServer
// for forward compatibility
type ChapterServiceServer interface {
GetChapter(context.Context, *GetChapterRequest) (*GetChapterResponse, error)
ListChapters(context.Context, *ListChaptersRequest) (*ListChaptersResponse, error)
CreateChapter(context.Context, *CreateChapterRequest) (*CreateChapterResponse, error)
UpdateChapter(context.Context, *UpdateChapterRequest) (*UpdateChapterResponse, error)
DeleteChapter(context.Context, *DeleteChapterRequest) (*DeleteChapterResponse, error)
UpdateChapterContent(context.Context, *UpdateChapterContentRequest) (*UpdateChapterContentResponse, error)
}
// UnimplementedChapterServiceServer should be embedded to have forward compatible implementations.
type UnimplementedChapterServiceServer struct {
}
func (UnimplementedChapterServiceServer) GetChapter(context.Context, *GetChapterRequest) (*GetChapterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetChapter not implemented")
}
func (UnimplementedChapterServiceServer) ListChapters(context.Context, *ListChaptersRequest) (*ListChaptersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListChapters not implemented")
}
func (UnimplementedChapterServiceServer) CreateChapter(context.Context, *CreateChapterRequest) (*CreateChapterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateChapter not implemented")
}
func (UnimplementedChapterServiceServer) UpdateChapter(context.Context, *UpdateChapterRequest) (*UpdateChapterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateChapter not implemented")
}
func (UnimplementedChapterServiceServer) DeleteChapter(context.Context, *DeleteChapterRequest) (*DeleteChapterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteChapter not implemented")
}
func (UnimplementedChapterServiceServer) UpdateChapterContent(context.Context, *UpdateChapterContentRequest) (*UpdateChapterContentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateChapterContent not implemented")
}
// UnsafeChapterServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ChapterServiceServer will
// result in compilation errors.
type UnsafeChapterServiceServer interface {
mustEmbedUnimplementedChapterServiceServer()
}
func RegisterChapterServiceServer(s grpc.ServiceRegistrar, srv ChapterServiceServer) {
s.RegisterService(&ChapterService_ServiceDesc, srv)
}
func _ChapterService_GetChapter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetChapterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ChapterServiceServer).GetChapter(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.ChapterService/GetChapter",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ChapterServiceServer).GetChapter(ctx, req.(*GetChapterRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ChapterService_ListChapters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListChaptersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ChapterServiceServer).ListChapters(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.ChapterService/ListChapters",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ChapterServiceServer).ListChapters(ctx, req.(*ListChaptersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ChapterService_CreateChapter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateChapterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ChapterServiceServer).CreateChapter(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.ChapterService/CreateChapter",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ChapterServiceServer).CreateChapter(ctx, req.(*CreateChapterRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ChapterService_UpdateChapter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateChapterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ChapterServiceServer).UpdateChapter(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.ChapterService/UpdateChapter",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ChapterServiceServer).UpdateChapter(ctx, req.(*UpdateChapterRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ChapterService_DeleteChapter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteChapterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ChapterServiceServer).DeleteChapter(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.ChapterService/DeleteChapter",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ChapterServiceServer).DeleteChapter(ctx, req.(*DeleteChapterRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ChapterService_UpdateChapterContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateChapterContentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ChapterServiceServer).UpdateChapterContent(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.ChapterService/UpdateChapterContent",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ChapterServiceServer).UpdateChapterContent(ctx, req.(*UpdateChapterContentRequest))
}
return interceptor(ctx, in, info, handler)
}
// ChapterService_ServiceDesc is the grpc.ServiceDesc for ChapterService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ChapterService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.ChapterService",
HandlerType: (*ChapterServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetChapter",
Handler: _ChapterService_GetChapter_Handler,
},
{
MethodName: "ListChapters",
Handler: _ChapterService_ListChapters_Handler,
},
{
MethodName: "CreateChapter",
Handler: _ChapterService_CreateChapter_Handler,
},
{
MethodName: "UpdateChapter",
Handler: _ChapterService_UpdateChapter_Handler,
},
{
MethodName: "DeleteChapter",
Handler: _ChapterService_DeleteChapter_Handler,
},
{
MethodName: "UpdateChapterContent",
Handler: _ChapterService_UpdateChapterContent_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "chapter_service.proto",
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。