Documentation ¶
Index ¶
- Variables
- func RegisterExampleServer(s grpc.ServiceRegistrar, srv ExampleServer)
- func RegisterGraceServer(s grpc.ServiceRegistrar, srv GraceServer)
- func RunTestSwaggerFileServer()
- type ExampleClient
- type ExampleReply
- func (*ExampleReply) Descriptor() ([]byte, []int)
- func (m *ExampleReply) GetCode() int32
- func (m *ExampleReply) GetStatus() StatusCode
- func (m *ExampleReply) GetToken() string
- func (*ExampleReply) ProtoMessage()
- func (m *ExampleReply) Reset()
- func (m *ExampleReply) String() string
- func (m *ExampleReply) XXX_DiscardUnknown()
- func (m *ExampleReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExampleReply) XXX_Merge(src proto.Message)
- func (m *ExampleReply) XXX_Size() int
- func (m *ExampleReply) XXX_Unmarshal(b []byte) error
- type ExampleRequest
- func (*ExampleRequest) Descriptor() ([]byte, []int)
- func (m *ExampleRequest) GetApi() string
- func (m *ExampleRequest) GetParams() map[string]string
- func (m *ExampleRequest) GetTicket() string
- func (*ExampleRequest) ProtoMessage()
- func (m *ExampleRequest) Reset()
- func (m *ExampleRequest) String() string
- func (m *ExampleRequest) XXX_DiscardUnknown()
- func (m *ExampleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExampleRequest) XXX_Merge(src proto.Message)
- func (m *ExampleRequest) XXX_Size() int
- func (m *ExampleRequest) XXX_Unmarshal(b []byte) error
- type ExampleServer
- type GraceClient
- type GraceServer
- type SayHelloReply
- func (*SayHelloReply) Descriptor() ([]byte, []int)
- func (this *SayHelloReply) GoString() string
- func (m *SayHelloReply) Marshal() (dAtA []byte, err error)
- func (m *SayHelloReply) MarshalTo(dAtA []byte) (int, error)
- func (m *SayHelloReply) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SayHelloReply) ProtoMessage()
- func (m *SayHelloReply) Reset()
- func (m *SayHelloReply) Size() (n int)
- func (m *SayHelloReply) String() string
- func (m *SayHelloReply) Unmarshal(dAtA []byte) error
- func (m *SayHelloReply) XXX_DiscardUnknown()
- func (m *SayHelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SayHelloReply) XXX_Merge(src proto.Message)
- func (*SayHelloReply) XXX_MessageName() string
- func (m *SayHelloReply) XXX_Size() int
- func (m *SayHelloReply) XXX_Unmarshal(b []byte) error
- type SayHelloRequest
- func (*SayHelloRequest) Descriptor() ([]byte, []int)
- func (this *SayHelloRequest) GoString() string
- func (m *SayHelloRequest) Marshal() (dAtA []byte, err error)
- func (m *SayHelloRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *SayHelloRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SayHelloRequest) ProtoMessage()
- func (m *SayHelloRequest) Reset()
- func (m *SayHelloRequest) Size() (n int)
- func (m *SayHelloRequest) String() string
- func (m *SayHelloRequest) Unmarshal(dAtA []byte) error
- func (m *SayHelloRequest) XXX_DiscardUnknown()
- func (m *SayHelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SayHelloRequest) XXX_Merge(src proto.Message)
- func (*SayHelloRequest) XXX_MessageName() string
- func (m *SayHelloRequest) XXX_Size() int
- func (m *SayHelloRequest) XXX_Unmarshal(b []byte) error
- type StatusCode
- type UnimplementedExampleServer
- type UnimplementedGraceServer
- type UnsafeExampleServer
- type UnsafeGraceServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthGrace = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGrace = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGrace = fmt.Errorf("proto: unexpected end of group") )
var Example_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.swaggerfileserver.Example", HandlerType: (*ExampleServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ExampleTest", Handler: _Example_ExampleTest_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "example.proto", }
Example_ServiceDesc is the grpc.ServiceDesc for Example service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Grace_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.swaggerfileserver.Grace", HandlerType: (*GraceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Grace_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "grace.proto", }
Grace_ServiceDesc is the grpc.ServiceDesc for Grace service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var OpenAPI string
var StatusCode_name = map[int32]string{
0: "Pass",
1: "Rejected",
2: "Queue",
}
var StatusCode_value = map[string]int32{
"Pass": 0,
"Rejected": 1,
"Queue": 2,
}
Functions ¶
func RegisterExampleServer ¶
func RegisterExampleServer(s grpc.ServiceRegistrar, srv ExampleServer)
func RegisterGraceServer ¶
func RegisterGraceServer(s grpc.ServiceRegistrar, srv GraceServer)
func RunTestSwaggerFileServer ¶
func RunTestSwaggerFileServer()
Types ¶
type ExampleClient ¶
type ExampleClient interface { // 测试接口 ExampleTest(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleReply, error) }
ExampleClient is the client API for Example 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 NewExampleClient ¶
func NewExampleClient(cc grpc.ClientConnInterface) ExampleClient
type ExampleReply ¶
type ExampleReply struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Status StatusCode `protobuf:"varint,2,opt,name=status,proto3,enum=api.swaggerfileserver.StatusCode" json:"status,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ExampleReply) Descriptor ¶
func (*ExampleReply) Descriptor() ([]byte, []int)
func (*ExampleReply) GetCode ¶
func (m *ExampleReply) GetCode() int32
func (*ExampleReply) GetStatus ¶
func (m *ExampleReply) GetStatus() StatusCode
func (*ExampleReply) GetToken ¶
func (m *ExampleReply) GetToken() string
func (*ExampleReply) ProtoMessage ¶
func (*ExampleReply) ProtoMessage()
func (*ExampleReply) Reset ¶
func (m *ExampleReply) Reset()
func (*ExampleReply) String ¶
func (m *ExampleReply) String() string
func (*ExampleReply) XXX_DiscardUnknown ¶
func (m *ExampleReply) XXX_DiscardUnknown()
func (*ExampleReply) XXX_Marshal ¶
func (m *ExampleReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExampleReply) XXX_Merge ¶
func (m *ExampleReply) XXX_Merge(src proto.Message)
func (*ExampleReply) XXX_Size ¶
func (m *ExampleReply) XXX_Size() int
func (*ExampleReply) XXX_Unmarshal ¶
func (m *ExampleReply) XXX_Unmarshal(b []byte) error
type ExampleRequest ¶
type ExampleRequest struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` Ticket string `protobuf:"bytes,2,opt,name=ticket,proto3" json:"ticket,omitempty"` Params map[string]string `` /* 153-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ExampleRequest) Descriptor ¶
func (*ExampleRequest) Descriptor() ([]byte, []int)
func (*ExampleRequest) GetApi ¶
func (m *ExampleRequest) GetApi() string
func (*ExampleRequest) GetParams ¶
func (m *ExampleRequest) GetParams() map[string]string
func (*ExampleRequest) GetTicket ¶
func (m *ExampleRequest) GetTicket() string
func (*ExampleRequest) ProtoMessage ¶
func (*ExampleRequest) ProtoMessage()
func (*ExampleRequest) Reset ¶
func (m *ExampleRequest) Reset()
func (*ExampleRequest) String ¶
func (m *ExampleRequest) String() string
func (*ExampleRequest) XXX_DiscardUnknown ¶
func (m *ExampleRequest) XXX_DiscardUnknown()
func (*ExampleRequest) XXX_Marshal ¶
func (m *ExampleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExampleRequest) XXX_Merge ¶
func (m *ExampleRequest) XXX_Merge(src proto.Message)
func (*ExampleRequest) XXX_Size ¶
func (m *ExampleRequest) XXX_Size() int
func (*ExampleRequest) XXX_Unmarshal ¶
func (m *ExampleRequest) XXX_Unmarshal(b []byte) error
type ExampleServer ¶
type ExampleServer interface { // 测试接口 ExampleTest(context.Context, *ExampleRequest) (*ExampleReply, error) // contains filtered or unexported methods }
ExampleServer is the server API for Example service. All implementations must embed UnimplementedExampleServer for forward compatibility
type GraceClient ¶
type GraceClient interface {
SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloReply, error)
}
GraceClient is the client API for Grace 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 NewGraceClient ¶
func NewGraceClient(cc grpc.ClientConnInterface) GraceClient
type GraceServer ¶
type GraceServer interface { SayHello(context.Context, *SayHelloRequest) (*SayHelloReply, error) // contains filtered or unexported methods }
GraceServer is the server API for Grace service. All implementations must embed UnimplementedGraceServer for forward compatibility
type SayHelloReply ¶
type SayHelloReply struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` }
func (*SayHelloReply) Descriptor ¶
func (*SayHelloReply) Descriptor() ([]byte, []int)
func (*SayHelloReply) GoString ¶
func (this *SayHelloReply) GoString() string
func (*SayHelloReply) Marshal ¶
func (m *SayHelloReply) Marshal() (dAtA []byte, err error)
func (*SayHelloReply) MarshalToSizedBuffer ¶
func (m *SayHelloReply) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SayHelloReply) ProtoMessage ¶
func (*SayHelloReply) ProtoMessage()
func (*SayHelloReply) Reset ¶
func (m *SayHelloReply) Reset()
func (*SayHelloReply) Size ¶
func (m *SayHelloReply) Size() (n int)
func (*SayHelloReply) String ¶
func (m *SayHelloReply) String() string
func (*SayHelloReply) Unmarshal ¶
func (m *SayHelloReply) Unmarshal(dAtA []byte) error
func (*SayHelloReply) XXX_DiscardUnknown ¶
func (m *SayHelloReply) XXX_DiscardUnknown()
func (*SayHelloReply) XXX_Marshal ¶
func (m *SayHelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SayHelloReply) XXX_Merge ¶
func (m *SayHelloReply) XXX_Merge(src proto.Message)
func (*SayHelloReply) XXX_MessageName ¶
func (*SayHelloReply) XXX_MessageName() string
func (*SayHelloReply) XXX_Size ¶
func (m *SayHelloReply) XXX_Size() int
func (*SayHelloReply) XXX_Unmarshal ¶
func (m *SayHelloReply) XXX_Unmarshal(b []byte) error
type SayHelloRequest ¶
type SayHelloRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
请求
func (*SayHelloRequest) Descriptor ¶
func (*SayHelloRequest) Descriptor() ([]byte, []int)
func (*SayHelloRequest) GoString ¶
func (this *SayHelloRequest) GoString() string
func (*SayHelloRequest) Marshal ¶
func (m *SayHelloRequest) Marshal() (dAtA []byte, err error)
func (*SayHelloRequest) MarshalToSizedBuffer ¶
func (m *SayHelloRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SayHelloRequest) ProtoMessage ¶
func (*SayHelloRequest) ProtoMessage()
func (*SayHelloRequest) Reset ¶
func (m *SayHelloRequest) Reset()
func (*SayHelloRequest) Size ¶
func (m *SayHelloRequest) Size() (n int)
func (*SayHelloRequest) String ¶
func (m *SayHelloRequest) String() string
func (*SayHelloRequest) Unmarshal ¶
func (m *SayHelloRequest) Unmarshal(dAtA []byte) error
func (*SayHelloRequest) XXX_DiscardUnknown ¶
func (m *SayHelloRequest) XXX_DiscardUnknown()
func (*SayHelloRequest) XXX_Marshal ¶
func (m *SayHelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SayHelloRequest) XXX_Merge ¶
func (m *SayHelloRequest) XXX_Merge(src proto.Message)
func (*SayHelloRequest) XXX_MessageName ¶
func (*SayHelloRequest) XXX_MessageName() string
func (*SayHelloRequest) XXX_Size ¶
func (m *SayHelloRequest) XXX_Size() int
func (*SayHelloRequest) XXX_Unmarshal ¶
func (m *SayHelloRequest) XXX_Unmarshal(b []byte) error
type StatusCode ¶
type StatusCode int32
const ( StatusCode_Pass StatusCode = 0 StatusCode_Rejected StatusCode = 1 StatusCode_Queue StatusCode = 2 )
func (StatusCode) EnumDescriptor ¶
func (StatusCode) EnumDescriptor() ([]byte, []int)
func (StatusCode) String ¶
func (x StatusCode) String() string
type UnimplementedExampleServer ¶
type UnimplementedExampleServer struct { }
UnimplementedExampleServer must be embedded to have forward compatible implementations.
func (UnimplementedExampleServer) ExampleTest ¶
func (UnimplementedExampleServer) ExampleTest(context.Context, *ExampleRequest) (*ExampleReply, error)
type UnimplementedGraceServer ¶
type UnimplementedGraceServer struct { }
UnimplementedGraceServer must be embedded to have forward compatible implementations.
func (UnimplementedGraceServer) SayHello ¶
func (UnimplementedGraceServer) SayHello(context.Context, *SayHelloRequest) (*SayHelloReply, error)
type UnsafeExampleServer ¶
type UnsafeExampleServer interface {
// contains filtered or unexported methods
}
UnsafeExampleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleServer will result in compilation errors.
type UnsafeGraceServer ¶
type UnsafeGraceServer interface {
// contains filtered or unexported methods
}
UnsafeGraceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GraceServer will result in compilation errors.