refactor: reorganize modules and add Linux build tooling
This commit is contained in:
163
module/social/feed/pb/setting_grpc.pb.go
Normal file
163
module/social/feed/pb/setting_grpc.pb.go
Normal file
@@ -0,0 +1,163 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: setting.proto
|
||||
|
||||
package feed
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Setting_Info_FullMethodName = "/feed.Setting/Info"
|
||||
Setting_Rights_FullMethodName = "/feed.Setting/Rights"
|
||||
)
|
||||
|
||||
// SettingClient is the client API for Setting 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 SettingClient interface {
|
||||
// 修改个人信息
|
||||
Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
|
||||
// 修改权限信息
|
||||
Rights(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
|
||||
}
|
||||
|
||||
type settingClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSettingClient(cc grpc.ClientConnInterface) SettingClient {
|
||||
return &settingClient{cc}
|
||||
}
|
||||
|
||||
func (c *settingClient) Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Empty)
|
||||
err := c.cc.Invoke(ctx, Setting_Info_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *settingClient) Rights(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Empty)
|
||||
err := c.cc.Invoke(ctx, Setting_Rights_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SettingServer is the server API for Setting service.
|
||||
// All implementations must embed UnimplementedSettingServer
|
||||
// for forward compatibility.
|
||||
type SettingServer interface {
|
||||
// 修改个人信息
|
||||
Info(context.Context, *Empty) (*Empty, error)
|
||||
// 修改权限信息
|
||||
Rights(context.Context, *Empty) (*Empty, error)
|
||||
mustEmbedUnimplementedSettingServer()
|
||||
}
|
||||
|
||||
// UnimplementedSettingServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedSettingServer struct{}
|
||||
|
||||
func (UnimplementedSettingServer) Info(context.Context, *Empty) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
|
||||
}
|
||||
func (UnimplementedSettingServer) Rights(context.Context, *Empty) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Rights not implemented")
|
||||
}
|
||||
func (UnimplementedSettingServer) mustEmbedUnimplementedSettingServer() {}
|
||||
func (UnimplementedSettingServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSettingServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SettingServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSettingServer interface {
|
||||
mustEmbedUnimplementedSettingServer()
|
||||
}
|
||||
|
||||
func RegisterSettingServer(s grpc.ServiceRegistrar, srv SettingServer) {
|
||||
// If the following call pancis, it indicates UnimplementedSettingServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Setting_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Setting_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SettingServer).Info(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Setting_Info_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SettingServer).Info(ctx, req.(*Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Setting_Rights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SettingServer).Rights(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Setting_Rights_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SettingServer).Rights(ctx, req.(*Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Setting_ServiceDesc is the grpc.ServiceDesc for Setting service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Setting_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "feed.Setting",
|
||||
HandlerType: (*SettingServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Info",
|
||||
Handler: _Setting_Info_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Rights",
|
||||
Handler: _Setting_Rights_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "setting.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user