go_dreamfactory/stress/proto/pb.pb.go
2022-11-24 21:30:50 +08:00

229 lines
7.2 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: pb.proto
package protobuf
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// 请求
type Request struct {
// UserName 用户昵称
UserName string `protobuf:"bytes,1,opt,name=userName,proto3" json:"userName,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Request) Reset() { *m = Request{} }
func (m *Request) String() string { return proto.CompactTextString(m) }
func (*Request) ProtoMessage() {}
func (*Request) Descriptor() ([]byte, []int) {
return fileDescriptor_f80abaa17e25ccc8, []int{0}
}
func (m *Request) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Request.Unmarshal(m, b)
}
func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Request.Marshal(b, m, deterministic)
}
func (m *Request) XXX_Merge(src proto.Message) {
xxx_messageInfo_Request.Merge(m, src)
}
func (m *Request) XXX_Size() int {
return xxx_messageInfo_Request.Size(m)
}
func (m *Request) XXX_DiscardUnknown() {
xxx_messageInfo_Request.DiscardUnknown(m)
}
var xxx_messageInfo_Request proto.InternalMessageInfo
func (m *Request) GetUserName() string {
if m != nil {
return m.UserName
}
return ""
}
// 响应
type Response struct {
// 状态码
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
// 状态码说明
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
// Data 返回数据
Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Response) Reset() { *m = Response{} }
func (m *Response) String() string { return proto.CompactTextString(m) }
func (*Response) ProtoMessage() {}
func (*Response) Descriptor() ([]byte, []int) {
return fileDescriptor_f80abaa17e25ccc8, []int{1}
}
func (m *Response) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Response.Unmarshal(m, b)
}
func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Response.Marshal(b, m, deterministic)
}
func (m *Response) XXX_Merge(src proto.Message) {
xxx_messageInfo_Response.Merge(m, src)
}
func (m *Response) XXX_Size() int {
return xxx_messageInfo_Response.Size(m)
}
func (m *Response) XXX_DiscardUnknown() {
xxx_messageInfo_Response.DiscardUnknown(m)
}
var xxx_messageInfo_Response proto.InternalMessageInfo
func (m *Response) GetCode() int32 {
if m != nil {
return m.Code
}
return 0
}
func (m *Response) GetMsg() string {
if m != nil {
return m.Msg
}
return ""
}
func (m *Response) GetData() string {
if m != nil {
return m.Data
}
return ""
}
func init() {
proto.RegisterType((*Request)(nil), "protobuf.Request")
proto.RegisterType((*Response)(nil), "protobuf.Response")
}
func init() { proto.RegisterFile("pb.proto", fileDescriptor_f80abaa17e25ccc8) }
var fileDescriptor_f80abaa17e25ccc8 = []byte{
// 170 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x28, 0x48, 0xd2, 0x2b,
0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x00, 0x53, 0x49, 0xa5, 0x69, 0x4a, 0xaa, 0x5c, 0xec, 0x41,
0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x52, 0x5c, 0x1c, 0xa5, 0xc5, 0xa9, 0x45, 0x7e, 0x89,
0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x70, 0xbe, 0x92, 0x0b, 0x17, 0x47, 0x50,
0x6a, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x90, 0x10, 0x17, 0x4b, 0x72, 0x7e, 0x0a, 0x44, 0x0d,
0x6b, 0x10, 0x98, 0x2d, 0x24, 0xc0, 0xc5, 0x9c, 0x5b, 0x9c, 0x2e, 0xc1, 0x04, 0xd6, 0x06, 0x62,
0x82, 0x54, 0xa5, 0x24, 0x96, 0x24, 0x4a, 0x30, 0x83, 0x85, 0xc0, 0x6c, 0x23, 0x27, 0x2e, 0x4e,
0xc7, 0x82, 0xcc, 0xe0, 0xd4, 0xa2, 0xb2, 0xd4, 0x22, 0x21, 0x53, 0x2e, 0x2e, 0x8f, 0xd4, 0x9c,
0x9c, 0xfc, 0xf0, 0xfc, 0xa2, 0x9c, 0x14, 0x21, 0x41, 0x3d, 0x98, 0x93, 0xf4, 0xa0, 0xee, 0x91,
0x12, 0x42, 0x16, 0x82, 0xd8, 0xad, 0xc4, 0x90, 0xc4, 0x06, 0x16, 0x34, 0x06, 0x04, 0x00, 0x00,
0xff, 0xff, 0x72, 0xb6, 0x62, 0x67, 0xcd, 0x00, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// ApiServerClient is the client API for ApiServer service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ApiServerClient interface {
// 接口
HelloWorld(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
type apiServerClient struct {
cc *grpc.ClientConn
}
func NewApiServerClient(cc *grpc.ClientConn) ApiServerClient {
return &apiServerClient{cc}
}
func (c *apiServerClient) HelloWorld(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, "/protobuf.ApiServer/HelloWorld", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ApiServerServer is the server API for ApiServer service.
type ApiServerServer interface {
// 接口
HelloWorld(context.Context, *Request) (*Response, error)
}
// UnimplementedApiServerServer can be embedded to have forward compatible implementations.
type UnimplementedApiServerServer struct {
}
func (*UnimplementedApiServerServer) HelloWorld(ctx context.Context, req *Request) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method HelloWorld not implemented")
}
func RegisterApiServerServer(s *grpc.Server, srv ApiServerServer) {
s.RegisterService(&_ApiServer_serviceDesc, srv)
}
func _ApiServer_HelloWorld_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ApiServerServer).HelloWorld(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protobuf.ApiServer/HelloWorld",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ApiServerServer).HelloWorld(ctx, req.(*Request))
}
return interceptor(ctx, in, info, handler)
}
var _ApiServer_serviceDesc = grpc.ServiceDesc{
ServiceName: "protobuf.ApiServer",
HandlerType: (*ApiServerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "HelloWorld",
Handler: _ApiServer_HelloWorld_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "pb.proto",
}