diff --git a/api/pwengine.proto b/api/pwengine.proto index 38ff0c1ca..cfd99cb0c 100644 --- a/api/pwengine.proto +++ b/api/pwengine.proto @@ -92,9 +92,9 @@ service Engine { // Get current user session, based on JWT token rpc GetUserSession(Void) returns (UserSessionOutput) { option (google.api.http) = {get: "/user-session"}; }; rpc SetPreferences(SetPreferencesInput) returns (Void) { option (google.api.http) = {post: "/preferences"; body: "*"}; }; - rpc ListChallenges(Void) returns (pathwar.db.ChallengeList) { option (google.api.http) = {get: "/challenges"}; }; - rpc ListTeams(Void) returns (pathwar.db.TeamList) { option (google.api.http) = {get: "/teams"}; }; - rpc ListTournamentTeams(ListTournamentTeamsInput) returns (pathwar.db.TournamentTeamList) { option (google.api.http) = {get: "/tournament/teams"}; }; + rpc ListChallenges(Void) returns (ListChallengesOutput) { option (google.api.http) = {get: "/challenges"}; }; + rpc ListTeams(Void) returns (ListTeamsOutput) { option (google.api.http) = {get: "/teams"}; }; + rpc ListTournamentTeams(ListTournamentTeamsInput) returns (ListTournamentTeamsOutput) { option (google.api.http) = {get: "/tournament/teams"}; }; rpc GetStatus(Void) returns (Status) { option (google.api.http) = {get: "/status"}; } // @@ -121,6 +121,18 @@ message SetPreferencesInput { // bool dark_mode } +message ListTournamentTeamsOutput { + repeated pathwar.db.TournamentTeam items = 1; +} + +message ListTeamsOutput { + repeated pathwar.db.Team items = 1; +} + +message ListChallengesOutput { + repeated pathwar.db.Challenge items = 1; +} + message UserSessionOutput { message TournamentAndTeam { pathwar.db.Tournament tournament = 1; diff --git a/docs/gen.sum b/docs/gen.sum index 514a074a4..8abfbe070 100644 --- a/docs/gen.sum +++ b/docs/gen.sum @@ -1,5 +1,5 @@ 30302d31bca0924719daf9e95a0ea15dfbcfb131 ../api/pwhypervisor.proto -4fff3f10be21a6f7e22254700d86c149e6a06bbb ../api/pwengine.proto +48eef9c6b3fae3304016eb39fa538f3fc453dc74 ../api/pwengine.proto 58eb4b1d9b5be40a69ffdab1a13b9fb90b669839 ../api/pwsso.proto 5b457e13e87038fcd3124378fdcef56a458b889b ../api/pwdb.proto 5d333f98cfbafd36ddc97b3c7c364bf94b898384 ../api/pwcompose.proto diff --git a/go/gen.sum b/go/gen.sum index 733d4fcab..650ccc750 100644 --- a/go/gen.sum +++ b/go/gen.sum @@ -1,5 +1,5 @@ 30302d31bca0924719daf9e95a0ea15dfbcfb131 ../api/pwhypervisor.proto -4fff3f10be21a6f7e22254700d86c149e6a06bbb ../api/pwengine.proto +48eef9c6b3fae3304016eb39fa538f3fc453dc74 ../api/pwengine.proto 58eb4b1d9b5be40a69ffdab1a13b9fb90b669839 ../api/pwsso.proto 5b457e13e87038fcd3124378fdcef56a458b889b ../api/pwdb.proto 5d333f98cfbafd36ddc97b3c7c364bf94b898384 ../api/pwcompose.proto diff --git a/go/pkg/pwengine/api_pub_listchallenges.go b/go/pkg/pwengine/api_pub_listchallenges.go index 06f0be611..d94f07813 100644 --- a/go/pkg/pwengine/api_pub_listchallenges.go +++ b/go/pkg/pwengine/api_pub_listchallenges.go @@ -2,12 +2,10 @@ package pwengine import ( "context" - - "pathwar.land/go/pkg/pwdb" ) -func (e *engine) ListChallenges(context.Context, *Void) (*pwdb.ChallengeList, error) { - var challenges pwdb.ChallengeList +func (e *engine) ListChallenges(context.Context, *Void) (*ListChallengesOutput, error) { + var challenges ListChallengesOutput if err := e.db.Set("gorm:auto_preload", true).Find(&challenges.Items).Error; err != nil { return nil, err } diff --git a/go/pkg/pwengine/api_pub_listteams.go b/go/pkg/pwengine/api_pub_listteams.go index 3ee17f45e..e78135b57 100644 --- a/go/pkg/pwengine/api_pub_listteams.go +++ b/go/pkg/pwengine/api_pub_listteams.go @@ -2,12 +2,10 @@ package pwengine import ( "context" - - "pathwar.land/go/pkg/pwdb" ) -func (e *engine) ListTeams(context.Context, *Void) (*pwdb.TeamList, error) { - var teams pwdb.TeamList +func (e *engine) ListTeams(context.Context, *Void) (*ListTeamsOutput, error) { + var teams ListTeamsOutput if err := e.db.Set("gorm:auto_preload", true).Find(&teams.Items).Error; err != nil { return nil, err } diff --git a/go/pkg/pwengine/api_pub_listtournamentteams.go b/go/pkg/pwengine/api_pub_listtournamentteams.go index cf795c2cf..fa00c350d 100644 --- a/go/pkg/pwengine/api_pub_listtournamentteams.go +++ b/go/pkg/pwengine/api_pub_listtournamentteams.go @@ -7,7 +7,7 @@ import ( "pathwar.land/go/pkg/pwdb" ) -func (e *engine) ListTournamentTeams(ctx context.Context, in *ListTournamentTeamsInput) (*pwdb.TournamentTeamList, error) { +func (e *engine) ListTournamentTeams(ctx context.Context, in *ListTournamentTeamsInput) (*ListTournamentTeamsOutput, error) { { // validation if in.TournamentID == 0 { return nil, ErrMissingArgument @@ -28,7 +28,7 @@ func (e *engine) ListTournamentTeams(ctx context.Context, in *ListTournamentTeam } } - var ret pwdb.TournamentTeamList + var ret ListTournamentTeamsOutput err := e.db. Set("gorm:auto_preload", true). Where(pwdb.TournamentTeam{TournamentID: in.TournamentID}). diff --git a/go/pkg/pwengine/pwengine.pb.go b/go/pkg/pwengine/pwengine.pb.go index bf01969c9..762f0b2f1 100644 --- a/go/pkg/pwengine/pwengine.pb.go +++ b/go/pkg/pwengine/pwengine.pb.go @@ -157,6 +157,138 @@ func (m *SetPreferencesInput) GetActiveTournamentID() int64 { return 0 } +type ListTournamentTeamsOutput struct { + Items []*pwdb.TournamentTeam `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (m *ListTournamentTeamsOutput) Reset() { *m = ListTournamentTeamsOutput{} } +func (m *ListTournamentTeamsOutput) String() string { return proto.CompactTextString(m) } +func (*ListTournamentTeamsOutput) ProtoMessage() {} +func (*ListTournamentTeamsOutput) Descriptor() ([]byte, []int) { + return fileDescriptor_02cf22bbbf1a21c2, []int{3} +} +func (m *ListTournamentTeamsOutput) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListTournamentTeamsOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListTournamentTeamsOutput.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListTournamentTeamsOutput) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListTournamentTeamsOutput.Merge(m, src) +} +func (m *ListTournamentTeamsOutput) XXX_Size() int { + return m.Size() +} +func (m *ListTournamentTeamsOutput) XXX_DiscardUnknown() { + xxx_messageInfo_ListTournamentTeamsOutput.DiscardUnknown(m) +} + +var xxx_messageInfo_ListTournamentTeamsOutput proto.InternalMessageInfo + +func (m *ListTournamentTeamsOutput) GetItems() []*pwdb.TournamentTeam { + if m != nil { + return m.Items + } + return nil +} + +type ListTeamsOutput struct { + Items []*pwdb.Team `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (m *ListTeamsOutput) Reset() { *m = ListTeamsOutput{} } +func (m *ListTeamsOutput) String() string { return proto.CompactTextString(m) } +func (*ListTeamsOutput) ProtoMessage() {} +func (*ListTeamsOutput) Descriptor() ([]byte, []int) { + return fileDescriptor_02cf22bbbf1a21c2, []int{4} +} +func (m *ListTeamsOutput) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListTeamsOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListTeamsOutput.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListTeamsOutput) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListTeamsOutput.Merge(m, src) +} +func (m *ListTeamsOutput) XXX_Size() int { + return m.Size() +} +func (m *ListTeamsOutput) XXX_DiscardUnknown() { + xxx_messageInfo_ListTeamsOutput.DiscardUnknown(m) +} + +var xxx_messageInfo_ListTeamsOutput proto.InternalMessageInfo + +func (m *ListTeamsOutput) GetItems() []*pwdb.Team { + if m != nil { + return m.Items + } + return nil +} + +type ListChallengesOutput struct { + Items []*pwdb.Challenge `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (m *ListChallengesOutput) Reset() { *m = ListChallengesOutput{} } +func (m *ListChallengesOutput) String() string { return proto.CompactTextString(m) } +func (*ListChallengesOutput) ProtoMessage() {} +func (*ListChallengesOutput) Descriptor() ([]byte, []int) { + return fileDescriptor_02cf22bbbf1a21c2, []int{5} +} +func (m *ListChallengesOutput) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListChallengesOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListChallengesOutput.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListChallengesOutput) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListChallengesOutput.Merge(m, src) +} +func (m *ListChallengesOutput) XXX_Size() int { + return m.Size() +} +func (m *ListChallengesOutput) XXX_DiscardUnknown() { + xxx_messageInfo_ListChallengesOutput.DiscardUnknown(m) +} + +var xxx_messageInfo_ListChallengesOutput proto.InternalMessageInfo + +func (m *ListChallengesOutput) GetItems() []*pwdb.Challenge { + if m != nil { + return m.Items + } + return nil +} + type UserSessionOutput struct { User *pwdb.User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` IsNewUser bool `protobuf:"varint,2,opt,name=is_new_user,json=isNewUser,proto3" json:"is_new_user,omitempty"` @@ -169,7 +301,7 @@ func (m *UserSessionOutput) Reset() { *m = UserSessionOutput{} } func (m *UserSessionOutput) String() string { return proto.CompactTextString(m) } func (*UserSessionOutput) ProtoMessage() {} func (*UserSessionOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_02cf22bbbf1a21c2, []int{3} + return fileDescriptor_02cf22bbbf1a21c2, []int{6} } func (m *UserSessionOutput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -243,7 +375,7 @@ func (m *UserSessionOutput_TournamentAndTeam) Reset() { *m = UserSession func (m *UserSessionOutput_TournamentAndTeam) String() string { return proto.CompactTextString(m) } func (*UserSessionOutput_TournamentAndTeam) ProtoMessage() {} func (*UserSessionOutput_TournamentAndTeam) Descriptor() ([]byte, []int) { - return fileDescriptor_02cf22bbbf1a21c2, []int{3, 0} + return fileDescriptor_02cf22bbbf1a21c2, []int{6, 0} } func (m *UserSessionOutput_TournamentAndTeam) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,7 +433,7 @@ func (m *Status) Reset() { *m = Status{} } func (m *Status) String() string { return proto.CompactTextString(m) } func (*Status) ProtoMessage() {} func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_02cf22bbbf1a21c2, []int{4} + return fileDescriptor_02cf22bbbf1a21c2, []int{7} } func (m *Status) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -349,7 +481,7 @@ func (m *Info) Reset() { *m = Info{} } func (m *Info) String() string { return proto.CompactTextString(m) } func (*Info) ProtoMessage() {} func (*Info) Descriptor() ([]byte, []int) { - return fileDescriptor_02cf22bbbf1a21c2, []int{5} + return fileDescriptor_02cf22bbbf1a21c2, []int{8} } func (m *Info) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -417,6 +549,9 @@ func init() { proto.RegisterType((*Void)(nil), "pathwar.engine.Void") proto.RegisterType((*ListTournamentTeamsInput)(nil), "pathwar.engine.ListTournamentTeamsInput") proto.RegisterType((*SetPreferencesInput)(nil), "pathwar.engine.SetPreferencesInput") + proto.RegisterType((*ListTournamentTeamsOutput)(nil), "pathwar.engine.ListTournamentTeamsOutput") + proto.RegisterType((*ListTeamsOutput)(nil), "pathwar.engine.ListTeamsOutput") + proto.RegisterType((*ListChallengesOutput)(nil), "pathwar.engine.ListChallengesOutput") proto.RegisterType((*UserSessionOutput)(nil), "pathwar.engine.UserSessionOutput") proto.RegisterType((*UserSessionOutput_TournamentAndTeam)(nil), "pathwar.engine.UserSessionOutput.TournamentAndTeam") proto.RegisterType((*Status)(nil), "pathwar.engine.Status") @@ -426,83 +561,86 @@ func init() { func init() { proto.RegisterFile("pwengine.proto", fileDescriptor_02cf22bbbf1a21c2) } var fileDescriptor_02cf22bbbf1a21c2 = []byte{ - // 1203 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x4f, 0x73, 0xdb, 0x44, - 0x14, 0x8f, 0x1c, 0xc7, 0xb1, 0xd7, 0xb5, 0x93, 0x6c, 0x4a, 0xea, 0x98, 0xe2, 0x08, 0xd1, 0x43, - 0x08, 0x63, 0x29, 0xb8, 0x85, 0xe9, 0x04, 0x0e, 0x38, 0x4d, 0xeb, 0x9a, 0x52, 0x62, 0x94, 0xb4, - 0x03, 0xbd, 0x98, 0xb5, 0xf4, 0x2c, 0x2f, 0xb1, 0xb4, 0x42, 0xbb, 0x8a, 0x31, 0x0c, 0x17, 0x0e, - 0x0c, 0x47, 0xa6, 0x5c, 0x18, 0x0e, 0x7c, 0x02, 0x3e, 0x05, 0x27, 0x8e, 0x9d, 0xe1, 0xc2, 0xa9, - 0xc3, 0xa4, 0x1c, 0xf9, 0x10, 0x8c, 0xd6, 0x72, 0xac, 0x24, 0xf6, 0xa4, 0x9c, 0xec, 0xf7, 0xf6, - 0xf7, 0xfb, 0xbd, 0xdd, 0xf7, 0x67, 0xb5, 0xa8, 0xe8, 0x0f, 0xc0, 0x73, 0xa8, 0x07, 0xba, 0x1f, - 0x30, 0xc1, 0x70, 0xd1, 0x27, 0xa2, 0x37, 0x20, 0x81, 0x3e, 0xf2, 0x96, 0xaf, 0x3b, 0x8c, 0x39, - 0x7d, 0x30, 0x88, 0x4f, 0x0d, 0xe2, 0x79, 0x4c, 0x10, 0x41, 0x99, 0xc7, 0x47, 0xe8, 0x72, 0xd5, - 0xa1, 0xa2, 0x17, 0x76, 0x74, 0x8b, 0x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0xb6, 0x2e, 0x2a, 0x8e, 0x51, 0x13, 0x55, 0xf8, 0x8a, - 0x72, 0xa1, 0xe3, 0x0c, 0x4a, 0xff, 0x92, 0x52, 0x16, 0x9f, 0x6c, 0xa3, 0x25, 0x94, 0xdb, 0x25, - 0x9c, 0x5a, 0xf5, 0x50, 0xf4, 0x70, 0x2a, 0xab, 0xa0, 0xd7, 0x10, 0xaa, 0xfb, 0xf4, 0x01, 0x0c, - 0xa5, 0x67, 0x29, 0x9b, 0x2a, 0xe7, 0x3e, 0xad, 0xd6, 0x5b, 0xcd, 0xea, 0x03, 0x18, 0xaa, 0xa9, - 0xce, 0x06, 0x2a, 0x24, 0x19, 0x73, 0xa8, 0x78, 0x06, 0x3f, 0x17, 0xdc, 0x46, 0xf8, 0x21, 0x0b, - 0x40, 0x25, 0x1d, 0x16, 0x0a, 0x35, 0x2e, 0xe4, 0xcb, 0x94, 0xf0, 0x8f, 0x93, 0x8a, 0xf2, 0xec, - 0xa4, 0xa2, 0xfc, 0x7d, 0x52, 0x51, 0x7e, 0x7c, 0x51, 0x99, 0x7b, 0xf6, 0xa2, 0x32, 0xf7, 0xd7, - 0x8b, 0xca, 0xdc, 0x93, 0xeb, 0xc9, 0x64, 0x1b, 0xd1, 0x5b, 0xeb, 0xc8, 0x31, 0xc6, 0xaf, 0xb7, - 0x4e, 0x46, 0xbe, 0x79, 0x6e, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x2d, 0xc4, 0x8a, 0xd0, - 0x09, 0x00, 0x00, + // 1251 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0xcf, 0x72, 0x1b, 0xc5, + 0x13, 0xc7, 0xbd, 0xb2, 0xac, 0x3f, 0xed, 0x48, 0xb6, 0xc7, 0x89, 0x23, 0xeb, 0x97, 0x9f, 0xbc, + 0x2c, 0x29, 0xca, 0x71, 0x4a, 0x5a,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0x6b, 0x75, 0xbe, 0xff, 0xc0, 0xc8, + 0x63, 0xdc, 0x3e, 0xd2, 0xbe, 0x55, 0x20, 0x59, 0x77, 0xda, 0x2e, 0x29, 0x40, 0xfa, 0x18, 0xfd, + 0xf0, 0x6c, 0x64, 0x74, 0xd6, 0x18, 0x99, 0x64, 0x05, 0x52, 0x81, 0x27, 0x58, 0x0f, 0xe5, 0xce, + 0xe7, 0x8c, 0xc8, 0x0a, 0xfd, 0xa6, 0xdb, 0xeb, 0x31, 0x21, 0x37, 0x97, 0x35, 0x22, 0x8b, 0xac, + 0x42, 0xa6, 0x15, 0xb0, 0xae, 0x68, 0x52, 0x21, 0xab, 0x95, 0x35, 0xd2, 0xd2, 0xae, 0xc6, 0x96, + 0x5a, 0x83, 0xc2, 0x5c, 0x6c, 0x69, 0x67, 0xb0, 0xf5, 0x7d, 0x1a, 0x52, 0x77, 0x65, 0x9d, 0x48, + 0x15, 0x92, 0x0d, 0xe6, 0xd8, 0xe4, 0xf2, 0xd9, 0x02, 0x86, 0x83, 0xa2, 0x38, 0xd5, 0xab, 0xe5, + 0xbe, 0xfe, 0xe3, 0xef, 0x1f, 0x13, 0x69, 0x32, 0xa7, 0x7b, 0x61, 0xe8, 0xa7, 0x90, 0xaf, 0xa1, + 0x88, 0x15, 0xfc, 0x02, 0xd8, 0x2b, 0x2f, 0xec, 0x11, 0xed, 0x8a, 0x24, 0x2f, 0x90, 0x9c, 0x1e, + 0xb6, 0x73, 0x99, 0x47, 0x3c, 0x0b, 0xf2, 0x93, 0x13, 0x85, 0xbc, 0x7a, 0x96, 0x35, 0x65, 0xe2, + 0x5c, 0xb0, 0xfb, 0xab, 0x32, 0xc7, 0x92, 0x76, 0x49, 0xf7, 0xc6, 0x01, 0xdb, 0xca, 0x06, 0xa1, + 0x90, 0x9f, 0xbc, 0xcc, 0x17, 0x7c, 0xc7, 0xf5, 0xb3, 0xde, 0x69, 0x23, 0x40, 0x5b, 0x96, 0x69, + 0x72, 0x64, 0x5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 0xb2, 0x3b, 0x94, + 0x33, 0xb3, 0x1a, 0x88, 0x0e, 0x49, 0x64, 0x14, 0xf8, 0x3f, 0x40, 0xd5, 0x63, 0x0f, 0x70, 0x20, + 0x3d, 0x0b, 0x99, 0x44, 0x31, 0xfb, 0x71, 0xb9, 0xda, 0xa8, 0x97, 0x1f, 0xe0, 0x40, 0x4d, 0xb4, + 0xd6, 0x20, 0x17, 0x8f, 0x98, 0x81, 0xfc, 0x84, 0x7e, 0xc6, 0xbf, 0x03, 0xe4, 0xa1, 0xeb, 0xa3, + 0x4a, 0x5b, 0x6e, 0x20, 0xd4, 0xa8, 0x90, 0x2f, 0x53, 0xc2, 0xdf, 0x4f, 0x4a, 0xca, 0xd3, 0x93, + 0x92, 0xf2, 0xd7, 0x49, 0x49, 0xf9, 0xe1, 0x79, 0x69, 0xe6, 0xe9, 0xf3, 0xd2, 0xcc, 0x9f, 0xcf, + 0x4b, 0x33, 0x8f, 0xaf, 0xc5, 0x0f, 0x5b, 0x0f, 0x1f, 0x97, 0x47, 0xb6, 0x3e, 0x7a, 0xae, 0xb6, + 0x52, 0xf2, 0x91, 0x77, 0xeb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x52, 0x59, 0x50, 0xc1, + 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -522,9 +660,9 @@ type EngineClient interface { // Get current user session, based on JWT token GetUserSession(ctx context.Context, in *Void, opts ...grpc.CallOption) (*UserSessionOutput, error) SetPreferences(ctx context.Context, in *SetPreferencesInput, opts ...grpc.CallOption) (*Void, error) - ListChallenges(ctx context.Context, in *Void, opts ...grpc.CallOption) (*pwdb.ChallengeList, error) - ListTeams(ctx context.Context, in *Void, opts ...grpc.CallOption) (*pwdb.TeamList, error) - ListTournamentTeams(ctx context.Context, in *ListTournamentTeamsInput, opts ...grpc.CallOption) (*pwdb.TournamentTeamList, error) + ListChallenges(ctx context.Context, in *Void, opts ...grpc.CallOption) (*ListChallengesOutput, error) + ListTeams(ctx context.Context, in *Void, opts ...grpc.CallOption) (*ListTeamsOutput, error) + ListTournamentTeams(ctx context.Context, in *ListTournamentTeamsInput, opts ...grpc.CallOption) (*ListTournamentTeamsOutput, error) GetStatus(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Status, error) // // dev helpers @@ -569,8 +707,8 @@ func (c *engineClient) SetPreferences(ctx context.Context, in *SetPreferencesInp return out, nil } -func (c *engineClient) ListChallenges(ctx context.Context, in *Void, opts ...grpc.CallOption) (*pwdb.ChallengeList, error) { - out := new(pwdb.ChallengeList) +func (c *engineClient) ListChallenges(ctx context.Context, in *Void, opts ...grpc.CallOption) (*ListChallengesOutput, error) { + out := new(ListChallengesOutput) err := c.cc.Invoke(ctx, "/pathwar.engine.Engine/ListChallenges", in, out, opts...) if err != nil { return nil, err @@ -578,8 +716,8 @@ func (c *engineClient) ListChallenges(ctx context.Context, in *Void, opts ...grp return out, nil } -func (c *engineClient) ListTeams(ctx context.Context, in *Void, opts ...grpc.CallOption) (*pwdb.TeamList, error) { - out := new(pwdb.TeamList) +func (c *engineClient) ListTeams(ctx context.Context, in *Void, opts ...grpc.CallOption) (*ListTeamsOutput, error) { + out := new(ListTeamsOutput) err := c.cc.Invoke(ctx, "/pathwar.engine.Engine/ListTeams", in, out, opts...) if err != nil { return nil, err @@ -587,8 +725,8 @@ func (c *engineClient) ListTeams(ctx context.Context, in *Void, opts ...grpc.Cal return out, nil } -func (c *engineClient) ListTournamentTeams(ctx context.Context, in *ListTournamentTeamsInput, opts ...grpc.CallOption) (*pwdb.TournamentTeamList, error) { - out := new(pwdb.TournamentTeamList) +func (c *engineClient) ListTournamentTeams(ctx context.Context, in *ListTournamentTeamsInput, opts ...grpc.CallOption) (*ListTournamentTeamsOutput, error) { + out := new(ListTournamentTeamsOutput) err := c.cc.Invoke(ctx, "/pathwar.engine.Engine/ListTournamentTeams", in, out, opts...) if err != nil { return nil, err @@ -639,9 +777,9 @@ type EngineServer interface { // Get current user session, based on JWT token GetUserSession(context.Context, *Void) (*UserSessionOutput, error) SetPreferences(context.Context, *SetPreferencesInput) (*Void, error) - ListChallenges(context.Context, *Void) (*pwdb.ChallengeList, error) - ListTeams(context.Context, *Void) (*pwdb.TeamList, error) - ListTournamentTeams(context.Context, *ListTournamentTeamsInput) (*pwdb.TournamentTeamList, error) + ListChallenges(context.Context, *Void) (*ListChallengesOutput, error) + ListTeams(context.Context, *Void) (*ListTeamsOutput, error) + ListTournamentTeams(context.Context, *ListTournamentTeamsInput) (*ListTournamentTeamsOutput, error) GetStatus(context.Context, *Void) (*Status, error) // // dev helpers @@ -664,13 +802,13 @@ func (*UnimplementedEngineServer) GetUserSession(ctx context.Context, req *Void) func (*UnimplementedEngineServer) SetPreferences(ctx context.Context, req *SetPreferencesInput) (*Void, error) { return nil, status.Errorf(codes.Unimplemented, "method SetPreferences not implemented") } -func (*UnimplementedEngineServer) ListChallenges(ctx context.Context, req *Void) (*pwdb.ChallengeList, error) { +func (*UnimplementedEngineServer) ListChallenges(ctx context.Context, req *Void) (*ListChallengesOutput, error) { return nil, status.Errorf(codes.Unimplemented, "method ListChallenges not implemented") } -func (*UnimplementedEngineServer) ListTeams(ctx context.Context, req *Void) (*pwdb.TeamList, error) { +func (*UnimplementedEngineServer) ListTeams(ctx context.Context, req *Void) (*ListTeamsOutput, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTeams not implemented") } -func (*UnimplementedEngineServer) ListTournamentTeams(ctx context.Context, req *ListTournamentTeamsInput) (*pwdb.TournamentTeamList, error) { +func (*UnimplementedEngineServer) ListTournamentTeams(ctx context.Context, req *ListTournamentTeamsInput) (*ListTournamentTeamsOutput, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTournamentTeams not implemented") } func (*UnimplementedEngineServer) GetStatus(ctx context.Context, req *Void) (*Status, error) { @@ -998,6 +1136,117 @@ func (m *SetPreferencesInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ListTournamentTeamsOutput) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListTournamentTeamsOutput) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListTournamentTeamsOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPwengine(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ListTeamsOutput) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListTeamsOutput) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListTeamsOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPwengine(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ListChallengesOutput) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListChallengesOutput) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListChallengesOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPwengine(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *UserSessionOutput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1264,6 +1513,51 @@ func (m *SetPreferencesInput) Size() (n int) { return n } +func (m *ListTournamentTeamsOutput) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovPwengine(uint64(l)) + } + } + return n +} + +func (m *ListTeamsOutput) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovPwengine(uint64(l)) + } + } + return n +} + +func (m *ListChallengesOutput) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovPwengine(uint64(l)) + } + } + return n +} + func (m *UserSessionOutput) Size() (n int) { if m == nil { return 0 @@ -1556,6 +1850,267 @@ func (m *SetPreferencesInput) Unmarshal(dAtA []byte) error { } return nil } +func (m *ListTournamentTeamsOutput) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPwengine + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListTournamentTeamsOutput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListTournamentTeamsOutput: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPwengine + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPwengine + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPwengine + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, &pwdb.TournamentTeam{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPwengine(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPwengine + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPwengine + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListTeamsOutput) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPwengine + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListTeamsOutput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListTeamsOutput: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPwengine + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPwengine + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPwengine + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, &pwdb.Team{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPwengine(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPwengine + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPwengine + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListChallengesOutput) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPwengine + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListChallengesOutput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListChallengesOutput: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPwengine + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPwengine + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPwengine + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, &pwdb.Challenge{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPwengine(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPwengine + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthPwengine + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *UserSessionOutput) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/swagger.yaml b/swagger.yaml index 86975ba0c..964b4ee39 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -187,13 +187,6 @@ definitions: - Active - Inactive type: string - dbChallengeList: - properties: - items: - items: - $ref: '#/definitions/dbChallenge' - type: array - type: object dbChallengeSubscription: properties: challenge_flavor: @@ -532,13 +525,6 @@ definitions: format: date-time type: string type: object - dbTeamList: - properties: - items: - items: - $ref: '#/definitions/dbTeam' - type: array - type: object dbTeamMember: properties: created_at: @@ -694,13 +680,6 @@ definitions: format: date-time type: string type: object - dbTournamentTeamList: - properties: - items: - items: - $ref: '#/definitions/dbTournamentTeam' - type: array - type: object dbUser: properties: active_tournament: @@ -780,6 +759,27 @@ definitions: format: date-time type: string type: object + engineListChallengesOutput: + properties: + items: + items: + $ref: '#/definitions/dbChallenge' + type: array + type: object + engineListTeamsOutput: + properties: + items: + items: + $ref: '#/definitions/dbTeam' + type: array + type: object + engineListTournamentTeamsOutput: + properties: + items: + items: + $ref: '#/definitions/dbTournamentTeam' + type: array + type: object engineSetPreferencesInput: properties: active_tournament_id: @@ -902,7 +902,7 @@ paths: "200": description: A successful response. schema: - $ref: '#/definitions/dbChallengeList' + $ref: '#/definitions/engineListChallengesOutput' "403": description: Returned when the user does not have permission to access the resource. @@ -1043,7 +1043,7 @@ paths: "200": description: A successful response. schema: - $ref: '#/definitions/dbTeamList' + $ref: '#/definitions/engineListTeamsOutput' "403": description: Returned when the user does not have permission to access the resource. @@ -1068,7 +1068,7 @@ paths: "200": description: A successful response. schema: - $ref: '#/definitions/dbTournamentTeamList' + $ref: '#/definitions/engineListTournamentTeamsOutput' "403": description: Returned when the user does not have permission to access the resource.