mirror of
https://github.com/fullstorydev/grpcurl.git
synced 2026-06-26 04:41:11 +03:00
Add "checkgenerate" make target to CI (#385)
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.14.0
|
||||
// protoc v4.22.0
|
||||
// source: support.proto
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
@@ -79,6 +75,7 @@ type ChatCustomerRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Req:
|
||||
//
|
||||
// *ChatCustomerRequest_Init
|
||||
// *ChatCustomerRequest_Msg
|
||||
// *ChatCustomerRequest_HangUp
|
||||
@@ -286,6 +283,7 @@ type ChatCustomerResponse struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Resp:
|
||||
//
|
||||
// *ChatCustomerResponse_Session
|
||||
// *ChatCustomerResponse_Msg
|
||||
Resp isChatCustomerResponse_Resp `protobuf_oneof:"resp"`
|
||||
@@ -371,6 +369,7 @@ type ChatAgentRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Req:
|
||||
//
|
||||
// *ChatAgentRequest_Accept
|
||||
// *ChatAgentRequest_Msg
|
||||
// *ChatAgentRequest_LeaveSession
|
||||
@@ -524,6 +523,7 @@ type ChatEntry struct {
|
||||
|
||||
Date *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"`
|
||||
// Types that are assignable to Entry:
|
||||
//
|
||||
// *ChatEntry_CustomerMsg
|
||||
// *ChatEntry_AgentMsg
|
||||
Entry isChatEntry_Entry `protobuf_oneof:"entry"`
|
||||
@@ -611,6 +611,7 @@ type ChatAgentResponse struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Resp:
|
||||
//
|
||||
// *ChatAgentResponse_AcceptedSession
|
||||
// *ChatAgentResponse_Msg
|
||||
// *ChatAgentResponse_SessionEnded
|
||||
@@ -1056,199 +1057,3 @@ func file_support_proto_init() {
|
||||
file_support_proto_goTypes = nil
|
||||
file_support_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// 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.SupportPackageIsVersion6
|
||||
|
||||
// SupportClient is the client API for Support service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type SupportClient interface {
|
||||
// ChatCustomer is used by a customer-facing app to send the customer's messages
|
||||
// to a chat session. The customer is how initiates and terminates (via "hangup")
|
||||
// a chat session. Only customers may invoke this method (e.g. requests must
|
||||
// include customer auth credentials).
|
||||
ChatCustomer(ctx context.Context, opts ...grpc.CallOption) (Support_ChatCustomerClient, error)
|
||||
// ChatAgent is used by an agent-facing app to allow an agent to reply to a
|
||||
// customer's messages in a chat session. The agent may accept a chat session,
|
||||
// which defaults to the session awaiting an agent for the longest period of time
|
||||
// (FIFO queue).
|
||||
ChatAgent(ctx context.Context, opts ...grpc.CallOption) (Support_ChatAgentClient, error)
|
||||
}
|
||||
|
||||
type supportClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSupportClient(cc grpc.ClientConnInterface) SupportClient {
|
||||
return &supportClient{cc}
|
||||
}
|
||||
|
||||
func (c *supportClient) ChatCustomer(ctx context.Context, opts ...grpc.CallOption) (Support_ChatCustomerClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Support_serviceDesc.Streams[0], "/Support/ChatCustomer", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &supportChatCustomerClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Support_ChatCustomerClient interface {
|
||||
Send(*ChatCustomerRequest) error
|
||||
Recv() (*ChatCustomerResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type supportChatCustomerClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *supportChatCustomerClient) Send(m *ChatCustomerRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *supportChatCustomerClient) Recv() (*ChatCustomerResponse, error) {
|
||||
m := new(ChatCustomerResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *supportClient) ChatAgent(ctx context.Context, opts ...grpc.CallOption) (Support_ChatAgentClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Support_serviceDesc.Streams[1], "/Support/ChatAgent", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &supportChatAgentClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Support_ChatAgentClient interface {
|
||||
Send(*ChatAgentRequest) error
|
||||
Recv() (*ChatAgentResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type supportChatAgentClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *supportChatAgentClient) Send(m *ChatAgentRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *supportChatAgentClient) Recv() (*ChatAgentResponse, error) {
|
||||
m := new(ChatAgentResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// SupportServer is the server API for Support service.
|
||||
type SupportServer interface {
|
||||
// ChatCustomer is used by a customer-facing app to send the customer's messages
|
||||
// to a chat session. The customer is how initiates and terminates (via "hangup")
|
||||
// a chat session. Only customers may invoke this method (e.g. requests must
|
||||
// include customer auth credentials).
|
||||
ChatCustomer(Support_ChatCustomerServer) error
|
||||
// ChatAgent is used by an agent-facing app to allow an agent to reply to a
|
||||
// customer's messages in a chat session. The agent may accept a chat session,
|
||||
// which defaults to the session awaiting an agent for the longest period of time
|
||||
// (FIFO queue).
|
||||
ChatAgent(Support_ChatAgentServer) error
|
||||
}
|
||||
|
||||
// UnimplementedSupportServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedSupportServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedSupportServer) ChatCustomer(Support_ChatCustomerServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method ChatCustomer not implemented")
|
||||
}
|
||||
func (*UnimplementedSupportServer) ChatAgent(Support_ChatAgentServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method ChatAgent not implemented")
|
||||
}
|
||||
|
||||
func RegisterSupportServer(s *grpc.Server, srv SupportServer) {
|
||||
s.RegisterService(&_Support_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Support_ChatCustomer_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(SupportServer).ChatCustomer(&supportChatCustomerServer{stream})
|
||||
}
|
||||
|
||||
type Support_ChatCustomerServer interface {
|
||||
Send(*ChatCustomerResponse) error
|
||||
Recv() (*ChatCustomerRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type supportChatCustomerServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *supportChatCustomerServer) Send(m *ChatCustomerResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *supportChatCustomerServer) Recv() (*ChatCustomerRequest, error) {
|
||||
m := new(ChatCustomerRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _Support_ChatAgent_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(SupportServer).ChatAgent(&supportChatAgentServer{stream})
|
||||
}
|
||||
|
||||
type Support_ChatAgentServer interface {
|
||||
Send(*ChatAgentResponse) error
|
||||
Recv() (*ChatAgentRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type supportChatAgentServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *supportChatAgentServer) Send(m *ChatAgentResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *supportChatAgentServer) Recv() (*ChatAgentRequest, error) {
|
||||
m := new(ChatAgentRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
var _Support_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "Support",
|
||||
HandlerType: (*SupportServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "ChatCustomer",
|
||||
Handler: _Support_ChatCustomer_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "ChatAgent",
|
||||
Handler: _Support_ChatAgent_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "support.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user