diff --git a/api/main.proto b/api/main.proto index c197de7..a5f8c6c 100644 --- a/api/main.proto +++ b/api/main.proto @@ -26,6 +26,18 @@ service EveningDetective { }; } + rpc GetTeamsCSV(GetTeamsCSVReq) returns (GetTeamsCSVRsp) { + option (google.api.http) = { + get: "/csv" + }; + } + + rpc GetTeam(GetTeamReq) returns (GetTeamRsp) { + option (google.api.http) = { + get: "/teams/{id}" + }; + } + rpc DeleteTeams(DeleteTeamsReq) returns (DeleteTeamsRsp) { option (google.api.http) = { delete: "/teams" @@ -37,6 +49,27 @@ service EveningDetective { post: "/actions" }; } + + rpc GameStart(GameStartReq) returns (GameStartRsp) { + option (google.api.http) = { + post: "/game/start", + body: "*" + }; + } + + rpc GameStop(GameStopReq) returns (GameStopRsp) { + option (google.api.http) = { + post: "/game/stop", + body: "*" + }; + } + + rpc GiveApplications(GiveApplicationsReq) returns (GiveApplicationsRsp) { + option (google.api.http) = { + post: "/teams/{teamId}/applications", + body: "*" + }; + } } message PingReq {} @@ -67,6 +100,12 @@ message GetTeamsRsp { repeated TeamAdvanced teams = 1; } +message GetTeamsCSVReq {} + +message GetTeamsCSVRsp { + string data = 1; +} + message TeamAdvanced { int64 id = 1; string name = 2; @@ -78,6 +117,14 @@ message Application { string name = 1; } +message GetTeamReq { + int64 id = 1; +} + +message GetTeamRsp { + repeated AddActionRsp actions = 1; +} + message DeleteTeamsReq {} message DeleteTeamsRsp {} @@ -92,3 +139,20 @@ message AddActionRsp { string text = 3; repeated Application applications = 4; } + +message GameStartReq {} + +message GameStartRsp {} + +message GameStopReq { + int64 timeSeconds = 1; +} + +message GameStopRsp {} + +message GiveApplicationsReq { + int64 teamId = 1; + repeated Application applications = 2; +} + +message GiveApplicationsRsp {} diff --git a/internal/app/server.go b/internal/app/server.go index 801a1ef..72ae6b6 100644 --- a/internal/app/server.go +++ b/internal/app/server.go @@ -28,6 +28,10 @@ func (s *Server) GetTeams(context.Context, *proto.GetTeamsReq) (*proto.GetTeamsR return nil, status.Errorf(codes.Unimplemented, "method GetTeams not implemented") } +func (s *Server) GetTeamsCSV(context.Context, *proto.GetTeamsCSVReq) (*proto.GetTeamsCSVRsp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTeamsCSV not implemented") +} + func (s *Server) DeleteTeams(context.Context, *proto.DeleteTeamsReq) (*proto.DeleteTeamsRsp, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteTeams not implemented") } @@ -35,3 +39,15 @@ func (s *Server) DeleteTeams(context.Context, *proto.DeleteTeamsReq) (*proto.Del func (s *Server) AddAction(context.Context, *proto.AddActionReq) (*proto.AddActionRsp, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAction not implemented") } + +func (s *Server) GameStart(context.Context, *proto.GameStartReq) (*proto.GameStartRsp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GameStart not implemented") +} + +func (s *Server) GameStop(context.Context, *proto.GameStopReq) (*proto.GameStopRsp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GameStop not implemented") +} + +func (s *Server) GiveApplications(context.Context, *proto.GiveApplicationsReq) (*proto.GiveApplicationsRsp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GiveApplications not implemented") +} diff --git a/proto/main.pb.go b/proto/main.pb.go index 15eadd8..afc638d 100644 --- a/proto/main.pb.go +++ b/proto/main.pb.go @@ -386,6 +386,91 @@ func (x *GetTeamsRsp) GetTeams() []*TeamAdvanced { return nil } +type GetTeamsCSVReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetTeamsCSVReq) Reset() { + *x = GetTeamsCSVReq{} + if protoimpl.UnsafeEnabled { + mi := &file_main_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTeamsCSVReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTeamsCSVReq) ProtoMessage() {} + +func (x *GetTeamsCSVReq) ProtoReflect() protoreflect.Message { + mi := &file_main_proto_msgTypes[8] + 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 GetTeamsCSVReq.ProtoReflect.Descriptor instead. +func (*GetTeamsCSVReq) Descriptor() ([]byte, []int) { + return file_main_proto_rawDescGZIP(), []int{8} +} + +type GetTeamsCSVRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *GetTeamsCSVRsp) Reset() { + *x = GetTeamsCSVRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_main_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTeamsCSVRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTeamsCSVRsp) ProtoMessage() {} + +func (x *GetTeamsCSVRsp) ProtoReflect() protoreflect.Message { + mi := &file_main_proto_msgTypes[9] + 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 GetTeamsCSVRsp.ProtoReflect.Descriptor instead. +func (*GetTeamsCSVRsp) Descriptor() ([]byte, []int) { + return file_main_proto_rawDescGZIP(), []int{9} +} + +func (x *GetTeamsCSVRsp) GetData() string { + if x != nil { + return x.Data + } + return "" +} + type TeamAdvanced struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -400,7 +485,7 @@ type TeamAdvanced struct { func (x *TeamAdvanced) Reset() { *x = TeamAdvanced{} if protoimpl.UnsafeEnabled { - mi := &file_main_proto_msgTypes[8] + mi := &file_main_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -413,7 +498,7 @@ func (x *TeamAdvanced) String() string { func (*TeamAdvanced) ProtoMessage() {} func (x *TeamAdvanced) ProtoReflect() protoreflect.Message { - mi := &file_main_proto_msgTypes[8] + mi := &file_main_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -426,7 +511,7 @@ func (x *TeamAdvanced) ProtoReflect() protoreflect.Message { // Deprecated: Use TeamAdvanced.ProtoReflect.Descriptor instead. func (*TeamAdvanced) Descriptor() ([]byte, []int) { - return file_main_proto_rawDescGZIP(), []int{8} + return file_main_proto_rawDescGZIP(), []int{10} } func (x *TeamAdvanced) GetId() int64 { @@ -468,7 +553,7 @@ type Application struct { func (x *Application) Reset() { *x = Application{} if protoimpl.UnsafeEnabled { - mi := &file_main_proto_msgTypes[9] + mi := &file_main_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -481,7 +566,7 @@ func (x *Application) String() string { func (*Application) ProtoMessage() {} func (x *Application) ProtoReflect() protoreflect.Message { - mi := &file_main_proto_msgTypes[9] + mi := &file_main_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -494,7 +579,7 @@ func (x *Application) ProtoReflect() protoreflect.Message { // Deprecated: Use Application.ProtoReflect.Descriptor instead. func (*Application) Descriptor() ([]byte, []int) { - return file_main_proto_rawDescGZIP(), []int{9} + return file_main_proto_rawDescGZIP(), []int{11} } func (x *Application) GetName() string { @@ -504,6 +589,100 @@ func (x *Application) GetName() string { return "" } +type GetTeamReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetTeamReq) Reset() { + *x = GetTeamReq{} + if protoimpl.UnsafeEnabled { + mi := &file_main_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTeamReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTeamReq) ProtoMessage() {} + +func (x *GetTeamReq) 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 GetTeamReq.ProtoReflect.Descriptor instead. +func (*GetTeamReq) Descriptor() ([]byte, []int) { + return file_main_proto_rawDescGZIP(), []int{12} +} + +func (x *GetTeamReq) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +type GetTeamRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Actions []*AddActionRsp `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` +} + +func (x *GetTeamRsp) Reset() { + *x = GetTeamRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_main_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTeamRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTeamRsp) ProtoMessage() {} + +func (x *GetTeamRsp) 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 GetTeamRsp.ProtoReflect.Descriptor instead. +func (*GetTeamRsp) Descriptor() ([]byte, []int) { + return file_main_proto_rawDescGZIP(), []int{13} +} + +func (x *GetTeamRsp) GetActions() []*AddActionRsp { + if x != nil { + return x.Actions + } + return nil +} + type DeleteTeamsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -513,7 +692,7 @@ type DeleteTeamsReq struct { func (x *DeleteTeamsReq) Reset() { *x = DeleteTeamsReq{} if protoimpl.UnsafeEnabled { - mi := &file_main_proto_msgTypes[10] + mi := &file_main_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -526,7 +705,7 @@ func (x *DeleteTeamsReq) String() string { func (*DeleteTeamsReq) ProtoMessage() {} func (x *DeleteTeamsReq) ProtoReflect() protoreflect.Message { - mi := &file_main_proto_msgTypes[10] + mi := &file_main_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -539,7 +718,7 @@ func (x *DeleteTeamsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteTeamsReq.ProtoReflect.Descriptor instead. func (*DeleteTeamsReq) Descriptor() ([]byte, []int) { - return file_main_proto_rawDescGZIP(), []int{10} + return file_main_proto_rawDescGZIP(), []int{14} } type DeleteTeamsRsp struct { @@ -551,7 +730,7 @@ type DeleteTeamsRsp struct { func (x *DeleteTeamsRsp) Reset() { *x = DeleteTeamsRsp{} if protoimpl.UnsafeEnabled { - mi := &file_main_proto_msgTypes[11] + mi := &file_main_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -564,7 +743,7 @@ func (x *DeleteTeamsRsp) String() string { func (*DeleteTeamsRsp) ProtoMessage() {} func (x *DeleteTeamsRsp) ProtoReflect() protoreflect.Message { - mi := &file_main_proto_msgTypes[11] + mi := &file_main_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -577,7 +756,7 @@ func (x *DeleteTeamsRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteTeamsRsp.ProtoReflect.Descriptor instead. func (*DeleteTeamsRsp) Descriptor() ([]byte, []int) { - return file_main_proto_rawDescGZIP(), []int{11} + return file_main_proto_rawDescGZIP(), []int{15} } type AddActionReq struct { @@ -591,7 +770,7 @@ type AddActionReq struct { func (x *AddActionReq) Reset() { *x = AddActionReq{} if protoimpl.UnsafeEnabled { - mi := &file_main_proto_msgTypes[12] + mi := &file_main_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -604,7 +783,7 @@ func (x *AddActionReq) String() string { func (*AddActionReq) ProtoMessage() {} func (x *AddActionReq) ProtoReflect() protoreflect.Message { - mi := &file_main_proto_msgTypes[12] + mi := &file_main_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -617,7 +796,7 @@ func (x *AddActionReq) ProtoReflect() protoreflect.Message { // Deprecated: Use AddActionReq.ProtoReflect.Descriptor instead. func (*AddActionReq) Descriptor() ([]byte, []int) { - return file_main_proto_rawDescGZIP(), []int{12} + return file_main_proto_rawDescGZIP(), []int{16} } func (x *AddActionReq) GetTo() string { @@ -641,7 +820,7 @@ type AddActionRsp struct { func (x *AddActionRsp) Reset() { *x = AddActionRsp{} if protoimpl.UnsafeEnabled { - mi := &file_main_proto_msgTypes[13] + mi := &file_main_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -654,7 +833,7 @@ func (x *AddActionRsp) String() string { func (*AddActionRsp) ProtoMessage() {} func (x *AddActionRsp) ProtoReflect() protoreflect.Message { - mi := &file_main_proto_msgTypes[13] + mi := &file_main_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -667,7 +846,7 @@ func (x *AddActionRsp) ProtoReflect() protoreflect.Message { // Deprecated: Use AddActionRsp.ProtoReflect.Descriptor instead. func (*AddActionRsp) Descriptor() ([]byte, []int) { - return file_main_proto_rawDescGZIP(), []int{13} + return file_main_proto_rawDescGZIP(), []int{17} } func (x *AddActionRsp) GetId() int64 { @@ -698,6 +877,260 @@ func (x *AddActionRsp) GetApplications() []*Application { return nil } +type GameStartReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GameStartReq) Reset() { + *x = GameStartReq{} + if protoimpl.UnsafeEnabled { + mi := &file_main_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameStartReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameStartReq) ProtoMessage() {} + +func (x *GameStartReq) ProtoReflect() protoreflect.Message { + mi := &file_main_proto_msgTypes[18] + 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 GameStartReq.ProtoReflect.Descriptor instead. +func (*GameStartReq) Descriptor() ([]byte, []int) { + return file_main_proto_rawDescGZIP(), []int{18} +} + +type GameStartRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GameStartRsp) Reset() { + *x = GameStartRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_main_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameStartRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameStartRsp) ProtoMessage() {} + +func (x *GameStartRsp) ProtoReflect() protoreflect.Message { + mi := &file_main_proto_msgTypes[19] + 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 GameStartRsp.ProtoReflect.Descriptor instead. +func (*GameStartRsp) Descriptor() ([]byte, []int) { + return file_main_proto_rawDescGZIP(), []int{19} +} + +type GameStopReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TimeSeconds int64 `protobuf:"varint,1,opt,name=timeSeconds,proto3" json:"timeSeconds,omitempty"` +} + +func (x *GameStopReq) Reset() { + *x = GameStopReq{} + if protoimpl.UnsafeEnabled { + mi := &file_main_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameStopReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameStopReq) ProtoMessage() {} + +func (x *GameStopReq) ProtoReflect() protoreflect.Message { + mi := &file_main_proto_msgTypes[20] + 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 GameStopReq.ProtoReflect.Descriptor instead. +func (*GameStopReq) Descriptor() ([]byte, []int) { + return file_main_proto_rawDescGZIP(), []int{20} +} + +func (x *GameStopReq) GetTimeSeconds() int64 { + if x != nil { + return x.TimeSeconds + } + return 0 +} + +type GameStopRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GameStopRsp) Reset() { + *x = GameStopRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_main_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameStopRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameStopRsp) ProtoMessage() {} + +func (x *GameStopRsp) ProtoReflect() protoreflect.Message { + mi := &file_main_proto_msgTypes[21] + 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 GameStopRsp.ProtoReflect.Descriptor instead. +func (*GameStopRsp) Descriptor() ([]byte, []int) { + return file_main_proto_rawDescGZIP(), []int{21} +} + +type GiveApplicationsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TeamId int64 `protobuf:"varint,1,opt,name=teamId,proto3" json:"teamId,omitempty"` + Applications []*Application `protobuf:"bytes,2,rep,name=applications,proto3" json:"applications,omitempty"` +} + +func (x *GiveApplicationsReq) Reset() { + *x = GiveApplicationsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_main_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GiveApplicationsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GiveApplicationsReq) ProtoMessage() {} + +func (x *GiveApplicationsReq) ProtoReflect() protoreflect.Message { + mi := &file_main_proto_msgTypes[22] + 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 GiveApplicationsReq.ProtoReflect.Descriptor instead. +func (*GiveApplicationsReq) Descriptor() ([]byte, []int) { + return file_main_proto_rawDescGZIP(), []int{22} +} + +func (x *GiveApplicationsReq) GetTeamId() int64 { + if x != nil { + return x.TeamId + } + return 0 +} + +func (x *GiveApplicationsReq) GetApplications() []*Application { + if x != nil { + return x.Applications + } + return nil +} + +type GiveApplicationsRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GiveApplicationsRsp) Reset() { + *x = GiveApplicationsRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_main_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GiveApplicationsRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GiveApplicationsRsp) ProtoMessage() {} + +func (x *GiveApplicationsRsp) ProtoReflect() protoreflect.Message { + mi := &file_main_proto_msgTypes[23] + 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 GiveApplicationsRsp.ProtoReflect.Descriptor instead. +func (*GiveApplicationsRsp) Descriptor() ([]byte, []int) { + return file_main_proto_rawDescGZIP(), []int{23} +} + var File_main_proto protoreflect.FileDescriptor var file_main_proto_rawDesc = []byte{ @@ -727,68 +1160,130 @@ var file_main_proto_rawDesc = []byte{ 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, - 0x64, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x61, - 0x6d, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 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, 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, 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, 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, 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, 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, + 0x64, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, + 0x65, 0x61, 0x6d, 0x73, 0x43, 0x53, 0x56, 0x52, 0x65, 0x71, 0x22, 0x24, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x43, 0x53, 0x56, 0x52, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x61, 0x6d, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x54, + 0x69, 0x6d, 0x65, 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, 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, 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, + 0x22, 0x1c, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4d, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x07, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 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, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x73, 0x70, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 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, + 0x65, 0x63, 0x74, 0x69, 0x76, 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, + 0x22, 0x0e, 0x0a, 0x0c, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x22, 0x0e, 0x0a, 0x0c, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x73, 0x70, + 0x22, 0x2f, 0x0a, 0x0b, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x12, + 0x20, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x73, 0x22, 0x0d, 0x0a, 0x0b, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x73, 0x70, + 0x22, 0x77, 0x0a, 0x13, 0x47, 0x69, 0x76, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, + 0x48, 0x0a, 0x0c, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x02, 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, + 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, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x69, 0x76, + 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x73, 0x70, + 0x32, 0xf3, 0x08, 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, 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, 0x6d, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x43, + 0x53, 0x56, 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, 0x47, 0x65, 0x74, + 0x54, 0x65, 0x61, 0x6d, 0x73, 0x43, 0x53, 0x56, 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, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x43, 0x53, + 0x56, 0x52, 0x73, 0x70, 0x22, 0x0c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x06, 0x12, 0x04, 0x2f, 0x63, + 0x73, 0x76, 0x12, 0x68, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x23, 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, 0x52, + 0x65, 0x71, 0x1a, 0x23, 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, 0x52, 0x73, 0x70, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, + 0x0b, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 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, 0x12, 0x71, 0x0a, 0x09, 0x47, 0x61, + 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 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, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 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, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x52, 0x73, 0x70, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, + 0x22, 0x0b, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x6d, 0x0a, + 0x08, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x6f, 0x70, 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, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x6f, 0x70, 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, 0x61, 0x6d, 0x65, 0x53, 0x74, + 0x6f, 0x70, 0x52, 0x73, 0x70, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, + 0x22, 0x0a, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x12, 0x97, 0x01, 0x0a, + 0x10, 0x47, 0x69, 0x76, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x2c, 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, 0x69, 0x76, 0x65, + 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, + 0x2c, 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, 0x69, 0x76, 0x65, 0x41, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x73, 0x70, 0x22, 0x27, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x73, + 0x2f, 0x7b, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x7d, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 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 ( @@ -803,44 +1298,66 @@ func file_main_proto_rawDescGZIP() []byte { return file_main_proto_rawDescData } -var file_main_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_main_proto_msgTypes = make([]protoimpl.MessageInfo, 24) 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 - (*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 + (*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 + (*GetTeamsCSVReq)(nil), // 8: crabs.evening_detective.GetTeamsCSVReq + (*GetTeamsCSVRsp)(nil), // 9: crabs.evening_detective.GetTeamsCSVRsp + (*TeamAdvanced)(nil), // 10: crabs.evening_detective.TeamAdvanced + (*Application)(nil), // 11: crabs.evening_detective.Application + (*GetTeamReq)(nil), // 12: crabs.evening_detective.GetTeamReq + (*GetTeamRsp)(nil), // 13: crabs.evening_detective.GetTeamRsp + (*DeleteTeamsReq)(nil), // 14: crabs.evening_detective.DeleteTeamsReq + (*DeleteTeamsRsp)(nil), // 15: crabs.evening_detective.DeleteTeamsRsp + (*AddActionReq)(nil), // 16: crabs.evening_detective.AddActionReq + (*AddActionRsp)(nil), // 17: crabs.evening_detective.AddActionRsp + (*GameStartReq)(nil), // 18: crabs.evening_detective.GameStartReq + (*GameStartRsp)(nil), // 19: crabs.evening_detective.GameStartRsp + (*GameStopReq)(nil), // 20: crabs.evening_detective.GameStopReq + (*GameStopRsp)(nil), // 21: crabs.evening_detective.GameStopRsp + (*GiveApplicationsReq)(nil), // 22: crabs.evening_detective.GiveApplicationsReq + (*GiveApplicationsRsp)(nil), // 23: crabs.evening_detective.GiveApplicationsRsp } 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 - 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 + 10, // 2: crabs.evening_detective.GetTeamsRsp.teams:type_name -> crabs.evening_detective.TeamAdvanced + 11, // 3: crabs.evening_detective.TeamAdvanced.applications:type_name -> crabs.evening_detective.Application + 17, // 4: crabs.evening_detective.GetTeamRsp.actions:type_name -> crabs.evening_detective.AddActionRsp + 11, // 5: crabs.evening_detective.AddActionRsp.applications:type_name -> crabs.evening_detective.Application + 11, // 6: crabs.evening_detective.GiveApplicationsReq.applications:type_name -> crabs.evening_detective.Application + 0, // 7: crabs.evening_detective.EveningDetective.Ping:input_type -> crabs.evening_detective.PingReq + 2, // 8: crabs.evening_detective.EveningDetective.AddTeams:input_type -> crabs.evening_detective.AddTeamsReq + 6, // 9: crabs.evening_detective.EveningDetective.GetTeams:input_type -> crabs.evening_detective.GetTeamsReq + 8, // 10: crabs.evening_detective.EveningDetective.GetTeamsCSV:input_type -> crabs.evening_detective.GetTeamsCSVReq + 12, // 11: crabs.evening_detective.EveningDetective.GetTeam:input_type -> crabs.evening_detective.GetTeamReq + 14, // 12: crabs.evening_detective.EveningDetective.DeleteTeams:input_type -> crabs.evening_detective.DeleteTeamsReq + 16, // 13: crabs.evening_detective.EveningDetective.AddAction:input_type -> crabs.evening_detective.AddActionReq + 18, // 14: crabs.evening_detective.EveningDetective.GameStart:input_type -> crabs.evening_detective.GameStartReq + 20, // 15: crabs.evening_detective.EveningDetective.GameStop:input_type -> crabs.evening_detective.GameStopReq + 22, // 16: crabs.evening_detective.EveningDetective.GiveApplications:input_type -> crabs.evening_detective.GiveApplicationsReq + 1, // 17: crabs.evening_detective.EveningDetective.Ping:output_type -> crabs.evening_detective.PingRsp + 4, // 18: crabs.evening_detective.EveningDetective.AddTeams:output_type -> crabs.evening_detective.AddTeamsRsp + 7, // 19: crabs.evening_detective.EveningDetective.GetTeams:output_type -> crabs.evening_detective.GetTeamsRsp + 9, // 20: crabs.evening_detective.EveningDetective.GetTeamsCSV:output_type -> crabs.evening_detective.GetTeamsCSVRsp + 13, // 21: crabs.evening_detective.EveningDetective.GetTeam:output_type -> crabs.evening_detective.GetTeamRsp + 15, // 22: crabs.evening_detective.EveningDetective.DeleteTeams:output_type -> crabs.evening_detective.DeleteTeamsRsp + 17, // 23: crabs.evening_detective.EveningDetective.AddAction:output_type -> crabs.evening_detective.AddActionRsp + 19, // 24: crabs.evening_detective.EveningDetective.GameStart:output_type -> crabs.evening_detective.GameStartRsp + 21, // 25: crabs.evening_detective.EveningDetective.GameStop:output_type -> crabs.evening_detective.GameStopRsp + 23, // 26: crabs.evening_detective.EveningDetective.GiveApplications:output_type -> crabs.evening_detective.GiveApplicationsRsp + 17, // [17:27] is the sub-list for method output_type + 7, // [7:17] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_main_proto_init() } @@ -946,7 +1463,7 @@ func file_main_proto_init() { } } file_main_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamAdvanced); i { + switch v := v.(*GetTeamsCSVReq); i { case 0: return &v.state case 1: @@ -958,7 +1475,7 @@ func file_main_proto_init() { } } file_main_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Application); i { + switch v := v.(*GetTeamsCSVRsp); i { case 0: return &v.state case 1: @@ -970,7 +1487,7 @@ func file_main_proto_init() { } } file_main_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteTeamsReq); i { + switch v := v.(*TeamAdvanced); i { case 0: return &v.state case 1: @@ -982,7 +1499,7 @@ func file_main_proto_init() { } } file_main_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteTeamsRsp); i { + switch v := v.(*Application); i { case 0: return &v.state case 1: @@ -994,7 +1511,7 @@ func file_main_proto_init() { } } file_main_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddActionReq); i { + switch v := v.(*GetTeamReq); i { case 0: return &v.state case 1: @@ -1006,6 +1523,54 @@ func file_main_proto_init() { } } file_main_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTeamRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_main_proto_msgTypes[14].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[15].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[16].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[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddActionRsp); i { case 0: return &v.state @@ -1017,6 +1582,78 @@ func file_main_proto_init() { return nil } } + file_main_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameStartReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_main_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameStartRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_main_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameStopReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_main_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GameStopRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_main_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GiveApplicationsReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_main_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GiveApplicationsRsp); 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{ @@ -1024,7 +1661,7 @@ func file_main_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_main_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/main.pb.gw.go b/proto/main.pb.gw.go index 88ccbfb..8eb364e 100644 --- a/proto/main.pb.gw.go +++ b/proto/main.pb.gw.go @@ -93,6 +93,76 @@ func local_request_EveningDetective_GetTeams_0(ctx context.Context, marshaler ru } +func request_EveningDetective_GetTeamsCSV_0(ctx context.Context, marshaler runtime.Marshaler, client EveningDetectiveClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTeamsCSVReq + var metadata runtime.ServerMetadata + + msg, err := client.GetTeamsCSV(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EveningDetective_GetTeamsCSV_0(ctx context.Context, marshaler runtime.Marshaler, server EveningDetectiveServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTeamsCSVReq + var metadata runtime.ServerMetadata + + msg, err := server.GetTeamsCSV(ctx, &protoReq) + return msg, metadata, err + +} + +func request_EveningDetective_GetTeam_0(ctx context.Context, marshaler runtime.Marshaler, client EveningDetectiveClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTeamReq + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int64(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetTeam(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EveningDetective_GetTeam_0(ctx context.Context, marshaler runtime.Marshaler, server EveningDetectiveServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTeamReq + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Int64(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetTeam(ctx, &protoReq) + return msg, metadata, err + +} + 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 @@ -147,6 +217,118 @@ func local_request_EveningDetective_AddAction_0(ctx context.Context, marshaler r } +func request_EveningDetective_GameStart_0(ctx context.Context, marshaler runtime.Marshaler, client EveningDetectiveClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GameStartReq + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GameStart(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EveningDetective_GameStart_0(ctx context.Context, marshaler runtime.Marshaler, server EveningDetectiveServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GameStartReq + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GameStart(ctx, &protoReq) + return msg, metadata, err + +} + +func request_EveningDetective_GameStop_0(ctx context.Context, marshaler runtime.Marshaler, client EveningDetectiveClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GameStopReq + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GameStop(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EveningDetective_GameStop_0(ctx context.Context, marshaler runtime.Marshaler, server EveningDetectiveServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GameStopReq + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GameStop(ctx, &protoReq) + return msg, metadata, err + +} + +func request_EveningDetective_GiveApplications_0(ctx context.Context, marshaler runtime.Marshaler, client EveningDetectiveClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GiveApplicationsReq + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["teamId"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "teamId") + } + + protoReq.TeamId, err = runtime.Int64(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "teamId", err) + } + + msg, err := client.GiveApplications(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_EveningDetective_GiveApplications_0(ctx context.Context, marshaler runtime.Marshaler, server EveningDetectiveServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GiveApplicationsReq + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["teamId"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "teamId") + } + + protoReq.TeamId, err = runtime.Int64(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "teamId", err) + } + + msg, err := server.GiveApplications(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. @@ -228,6 +410,56 @@ func RegisterEveningDetectiveHandlerServer(ctx context.Context, mux *runtime.Ser }) + mux.Handle("GET", pattern_EveningDetective_GetTeamsCSV_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/GetTeamsCSV", runtime.WithHTTPPathPattern("/csv")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EveningDetective_GetTeamsCSV_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_GetTeamsCSV_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_EveningDetective_GetTeam_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/GetTeam", runtime.WithHTTPPathPattern("/teams/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EveningDetective_GetTeam_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_GetTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + 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() @@ -278,6 +510,81 @@ func RegisterEveningDetectiveHandlerServer(ctx context.Context, mux *runtime.Ser }) + mux.Handle("POST", pattern_EveningDetective_GameStart_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/GameStart", runtime.WithHTTPPathPattern("/game/start")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EveningDetective_GameStart_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_GameStart_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_EveningDetective_GameStop_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/GameStop", runtime.WithHTTPPathPattern("/game/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EveningDetective_GameStop_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_GameStop_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_EveningDetective_GiveApplications_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/GiveApplications", runtime.WithHTTPPathPattern("/teams/{teamId}/applications")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_EveningDetective_GiveApplications_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_GiveApplications_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -385,6 +692,50 @@ func RegisterEveningDetectiveHandlerClient(ctx context.Context, mux *runtime.Ser }) + mux.Handle("GET", pattern_EveningDetective_GetTeamsCSV_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/GetTeamsCSV", runtime.WithHTTPPathPattern("/csv")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EveningDetective_GetTeamsCSV_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_GetTeamsCSV_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_EveningDetective_GetTeam_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/GetTeam", runtime.WithHTTPPathPattern("/teams/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EveningDetective_GetTeam_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_GetTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + 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() @@ -429,6 +780,72 @@ func RegisterEveningDetectiveHandlerClient(ctx context.Context, mux *runtime.Ser }) + mux.Handle("POST", pattern_EveningDetective_GameStart_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/GameStart", runtime.WithHTTPPathPattern("/game/start")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EveningDetective_GameStart_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_GameStart_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_EveningDetective_GameStop_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/GameStop", runtime.WithHTTPPathPattern("/game/stop")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EveningDetective_GameStop_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_GameStop_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_EveningDetective_GiveApplications_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/GiveApplications", runtime.WithHTTPPathPattern("/teams/{teamId}/applications")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_EveningDetective_GiveApplications_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_GiveApplications_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -439,9 +856,19 @@ var ( pattern_EveningDetective_GetTeams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"teams"}, "")) + pattern_EveningDetective_GetTeamsCSV_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"csv"}, "")) + + pattern_EveningDetective_GetTeam_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"teams", "id"}, "")) + 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"}, "")) + + pattern_EveningDetective_GameStart_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"game", "start"}, "")) + + pattern_EveningDetective_GameStop_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"game", "stop"}, "")) + + pattern_EveningDetective_GiveApplications_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"teams", "teamId", "applications"}, "")) ) var ( @@ -451,7 +878,17 @@ var ( forward_EveningDetective_GetTeams_0 = runtime.ForwardResponseMessage + forward_EveningDetective_GetTeamsCSV_0 = runtime.ForwardResponseMessage + + forward_EveningDetective_GetTeam_0 = runtime.ForwardResponseMessage + forward_EveningDetective_DeleteTeams_0 = runtime.ForwardResponseMessage forward_EveningDetective_AddAction_0 = runtime.ForwardResponseMessage + + forward_EveningDetective_GameStart_0 = runtime.ForwardResponseMessage + + forward_EveningDetective_GameStop_0 = runtime.ForwardResponseMessage + + forward_EveningDetective_GiveApplications_0 = runtime.ForwardResponseMessage ) diff --git a/proto/main.swagger.json b/proto/main.swagger.json index ac61b87..ce29651 100644 --- a/proto/main.swagger.json +++ b/proto/main.swagger.json @@ -33,6 +33,92 @@ ] } }, + "/csv": { + "get": { + "operationId": "EveningDetective_GetTeamsCSV", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/evening_detectiveGetTeamsCSVRsp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "tags": [ + "EveningDetective" + ] + } + }, + "/game/start": { + "post": { + "operationId": "EveningDetective_GameStart", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/evening_detectiveGameStartRsp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/evening_detectiveGameStartReq" + } + } + ], + "tags": [ + "EveningDetective" + ] + } + }, + "/game/stop": { + "post": { + "operationId": "EveningDetective_GameStop", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/evening_detectiveGameStopRsp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/evening_detectiveGameStopReq" + } + } + ], + "tags": [ + "EveningDetective" + ] + } + }, "/ping": { "get": { "operationId": "EveningDetective_Ping", @@ -126,6 +212,76 @@ "EveningDetective" ] } + }, + "/teams/{id}": { + "get": { + "operationId": "EveningDetective_GetTeam", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/evening_detectiveGetTeamRsp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string", + "format": "int64" + } + ], + "tags": [ + "EveningDetective" + ] + } + }, + "/teams/{teamId}/applications": { + "post": { + "operationId": "EveningDetective_GiveApplications", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/evening_detectiveGiveApplicationsRsp" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "teamId", + "in": "path", + "required": true, + "type": "string", + "format": "int64" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/evening_detectiveGiveApplicationsReq" + } + } + ], + "tags": [ + "EveningDetective" + ] + } } }, "definitions": { @@ -183,6 +339,43 @@ "evening_detectiveDeleteTeamsRsp": { "type": "object" }, + "evening_detectiveGameStartReq": { + "type": "object" + }, + "evening_detectiveGameStartRsp": { + "type": "object" + }, + "evening_detectiveGameStopReq": { + "type": "object", + "properties": { + "timeSeconds": { + "type": "string", + "format": "int64" + } + } + }, + "evening_detectiveGameStopRsp": { + "type": "object" + }, + "evening_detectiveGetTeamRsp": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/evening_detectiveAddActionRsp" + } + } + } + }, + "evening_detectiveGetTeamsCSVRsp": { + "type": "object", + "properties": { + "data": { + "type": "string" + } + } + }, "evening_detectiveGetTeamsRsp": { "type": "object", "properties": { @@ -194,6 +387,24 @@ } } }, + "evening_detectiveGiveApplicationsReq": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "format": "int64" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/evening_detectiveApplication" + } + } + } + }, + "evening_detectiveGiveApplicationsRsp": { + "type": "object" + }, "evening_detectivePingRsp": { "type": "object" }, diff --git a/proto/main_grpc.pb.go b/proto/main_grpc.pb.go index a5c5bac..2de438a 100644 --- a/proto/main_grpc.pb.go +++ b/proto/main_grpc.pb.go @@ -19,11 +19,16 @@ 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_DeleteTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/DeleteTeams" - EveningDetective_AddAction_FullMethodName = "/crabs.evening_detective.EveningDetective/AddAction" + 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_GetTeamsCSV_FullMethodName = "/crabs.evening_detective.EveningDetective/GetTeamsCSV" + EveningDetective_GetTeam_FullMethodName = "/crabs.evening_detective.EveningDetective/GetTeam" + EveningDetective_DeleteTeams_FullMethodName = "/crabs.evening_detective.EveningDetective/DeleteTeams" + EveningDetective_AddAction_FullMethodName = "/crabs.evening_detective.EveningDetective/AddAction" + EveningDetective_GameStart_FullMethodName = "/crabs.evening_detective.EveningDetective/GameStart" + EveningDetective_GameStop_FullMethodName = "/crabs.evening_detective.EveningDetective/GameStop" + EveningDetective_GiveApplications_FullMethodName = "/crabs.evening_detective.EveningDetective/GiveApplications" ) // EveningDetectiveClient is the client API for EveningDetective service. @@ -33,8 +38,13 @@ 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) + GetTeamsCSV(ctx context.Context, in *GetTeamsCSVReq, opts ...grpc.CallOption) (*GetTeamsCSVRsp, error) + GetTeam(ctx context.Context, in *GetTeamReq, opts ...grpc.CallOption) (*GetTeamRsp, error) DeleteTeams(ctx context.Context, in *DeleteTeamsReq, opts ...grpc.CallOption) (*DeleteTeamsRsp, error) AddAction(ctx context.Context, in *AddActionReq, opts ...grpc.CallOption) (*AddActionRsp, error) + GameStart(ctx context.Context, in *GameStartReq, opts ...grpc.CallOption) (*GameStartRsp, error) + GameStop(ctx context.Context, in *GameStopReq, opts ...grpc.CallOption) (*GameStopRsp, error) + GiveApplications(ctx context.Context, in *GiveApplicationsReq, opts ...grpc.CallOption) (*GiveApplicationsRsp, error) } type eveningDetectiveClient struct { @@ -72,6 +82,24 @@ func (c *eveningDetectiveClient) GetTeams(ctx context.Context, in *GetTeamsReq, return out, nil } +func (c *eveningDetectiveClient) GetTeamsCSV(ctx context.Context, in *GetTeamsCSVReq, opts ...grpc.CallOption) (*GetTeamsCSVRsp, error) { + out := new(GetTeamsCSVRsp) + err := c.cc.Invoke(ctx, EveningDetective_GetTeamsCSV_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *eveningDetectiveClient) GetTeam(ctx context.Context, in *GetTeamReq, opts ...grpc.CallOption) (*GetTeamRsp, error) { + out := new(GetTeamRsp) + err := c.cc.Invoke(ctx, EveningDetective_GetTeam_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + 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...) @@ -90,6 +118,33 @@ func (c *eveningDetectiveClient) AddAction(ctx context.Context, in *AddActionReq return out, nil } +func (c *eveningDetectiveClient) GameStart(ctx context.Context, in *GameStartReq, opts ...grpc.CallOption) (*GameStartRsp, error) { + out := new(GameStartRsp) + err := c.cc.Invoke(ctx, EveningDetective_GameStart_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *eveningDetectiveClient) GameStop(ctx context.Context, in *GameStopReq, opts ...grpc.CallOption) (*GameStopRsp, error) { + out := new(GameStopRsp) + err := c.cc.Invoke(ctx, EveningDetective_GameStop_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *eveningDetectiveClient) GiveApplications(ctx context.Context, in *GiveApplicationsReq, opts ...grpc.CallOption) (*GiveApplicationsRsp, error) { + out := new(GiveApplicationsRsp) + err := c.cc.Invoke(ctx, EveningDetective_GiveApplications_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 @@ -97,8 +152,13 @@ type EveningDetectiveServer interface { Ping(context.Context, *PingReq) (*PingRsp, error) AddTeams(context.Context, *AddTeamsReq) (*AddTeamsRsp, error) GetTeams(context.Context, *GetTeamsReq) (*GetTeamsRsp, error) + GetTeamsCSV(context.Context, *GetTeamsCSVReq) (*GetTeamsCSVRsp, error) + GetTeam(context.Context, *GetTeamReq) (*GetTeamRsp, error) DeleteTeams(context.Context, *DeleteTeamsReq) (*DeleteTeamsRsp, error) AddAction(context.Context, *AddActionReq) (*AddActionRsp, error) + GameStart(context.Context, *GameStartReq) (*GameStartRsp, error) + GameStop(context.Context, *GameStopReq) (*GameStopRsp, error) + GiveApplications(context.Context, *GiveApplicationsReq) (*GiveApplicationsRsp, error) mustEmbedUnimplementedEveningDetectiveServer() } @@ -115,12 +175,27 @@ 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) GetTeamsCSV(context.Context, *GetTeamsCSVReq) (*GetTeamsCSVRsp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTeamsCSV not implemented") +} +func (UnimplementedEveningDetectiveServer) GetTeam(context.Context, *GetTeamReq) (*GetTeamRsp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTeam 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) GameStart(context.Context, *GameStartReq) (*GameStartRsp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GameStart not implemented") +} +func (UnimplementedEveningDetectiveServer) GameStop(context.Context, *GameStopReq) (*GameStopRsp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GameStop not implemented") +} +func (UnimplementedEveningDetectiveServer) GiveApplications(context.Context, *GiveApplicationsReq) (*GiveApplicationsRsp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GiveApplications not implemented") +} func (UnimplementedEveningDetectiveServer) mustEmbedUnimplementedEveningDetectiveServer() {} // UnsafeEveningDetectiveServer may be embedded to opt out of forward compatibility for this service. @@ -188,6 +263,42 @@ func _EveningDetective_GetTeams_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _EveningDetective_GetTeamsCSV_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTeamsCSVReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EveningDetectiveServer).GetTeamsCSV(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EveningDetective_GetTeamsCSV_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EveningDetectiveServer).GetTeamsCSV(ctx, req.(*GetTeamsCSVReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _EveningDetective_GetTeam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTeamReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EveningDetectiveServer).GetTeam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EveningDetective_GetTeam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EveningDetectiveServer).GetTeam(ctx, req.(*GetTeamReq)) + } + 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 { @@ -224,6 +335,60 @@ func _EveningDetective_AddAction_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _EveningDetective_GameStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GameStartReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EveningDetectiveServer).GameStart(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EveningDetective_GameStart_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EveningDetectiveServer).GameStart(ctx, req.(*GameStartReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _EveningDetective_GameStop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GameStopReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EveningDetectiveServer).GameStop(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EveningDetective_GameStop_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EveningDetectiveServer).GameStop(ctx, req.(*GameStopReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _EveningDetective_GiveApplications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GiveApplicationsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EveningDetectiveServer).GiveApplications(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EveningDetective_GiveApplications_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EveningDetectiveServer).GiveApplications(ctx, req.(*GiveApplicationsReq)) + } + 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) @@ -243,6 +408,14 @@ var EveningDetective_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetTeams", Handler: _EveningDetective_GetTeams_Handler, }, + { + MethodName: "GetTeamsCSV", + Handler: _EveningDetective_GetTeamsCSV_Handler, + }, + { + MethodName: "GetTeam", + Handler: _EveningDetective_GetTeam_Handler, + }, { MethodName: "DeleteTeams", Handler: _EveningDetective_DeleteTeams_Handler, @@ -251,6 +424,18 @@ var EveningDetective_ServiceDesc = grpc.ServiceDesc{ MethodName: "AddAction", Handler: _EveningDetective_AddAction_Handler, }, + { + MethodName: "GameStart", + Handler: _EveningDetective_GameStart_Handler, + }, + { + MethodName: "GameStop", + Handler: _EveningDetective_GameStop_Handler, + }, + { + MethodName: "GiveApplications", + Handler: _EveningDetective_GiveApplications_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "main.proto",