generated from VLADIMIR/template
add addAction method
This commit is contained in:
parent
6177a05eac
commit
282e1b3aea
|
@ -25,6 +25,18 @@ service EveningDetective {
|
|||
get: "/teams"
|
||||
};
|
||||
}
|
||||
|
||||
rpc DeleteTeams(DeleteTeamsReq) returns (DeleteTeamsRsp) {
|
||||
option (google.api.http) = {
|
||||
delete: "/teams"
|
||||
};
|
||||
}
|
||||
|
||||
rpc AddAction(AddActionReq) returns (AddActionRsp) {
|
||||
option (google.api.http) = {
|
||||
post: "/actions"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message PingReq {}
|
||||
|
@ -65,3 +77,18 @@ message TeamAdvanced {
|
|||
message Application {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message DeleteTeamsReq {}
|
||||
|
||||
message DeleteTeamsRsp {}
|
||||
|
||||
message AddActionReq {
|
||||
string to = 1;
|
||||
}
|
||||
|
||||
message AddActionRsp {
|
||||
int64 id = 1;
|
||||
string to = 2;
|
||||
string text = 3;
|
||||
repeated Application applications = 4;
|
||||
}
|
||||
|
|
|
@ -27,3 +27,11 @@ func (s *Server) AddTeams(context.Context, *proto.AddTeamsReq) (*proto.AddTeamsR
|
|||
func (s *Server) GetTeams(context.Context, *proto.GetTeamsReq) (*proto.GetTeamsRsp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetTeams not implemented")
|
||||
}
|
||||
|
||||
func (s *Server) DeleteTeams(context.Context, *proto.DeleteTeamsReq) (*proto.DeleteTeamsRsp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteTeams not implemented")
|
||||
}
|
||||
|
||||
func (s *Server) AddAction(context.Context, *proto.AddActionReq) (*proto.AddActionRsp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddAction not implemented")
|
||||
}
|
||||
|
|
373
proto/main.pb.go
373
proto/main.pb.go
|
@ -504,6 +504,200 @@ func (x *Application) GetName() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
type DeleteTeamsReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DeleteTeamsReq) Reset() {
|
||||
*x = DeleteTeamsReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_main_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteTeamsReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteTeamsReq) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteTeamsReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_main_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteTeamsReq.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteTeamsReq) Descriptor() ([]byte, []int) {
|
||||
return file_main_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
type DeleteTeamsRsp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DeleteTeamsRsp) Reset() {
|
||||
*x = DeleteTeamsRsp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_main_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteTeamsRsp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteTeamsRsp) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteTeamsRsp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_main_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteTeamsRsp.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteTeamsRsp) Descriptor() ([]byte, []int) {
|
||||
return file_main_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
type AddActionReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AddActionReq) Reset() {
|
||||
*x = AddActionReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_main_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AddActionReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AddActionReq) ProtoMessage() {}
|
||||
|
||||
func (x *AddActionReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_main_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AddActionReq.ProtoReflect.Descriptor instead.
|
||||
func (*AddActionReq) Descriptor() ([]byte, []int) {
|
||||
return file_main_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *AddActionReq) GetTo() string {
|
||||
if x != nil {
|
||||
return x.To
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type AddActionRsp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
|
||||
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
|
||||
Applications []*Application `protobuf:"bytes,4,rep,name=applications,proto3" json:"applications,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AddActionRsp) Reset() {
|
||||
*x = AddActionRsp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_main_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AddActionRsp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AddActionRsp) ProtoMessage() {}
|
||||
|
||||
func (x *AddActionRsp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_main_proto_msgTypes[13]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AddActionRsp.ProtoReflect.Descriptor instead.
|
||||
func (*AddActionRsp) Descriptor() ([]byte, []int) {
|
||||
return file_main_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *AddActionRsp) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *AddActionRsp) GetTo() string {
|
||||
if x != nil {
|
||||
return x.To
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AddActionRsp) GetText() string {
|
||||
if x != nil {
|
||||
return x.Text
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AddActionRsp) GetApplications() []*Application {
|
||||
if x != nil {
|
||||
return x.Applications
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_main_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_main_proto_rawDesc = []byte{
|
||||
|
@ -545,28 +739,56 @@ var file_main_proto_rawDesc = []byte{
|
|||
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x21, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xc0, 0x02, 0x0a, 0x10, 0x45, 0x76, 0x65,
|
||||
0x6e, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x59, 0x0a,
|
||||
0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x65, 0x76,
|
||||
0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2e,
|
||||
0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e,
|
||||
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x22, 0x1e, 0x0a, 0x0c,
|
||||
0x41, 0x64, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x22, 0x8c, 0x01, 0x0a,
|
||||
0x0c, 0x41, 0x64, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x73, 0x70, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78,
|
||||
0x74, 0x12, 0x48, 0x0a, 0x0c, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e,
|
||||
0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76,
|
||||
0x65, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x73, 0x70, 0x22, 0x0d, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x07, 0x12, 0x05, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x69, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x54,
|
||||
0x65, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x65, 0x76, 0x65,
|
||||
0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x41,
|
||||
0x64, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x63, 0x72, 0x61,
|
||||
0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61,
|
||||
0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x9e, 0x04, 0x0a, 0x10,
|
||||
0x45, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
|
||||
0x12, 0x59, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73,
|
||||
0x2e, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69,
|
||||
0x76, 0x65, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x63, 0x72, 0x61,
|
||||
0x62, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63,
|
||||
0x74, 0x69, 0x76, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x73, 0x70,
|
||||
0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x3a, 0x01, 0x2a, 0x22, 0x06, 0x2f, 0x74, 0x65,
|
||||
0x61, 0x6d, 0x73, 0x12, 0x66, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12,
|
||||
0x24, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f,
|
||||
0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61,
|
||||
0x6d, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x65, 0x76,
|
||||
0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x22, 0x0e, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x08, 0x12, 0x06, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x42, 0x0b, 0x5a, 0x09, 0x70,
|
||||
0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x74, 0x69, 0x76, 0x65, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x73, 0x70, 0x22, 0x0d, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x07, 0x12, 0x05, 0x2f, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x69, 0x0a, 0x08, 0x41,
|
||||
0x64, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e,
|
||||
0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76,
|
||||
0x65, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e,
|
||||
0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65,
|
||||
0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x73,
|
||||
0x52, 0x73, 0x70, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x3a, 0x01, 0x2a, 0x22, 0x06,
|
||||
0x2f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x66, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61,
|
||||
0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x69,
|
||||
0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73,
|
||||
0x2e, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69,
|
||||
0x76, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x22, 0x0e,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x12, 0x06, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x6f,
|
||||
0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e,
|
||||
0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65,
|
||||
0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65,
|
||||
0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x65,
|
||||
0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
|
||||
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x22,
|
||||
0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x2a, 0x06, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x12,
|
||||
0x6b, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x63,
|
||||
0x72, 0x61, 0x62, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74,
|
||||
0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x63, 0x72, 0x61, 0x62, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e,
|
||||
0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x41, 0x64,
|
||||
0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x73, 0x70, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x0a, 0x22, 0x08, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0b, 0x5a, 0x09,
|
||||
0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -581,35 +803,44 @@ func file_main_proto_rawDescGZIP() []byte {
|
|||
return file_main_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_main_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_main_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_main_proto_goTypes = []interface{}{
|
||||
(*PingReq)(nil), // 0: crabs.evening_detective.PingReq
|
||||
(*PingRsp)(nil), // 1: crabs.evening_detective.PingRsp
|
||||
(*AddTeamsReq)(nil), // 2: crabs.evening_detective.AddTeamsReq
|
||||
(*Team)(nil), // 3: crabs.evening_detective.Team
|
||||
(*AddTeamsRsp)(nil), // 4: crabs.evening_detective.AddTeamsRsp
|
||||
(*TeamFull)(nil), // 5: crabs.evening_detective.TeamFull
|
||||
(*GetTeamsReq)(nil), // 6: crabs.evening_detective.GetTeamsReq
|
||||
(*GetTeamsRsp)(nil), // 7: crabs.evening_detective.GetTeamsRsp
|
||||
(*TeamAdvanced)(nil), // 8: crabs.evening_detective.TeamAdvanced
|
||||
(*Application)(nil), // 9: crabs.evening_detective.Application
|
||||
(*PingReq)(nil), // 0: crabs.evening_detective.PingReq
|
||||
(*PingRsp)(nil), // 1: crabs.evening_detective.PingRsp
|
||||
(*AddTeamsReq)(nil), // 2: crabs.evening_detective.AddTeamsReq
|
||||
(*Team)(nil), // 3: crabs.evening_detective.Team
|
||||
(*AddTeamsRsp)(nil), // 4: crabs.evening_detective.AddTeamsRsp
|
||||
(*TeamFull)(nil), // 5: crabs.evening_detective.TeamFull
|
||||
(*GetTeamsReq)(nil), // 6: crabs.evening_detective.GetTeamsReq
|
||||
(*GetTeamsRsp)(nil), // 7: crabs.evening_detective.GetTeamsRsp
|
||||
(*TeamAdvanced)(nil), // 8: crabs.evening_detective.TeamAdvanced
|
||||
(*Application)(nil), // 9: crabs.evening_detective.Application
|
||||
(*DeleteTeamsReq)(nil), // 10: crabs.evening_detective.DeleteTeamsReq
|
||||
(*DeleteTeamsRsp)(nil), // 11: crabs.evening_detective.DeleteTeamsRsp
|
||||
(*AddActionReq)(nil), // 12: crabs.evening_detective.AddActionReq
|
||||
(*AddActionRsp)(nil), // 13: crabs.evening_detective.AddActionRsp
|
||||
}
|
||||
var file_main_proto_depIdxs = []int32{
|
||||
3, // 0: crabs.evening_detective.AddTeamsReq.teams:type_name -> crabs.evening_detective.Team
|
||||
5, // 1: crabs.evening_detective.AddTeamsRsp.teams:type_name -> crabs.evening_detective.TeamFull
|
||||
8, // 2: crabs.evening_detective.GetTeamsRsp.teams:type_name -> crabs.evening_detective.TeamAdvanced
|
||||
9, // 3: crabs.evening_detective.TeamAdvanced.applications:type_name -> crabs.evening_detective.Application
|
||||
0, // 4: crabs.evening_detective.EveningDetective.Ping:input_type -> crabs.evening_detective.PingReq
|
||||
2, // 5: crabs.evening_detective.EveningDetective.AddTeams:input_type -> crabs.evening_detective.AddTeamsReq
|
||||
6, // 6: crabs.evening_detective.EveningDetective.GetTeams:input_type -> crabs.evening_detective.GetTeamsReq
|
||||
1, // 7: crabs.evening_detective.EveningDetective.Ping:output_type -> crabs.evening_detective.PingRsp
|
||||
4, // 8: crabs.evening_detective.EveningDetective.AddTeams:output_type -> crabs.evening_detective.AddTeamsRsp
|
||||
7, // 9: crabs.evening_detective.EveningDetective.GetTeams:output_type -> crabs.evening_detective.GetTeamsRsp
|
||||
7, // [7:10] is the sub-list for method output_type
|
||||
4, // [4:7] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
3, // 0: crabs.evening_detective.AddTeamsReq.teams:type_name -> crabs.evening_detective.Team
|
||||
5, // 1: crabs.evening_detective.AddTeamsRsp.teams:type_name -> crabs.evening_detective.TeamFull
|
||||
8, // 2: crabs.evening_detective.GetTeamsRsp.teams:type_name -> crabs.evening_detective.TeamAdvanced
|
||||
9, // 3: crabs.evening_detective.TeamAdvanced.applications:type_name -> crabs.evening_detective.Application
|
||||
9, // 4: crabs.evening_detective.AddActionRsp.applications:type_name -> crabs.evening_detective.Application
|
||||
0, // 5: crabs.evening_detective.EveningDetective.Ping:input_type -> crabs.evening_detective.PingReq
|
||||
2, // 6: crabs.evening_detective.EveningDetective.AddTeams:input_type -> crabs.evening_detective.AddTeamsReq
|
||||
6, // 7: crabs.evening_detective.EveningDetective.GetTeams:input_type -> crabs.evening_detective.GetTeamsReq
|
||||
10, // 8: crabs.evening_detective.EveningDetective.DeleteTeams:input_type -> crabs.evening_detective.DeleteTeamsReq
|
||||
12, // 9: crabs.evening_detective.EveningDetective.AddAction:input_type -> crabs.evening_detective.AddActionReq
|
||||
1, // 10: crabs.evening_detective.EveningDetective.Ping:output_type -> crabs.evening_detective.PingRsp
|
||||
4, // 11: crabs.evening_detective.EveningDetective.AddTeams:output_type -> crabs.evening_detective.AddTeamsRsp
|
||||
7, // 12: crabs.evening_detective.EveningDetective.GetTeams:output_type -> crabs.evening_detective.GetTeamsRsp
|
||||
11, // 13: crabs.evening_detective.EveningDetective.DeleteTeams:output_type -> crabs.evening_detective.DeleteTeamsRsp
|
||||
13, // 14: crabs.evening_detective.EveningDetective.AddAction:output_type -> crabs.evening_detective.AddActionRsp
|
||||
10, // [10:15] is the sub-list for method output_type
|
||||
5, // [5:10] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_main_proto_init() }
|
||||
|
@ -738,6 +969,54 @@ func file_main_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_main_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteTeamsReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_main_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteTeamsRsp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_main_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AddActionReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_main_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AddActionRsp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
@ -745,7 +1024,7 @@ func file_main_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_main_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 10,
|
||||
NumMessages: 14,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
|
|
@ -93,6 +93,60 @@ func local_request_EveningDetective_GetTeams_0(ctx context.Context, marshaler ru
|
|||
|
||||
}
|
||||
|
||||
func request_EveningDetective_DeleteTeams_0(ctx context.Context, marshaler runtime.Marshaler, client EveningDetectiveClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq DeleteTeamsReq
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.DeleteTeams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_EveningDetective_DeleteTeams_0(ctx context.Context, marshaler runtime.Marshaler, server EveningDetectiveServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq DeleteTeamsReq
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.DeleteTeams(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_EveningDetective_AddAction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_EveningDetective_AddAction_0(ctx context.Context, marshaler runtime.Marshaler, client EveningDetectiveClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq AddActionReq
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EveningDetective_AddAction_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.AddAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_EveningDetective_AddAction_0(ctx context.Context, marshaler runtime.Marshaler, server EveningDetectiveServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq AddActionReq
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_EveningDetective_AddAction_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.AddAction(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterEveningDetectiveHandlerServer registers the http handlers for service EveningDetective to "mux".
|
||||
// UnaryRPC :call EveningDetectiveServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
|
@ -174,6 +228,56 @@ func RegisterEveningDetectiveHandlerServer(ctx context.Context, mux *runtime.Ser
|
|||
|
||||
})
|
||||
|
||||
mux.Handle("DELETE", pattern_EveningDetective_DeleteTeams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/crabs.evening_detective.EveningDetective/DeleteTeams", runtime.WithHTTPPathPattern("/teams"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_EveningDetective_DeleteTeams_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_EveningDetective_DeleteTeams_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_EveningDetective_AddAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/crabs.evening_detective.EveningDetective/AddAction", runtime.WithHTTPPathPattern("/actions"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_EveningDetective_AddAction_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_EveningDetective_AddAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -281,6 +385,50 @@ func RegisterEveningDetectiveHandlerClient(ctx context.Context, mux *runtime.Ser
|
|||
|
||||
})
|
||||
|
||||
mux.Handle("DELETE", pattern_EveningDetective_DeleteTeams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/crabs.evening_detective.EveningDetective/DeleteTeams", runtime.WithHTTPPathPattern("/teams"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_EveningDetective_DeleteTeams_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_EveningDetective_DeleteTeams_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_EveningDetective_AddAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/crabs.evening_detective.EveningDetective/AddAction", runtime.WithHTTPPathPattern("/actions"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_EveningDetective_AddAction_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_EveningDetective_AddAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -290,6 +438,10 @@ var (
|
|||
pattern_EveningDetective_AddTeams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"teams"}, ""))
|
||||
|
||||
pattern_EveningDetective_GetTeams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"teams"}, ""))
|
||||
|
||||
pattern_EveningDetective_DeleteTeams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"teams"}, ""))
|
||||
|
||||
pattern_EveningDetective_AddAction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"actions"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -298,4 +450,8 @@ var (
|
|||
forward_EveningDetective_AddTeams_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_EveningDetective_GetTeams_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_EveningDetective_DeleteTeams_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_EveningDetective_AddAction_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
|
|
@ -11,6 +11,28 @@
|
|||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/actions": {
|
||||
"post": {
|
||||
"operationId": "EveningDetective_AddAction",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/evening_detectiveAddActionRsp"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"EveningDetective"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/ping": {
|
||||
"get": {
|
||||
"operationId": "EveningDetective_Ping",
|
||||
|
@ -54,6 +76,26 @@
|
|||
"EveningDetective"
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"operationId": "EveningDetective_DeleteTeams",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/evening_detectiveDeleteTeamsRsp"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"EveningDetective"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "EveningDetective_AddTeams",
|
||||
"responses": {
|
||||
|
@ -87,6 +129,27 @@
|
|||
}
|
||||
},
|
||||
"definitions": {
|
||||
"evening_detectiveAddActionRsp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"to": {
|
||||
"type": "string"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"applications": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/evening_detectiveApplication"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"evening_detectiveAddTeamsReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -117,6 +180,9 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"evening_detectiveDeleteTeamsRsp": {
|
||||
"type": "object"
|
||||
},
|
||||
"evening_detectiveGetTeamsRsp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
@ -19,9 +19,11 @@ import (
|
|||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
EveningDetective_Ping_FullMethodName = "/crabs.evening_detective.EveningDetective/Ping"
|
||||
EveningDetective_AddTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/AddTeams"
|
||||
EveningDetective_GetTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/GetTeams"
|
||||
EveningDetective_Ping_FullMethodName = "/crabs.evening_detective.EveningDetective/Ping"
|
||||
EveningDetective_AddTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/AddTeams"
|
||||
EveningDetective_GetTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/GetTeams"
|
||||
EveningDetective_DeleteTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/DeleteTeams"
|
||||
EveningDetective_AddAction_FullMethodName = "/crabs.evening_detective.EveningDetective/AddAction"
|
||||
)
|
||||
|
||||
// EveningDetectiveClient is the client API for EveningDetective service.
|
||||
|
@ -31,6 +33,8 @@ type EveningDetectiveClient interface {
|
|||
Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (*PingRsp, error)
|
||||
AddTeams(ctx context.Context, in *AddTeamsReq, opts ...grpc.CallOption) (*AddTeamsRsp, error)
|
||||
GetTeams(ctx context.Context, in *GetTeamsReq, opts ...grpc.CallOption) (*GetTeamsRsp, error)
|
||||
DeleteTeams(ctx context.Context, in *DeleteTeamsReq, opts ...grpc.CallOption) (*DeleteTeamsRsp, error)
|
||||
AddAction(ctx context.Context, in *AddActionReq, opts ...grpc.CallOption) (*AddActionRsp, error)
|
||||
}
|
||||
|
||||
type eveningDetectiveClient struct {
|
||||
|
@ -68,6 +72,24 @@ func (c *eveningDetectiveClient) GetTeams(ctx context.Context, in *GetTeamsReq,
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *eveningDetectiveClient) DeleteTeams(ctx context.Context, in *DeleteTeamsReq, opts ...grpc.CallOption) (*DeleteTeamsRsp, error) {
|
||||
out := new(DeleteTeamsRsp)
|
||||
err := c.cc.Invoke(ctx, EveningDetective_DeleteTeams_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *eveningDetectiveClient) AddAction(ctx context.Context, in *AddActionReq, opts ...grpc.CallOption) (*AddActionRsp, error) {
|
||||
out := new(AddActionRsp)
|
||||
err := c.cc.Invoke(ctx, EveningDetective_AddAction_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// EveningDetectiveServer is the server API for EveningDetective service.
|
||||
// All implementations must embed UnimplementedEveningDetectiveServer
|
||||
// for forward compatibility
|
||||
|
@ -75,6 +97,8 @@ type EveningDetectiveServer interface {
|
|||
Ping(context.Context, *PingReq) (*PingRsp, error)
|
||||
AddTeams(context.Context, *AddTeamsReq) (*AddTeamsRsp, error)
|
||||
GetTeams(context.Context, *GetTeamsReq) (*GetTeamsRsp, error)
|
||||
DeleteTeams(context.Context, *DeleteTeamsReq) (*DeleteTeamsRsp, error)
|
||||
AddAction(context.Context, *AddActionReq) (*AddActionRsp, error)
|
||||
mustEmbedUnimplementedEveningDetectiveServer()
|
||||
}
|
||||
|
||||
|
@ -91,6 +115,12 @@ func (UnimplementedEveningDetectiveServer) AddTeams(context.Context, *AddTeamsRe
|
|||
func (UnimplementedEveningDetectiveServer) GetTeams(context.Context, *GetTeamsReq) (*GetTeamsRsp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetTeams not implemented")
|
||||
}
|
||||
func (UnimplementedEveningDetectiveServer) DeleteTeams(context.Context, *DeleteTeamsReq) (*DeleteTeamsRsp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteTeams not implemented")
|
||||
}
|
||||
func (UnimplementedEveningDetectiveServer) AddAction(context.Context, *AddActionReq) (*AddActionRsp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddAction not implemented")
|
||||
}
|
||||
func (UnimplementedEveningDetectiveServer) mustEmbedUnimplementedEveningDetectiveServer() {}
|
||||
|
||||
// UnsafeEveningDetectiveServer may be embedded to opt out of forward compatibility for this service.
|
||||
|
@ -158,6 +188,42 @@ func _EveningDetective_GetTeams_Handler(srv interface{}, ctx context.Context, de
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _EveningDetective_DeleteTeams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteTeamsReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(EveningDetectiveServer).DeleteTeams(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: EveningDetective_DeleteTeams_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(EveningDetectiveServer).DeleteTeams(ctx, req.(*DeleteTeamsReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _EveningDetective_AddAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddActionReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(EveningDetectiveServer).AddAction(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: EveningDetective_AddAction_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(EveningDetectiveServer).AddAction(ctx, req.(*AddActionReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// EveningDetective_ServiceDesc is the grpc.ServiceDesc for EveningDetective service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
|
@ -177,6 +243,14 @@ var EveningDetective_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "GetTeams",
|
||||
Handler: _EveningDetective_GetTeams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteTeams",
|
||||
Handler: _EveningDetective_DeleteTeams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddAction",
|
||||
Handler: _EveningDetective_AddAction_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "main.proto",
|
||||
|
|
Loading…
Reference in New Issue