From e41c2b40b36b8176fd08248dbbd6d3b8ea16a100 Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Thu, 14 Mar 2019 11:45:52 +0100 Subject: [PATCH 1/3] feat: define all models --- Makefile | 4 +- entity/entity.go | 16 +- entity/entity.pb.go | 4730 ++++++++++++++++++++++++++++++++++--------- entity/entity.proto | 203 +- sql/sql.go | 5 +- 5 files changed, 3974 insertions(+), 984 deletions(-) diff --git a/Makefile b/Makefile index f4f696b81..d54cb96c6 100644 --- a/Makefile +++ b/Makefile @@ -61,13 +61,13 @@ _ci_prepare: .PHONY: generate generate: .proto.generated .proto.generated: $(OUR_PROTOS) - rm -f $(GENERATED_FILES) + rm -f $(GENERATED_PB_FILES) go mod vendor docker run \ --user="$(shell id -u)" \ --volume="$(PWD):/go/src/pathwar.pw" \ --workdir="/go/src/pathwar.pw" \ - --pwctl="sh" \ + --entrypoint="sh" \ --rm \ pathwar/protoc:v1 \ -xec "make _proto_generate" diff --git a/entity/entity.go b/entity/entity.go index 224ed5d45..2fefce6c4 100644 --- a/entity/entity.go +++ b/entity/entity.go @@ -2,10 +2,22 @@ package entity func All() []interface{} { return []interface{}{ + Achievement{}, + Coupon{}, + Event{}, + Hypervisor{}, + LevelFlavor{}, + LevelInstance{}, + LevelSubscription{}, Level{}, - UserSession{}, - User{}, + Notification{}, + ShopItem{}, TeamMember{}, Team{}, + TournamentTeam{}, + Tournament{}, + UserSession{}, + User{}, + WhoswhoAttempt{}, } } diff --git a/entity/entity.pb.go b/entity/entity.pb.go index 03df22c30..340195fe5 100644 --- a/entity/entity.pb.go +++ b/entity/entity.pb.go @@ -54,6 +54,112 @@ func (TeamMember_Role) EnumDescriptor() ([]byte, []int) { return fileDescriptor_9b38ccb06a827056, []int{1, 0} } +// +// fields +// +type Achievement_Type int32 + +const ( + Achievement_Undefined Achievement_Type = 0 + Achievement_Buy1LevelAchievement Achievement_Type = 1 + Achievement_Buy5LevelsAchievement Achievement_Type = 2 + Achievement_Buy10LevelsAchievements Achievement_Type = 3 + Achievement_Buy20LevelsAchievements Achievement_Type = 4 + Achievement_Buy50LevelsAchievements Achievement_Type = 5 + Achievement_Buy100LevelsAchievements Achievement_Type = 6 + Achievement_Buy200LevelsAchievements Achievement_Type = 7 + Achievement_Buy500LevelsAchievements Achievement_Type = 8 + Achievement_Buy1000LevelsAchievements Achievement_Type = 9 + Achievement_Validate1LevelAchievement Achievement_Type = 10 + Achievement_Validate5LevelsAchievement Achievement_Type = 11 + Achievement_Validate10LevelsAchievements Achievement_Type = 12 + Achievement_Validate20LevelsAchievements Achievement_Type = 13 + Achievement_Validate50LevelsAchievements Achievement_Type = 14 + Achievement_Validate100LevelsAchievements Achievement_Type = 15 + Achievement_Validate200LevelsAchievements Achievement_Type = 16 + Achievement_Validate500LevelsAchievements Achievement_Type = 17 + Achievement_Validate1000LevelsAchievements Achievement_Type = 18 + Achievement_Validate1Coupon Achievement_Type = 19 + Achievement_Validate5Coupons Achievement_Type = 20 + Achievement_Validate10Coupons Achievement_Type = 21 + Achievement_Validate20Coupons Achievement_Type = 22 + Achievement_Validate50Coupons Achievement_Type = 23 + Achievement_Validate100Coupons Achievement_Type = 24 + Achievement_Validate200Coupons Achievement_Type = 25 + Achievement_Validate500Coupons Achievement_Type = 26 + Achievement_Validate1000Coupons Achievement_Type = 27 +) + +var Achievement_Type_name = map[int32]string{ + 0: "Undefined", + 1: "Buy1LevelAchievement", + 2: "Buy5LevelsAchievement", + 3: "Buy10LevelsAchievements", + 4: "Buy20LevelsAchievements", + 5: "Buy50LevelsAchievements", + 6: "Buy100LevelsAchievements", + 7: "Buy200LevelsAchievements", + 8: "Buy500LevelsAchievements", + 9: "Buy1000LevelsAchievements", + 10: "Validate1LevelAchievement", + 11: "Validate5LevelsAchievement", + 12: "Validate10LevelsAchievements", + 13: "Validate20LevelsAchievements", + 14: "Validate50LevelsAchievements", + 15: "Validate100LevelsAchievements", + 16: "Validate200LevelsAchievements", + 17: "Validate500LevelsAchievements", + 18: "Validate1000LevelsAchievements", + 19: "Validate1Coupon", + 20: "Validate5Coupons", + 21: "Validate10Coupons", + 22: "Validate20Coupons", + 23: "Validate50Coupons", + 24: "Validate100Coupons", + 25: "Validate200Coupons", + 26: "Validate500Coupons", + 27: "Validate1000Coupons", +} + +var Achievement_Type_value = map[string]int32{ + "Undefined": 0, + "Buy1LevelAchievement": 1, + "Buy5LevelsAchievement": 2, + "Buy10LevelsAchievements": 3, + "Buy20LevelsAchievements": 4, + "Buy50LevelsAchievements": 5, + "Buy100LevelsAchievements": 6, + "Buy200LevelsAchievements": 7, + "Buy500LevelsAchievements": 8, + "Buy1000LevelsAchievements": 9, + "Validate1LevelAchievement": 10, + "Validate5LevelsAchievement": 11, + "Validate10LevelsAchievements": 12, + "Validate20LevelsAchievements": 13, + "Validate50LevelsAchievements": 14, + "Validate100LevelsAchievements": 15, + "Validate200LevelsAchievements": 16, + "Validate500LevelsAchievements": 17, + "Validate1000LevelsAchievements": 18, + "Validate1Coupon": 19, + "Validate5Coupons": 20, + "Validate10Coupons": 21, + "Validate20Coupons": 22, + "Validate50Coupons": 23, + "Validate100Coupons": 24, + "Validate200Coupons": 25, + "Validate500Coupons": 26, + "Validate1000Coupons": 27, +} + +func (x Achievement_Type) String() string { + return proto.EnumName(Achievement_Type_name, int32(x)) +} + +func (Achievement_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{17, 0} +} + type Metadata struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" gorm:"primary_key"` CreatedAt *time.Time `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` @@ -115,12 +221,12 @@ func (m *Metadata) GetUpdatedAt() *time.Time { } type TeamMember struct { - Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` - Role TeamMember_Role `protobuf:"varint,100,opt,name=role,proto3,enum=pathwar.entity.TeamMember_Role" json:"role,omitempty"` - User *User `protobuf:"bytes,200,opt,name=user,proto3" json:"user,omitempty"` - UserID string `protobuf:"bytes,201,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - Team *Team `protobuf:"bytes,202,opt,name=team,proto3" json:"team,omitempty"` - TeamID string `protobuf:"bytes,203,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + Role TeamMember_Role `protobuf:"varint,100,opt,name=role,proto3,enum=pathwar.entity.TeamMember_Role" json:"role,omitempty"` + User *User `protobuf:"bytes,200,opt,name=user,proto3" json:"user,omitempty" gorm:"foreignkey:UserID"` + UserID string `protobuf:"bytes,201,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" sql:"type:string not null REFERENCES user(id)" gorm:"index"` + TournamentTeam *TournamentTeam `protobuf:"bytes,202,opt,name=tournament_team,json=tournamentTeam,proto3" json:"tournament_team,omitempty" gorm:"foreignkey:TournamentTeamID"` + TournamentTeamID string `protobuf:"bytes,203,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"type:string not null REFERENCES tournament_team(id)" gorm:"index"` } func (m *TeamMember) Reset() { *m = TeamMember{} } @@ -177,26 +283,28 @@ func (m *TeamMember) GetUserID() string { return "" } -func (m *TeamMember) GetTeam() *Team { +func (m *TeamMember) GetTournamentTeam() *TournamentTeam { if m != nil { - return m.Team + return m.TournamentTeam } return nil } -func (m *TeamMember) GetTeamID() string { +func (m *TeamMember) GetTournamentTeamID() string { if m != nil { - return m.TeamID + return m.TournamentTeamID } return "" } +// User definces a User Account / Profile type User struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` Username string `protobuf:"bytes,100,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,101,opt,name=email,proto3" json:"email,omitempty"` PasswordHash string `protobuf:"bytes,102,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"` PasswordSalt string `protobuf:"bytes,103,opt,name=password_salt,json=passwordSalt,proto3" json:"password_salt,omitempty"` + SshKey string `protobuf:"bytes,104,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"` Sessions []*UserSession `protobuf:"bytes,200,rep,name=sessions,proto3" json:"sessions,omitempty"` TeamMemberships []*TeamMember `protobuf:"bytes,201,rep,name=team_memberships,json=teamMemberships,proto3" json:"team_memberships,omitempty"` } @@ -262,6 +370,13 @@ func (m *User) GetPasswordSalt() string { return "" } +func (m *User) GetSshKey() string { + if m != nil { + return m.SshKey + } + return "" +} + func (m *User) GetSessions() []*UserSession { if m != nil { return m.Sessions @@ -483,26 +598,22 @@ func (m *Level) GetIsDraft() bool { return false } -type Dump struct { - UserSessions []*UserSession `protobuf:"bytes,1,rep,name=user_sessions,json=userSessions,proto3" json:"user_sessions,omitempty"` - Levels []*Level `protobuf:"bytes,2,rep,name=levels,proto3" json:"levels,omitempty"` - Users []*User `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"` - TeamMembers []*TeamMember `protobuf:"bytes,4,rep,name=team_members,json=teamMembers,proto3" json:"team_members,omitempty"` - Teams []*Team `protobuf:"bytes,5,rep,name=teams,proto3" json:"teams,omitempty"` +type Tournament struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` } -func (m *Dump) Reset() { *m = Dump{} } -func (m *Dump) String() string { return proto.CompactTextString(m) } -func (*Dump) ProtoMessage() {} -func (*Dump) Descriptor() ([]byte, []int) { +func (m *Tournament) Reset() { *m = Tournament{} } +func (m *Tournament) String() string { return proto.CompactTextString(m) } +func (*Tournament) ProtoMessage() {} +func (*Tournament) Descriptor() ([]byte, []int) { return fileDescriptor_9b38ccb06a827056, []int{6} } -func (m *Dump) XXX_Unmarshal(b []byte) error { +func (m *Tournament) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Tournament) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Dump.Marshal(b, m, deterministic) + return xxx_messageInfo_Tournament.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalTo(b) @@ -512,424 +623,793 @@ func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Dump) XXX_Merge(src proto.Message) { - xxx_messageInfo_Dump.Merge(m, src) +func (m *Tournament) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tournament.Merge(m, src) } -func (m *Dump) XXX_Size() int { +func (m *Tournament) XXX_Size() int { return m.Size() } -func (m *Dump) XXX_DiscardUnknown() { - xxx_messageInfo_Dump.DiscardUnknown(m) +func (m *Tournament) XXX_DiscardUnknown() { + xxx_messageInfo_Tournament.DiscardUnknown(m) } -var xxx_messageInfo_Dump proto.InternalMessageInfo +var xxx_messageInfo_Tournament proto.InternalMessageInfo -func (m *Dump) GetUserSessions() []*UserSession { - if m != nil { - return m.UserSessions +type TournamentTeam struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + Tournament *Tournament `protobuf:"bytes,200,opt,name=tournament,proto3" json:"tournament,omitempty" gorm:"foreignkey:TournamentID"` + TournamentID string `protobuf:"bytes,201,opt,name=tournament_id,json=tournamentId,proto3" json:"tournament_id,omitempty" sql:"type:string not null REFERENCES tournament(id)" gorm:"index"` +} + +func (m *TournamentTeam) Reset() { *m = TournamentTeam{} } +func (m *TournamentTeam) String() string { return proto.CompactTextString(m) } +func (*TournamentTeam) ProtoMessage() {} +func (*TournamentTeam) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{7} +} +func (m *TournamentTeam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TournamentTeam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TournamentTeam.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return nil +} +func (m *TournamentTeam) XXX_Merge(src proto.Message) { + xxx_messageInfo_TournamentTeam.Merge(m, src) +} +func (m *TournamentTeam) XXX_Size() int { + return m.Size() +} +func (m *TournamentTeam) XXX_DiscardUnknown() { + xxx_messageInfo_TournamentTeam.DiscardUnknown(m) } -func (m *Dump) GetLevels() []*Level { +var xxx_messageInfo_TournamentTeam proto.InternalMessageInfo + +func (m *TournamentTeam) GetTournament() *Tournament { if m != nil { - return m.Levels + return m.Tournament } return nil } -func (m *Dump) GetUsers() []*User { +func (m *TournamentTeam) GetTournamentID() string { if m != nil { - return m.Users + return m.TournamentID } - return nil + return "" } -func (m *Dump) GetTeamMembers() []*TeamMember { - if m != nil { - return m.TeamMembers +type WhoswhoAttempt struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` +} + +func (m *WhoswhoAttempt) Reset() { *m = WhoswhoAttempt{} } +func (m *WhoswhoAttempt) String() string { return proto.CompactTextString(m) } +func (*WhoswhoAttempt) ProtoMessage() {} +func (*WhoswhoAttempt) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{8} +} +func (m *WhoswhoAttempt) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WhoswhoAttempt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WhoswhoAttempt.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return nil +} +func (m *WhoswhoAttempt) XXX_Merge(src proto.Message) { + xxx_messageInfo_WhoswhoAttempt.Merge(m, src) +} +func (m *WhoswhoAttempt) XXX_Size() int { + return m.Size() +} +func (m *WhoswhoAttempt) XXX_DiscardUnknown() { + xxx_messageInfo_WhoswhoAttempt.DiscardUnknown(m) } -func (m *Dump) GetTeams() []*Team { +var xxx_messageInfo_WhoswhoAttempt proto.InternalMessageInfo + +type LevelSubscription struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + TournamentTeam *TournamentTeam `protobuf:"bytes,200,opt,name=tournament_team,json=tournamentTeam,proto3" json:"tournament_team,omitempty" gorm:"foreignkey:TournamentTeamID"` + TournamentTeamID string `protobuf:"bytes,201,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"type:string not null REFERENCES tournament_team(id)" gorm:"index"` +} + +func (m *LevelSubscription) Reset() { *m = LevelSubscription{} } +func (m *LevelSubscription) String() string { return proto.CompactTextString(m) } +func (*LevelSubscription) ProtoMessage() {} +func (*LevelSubscription) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{9} +} +func (m *LevelSubscription) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LevelSubscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LevelSubscription.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LevelSubscription) XXX_Merge(src proto.Message) { + xxx_messageInfo_LevelSubscription.Merge(m, src) +} +func (m *LevelSubscription) XXX_Size() int { + return m.Size() +} +func (m *LevelSubscription) XXX_DiscardUnknown() { + xxx_messageInfo_LevelSubscription.DiscardUnknown(m) +} + +var xxx_messageInfo_LevelSubscription proto.InternalMessageInfo + +func (m *LevelSubscription) GetTournamentTeam() *TournamentTeam { if m != nil { - return m.Teams + return m.TournamentTeam } return nil } -func init() { - proto.RegisterEnum("pathwar.entity.TeamMember_Role", TeamMember_Role_name, TeamMember_Role_value) - proto.RegisterType((*Metadata)(nil), "pathwar.entity.Metadata") - proto.RegisterType((*TeamMember)(nil), "pathwar.entity.TeamMember") - proto.RegisterType((*User)(nil), "pathwar.entity.User") - proto.RegisterType((*UserSession)(nil), "pathwar.entity.UserSession") - proto.RegisterType((*Team)(nil), "pathwar.entity.Team") - proto.RegisterType((*Level)(nil), "pathwar.entity.Level") - proto.RegisterType((*Dump)(nil), "pathwar.entity.Dump") +func (m *LevelSubscription) GetTournamentTeamID() string { + if m != nil { + return m.TournamentTeamID + } + return "" } -func init() { proto.RegisterFile("entity/entity.proto", fileDescriptor_9b38ccb06a827056) } +type ShopItem struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + TournamentTeam *TournamentTeam `protobuf:"bytes,200,opt,name=tournament_team,json=tournamentTeam,proto3" json:"tournament_team,omitempty" gorm:"foreignkey:TournamentTeamID"` + TournamentTeamID string `protobuf:"bytes,201,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"type:string not null REFERENCES tournament_team(id)" gorm:"index"` +} -var fileDescriptor_9b38ccb06a827056 = []byte{ - // 819 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xdd, 0x6e, 0xe3, 0x44, - 0x14, 0xce, 0xb8, 0x4e, 0x9a, 0x9c, 0xb4, 0x4b, 0x19, 0x16, 0x34, 0x14, 0x48, 0x82, 0xe1, 0x22, - 0xb0, 0xac, 0x23, 0x75, 0x85, 0x84, 0x40, 0x20, 0xb6, 0x54, 0x88, 0x4a, 0xac, 0x90, 0xbc, 0xdb, - 0x1b, 0x6e, 0xa2, 0x49, 0x3c, 0xb1, 0x07, 0xfc, 0xa7, 0x99, 0x71, 0xa3, 0xbc, 0x04, 0xec, 0xc3, - 0xf0, 0x04, 0x88, 0x8b, 0x00, 0x37, 0xb9, 0xe4, 0x2a, 0xa0, 0xf4, 0x0d, 0xb8, 0x47, 0x42, 0x33, - 0xb6, 0xf3, 0x53, 0xb5, 0xfc, 0x68, 0xb5, 0x57, 0x3e, 0x67, 0xe6, 0xfb, 0xce, 0xf9, 0xce, 0x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 0xbd, 0xc5, 0x12, 0xb6, 0x8a, 0x13, 0x5d, 0x2d, 0x81, 0xfd, 0x4b, 0x26, 0xf4, - 0xe8, 0x49, 0x68, 0xee, 0x2a, 0x57, 0xcb, 0xd0, 0x5f, 0x76, 0xc2, 0x0b, 0x19, 0xda, 0xc6, 0xaf, - 0x42, 0x93, 0xcb, 0xa1, 0x2f, 0xe8, 0x44, 0x91, 0x6f, 0x7a, 0xa8, 0xdf, 0xf4, 0xf6, 0xb9, 0x3c, - 0xd3, 0xae, 0xf3, 0x9d, 0x05, 0xf6, 0x59, 0x1e, 0x67, 0xf8, 0x53, 0x38, 0x34, 0x53, 0x5e, 0x2f, - 0xf6, 0x7f, 0xd8, 0xeb, 0x83, 0x7c, 0xe3, 0x48, 0x7c, 0x1f, 0x1a, 0x91, 0xee, 0xa4, 0x24, 0x96, - 0xa1, 0xbe, 0x7c, 0x9d, 0x6a, 0xfa, 0xec, 0x95, 0x20, 0xfc, 0x2e, 0xd4, 0x35, 0x5d, 0x92, 0x3d, - 0x83, 0xbe, 0xf9, 0xc3, 0x56, 0x40, 0xf0, 0xc7, 0x70, 0xb0, 0xfd, 0xda, 0x10, 0xfb, 0x5f, 0x07, - 0xdc, 0xde, 0x7a, 0x63, 0x74, 0x2a, 0xed, 0x4a, 0x52, 0xbf, 0x39, 0x95, 0xf9, 0xe4, 0x15, 0x90, - 0xd3, 0x7b, 0xf3, 0x55, 0x07, 0x2d, 0x56, 0x1d, 0xf4, 0xc7, 0xaa, 0x83, 0x9e, 0x5e, 0x75, 0x6a, - 0x8b, 0xab, 0x4e, 0xed, 0xb7, 0xab, 0x4e, 0xed, 0xeb, 0x17, 0x2b, 0x56, 0x36, 0x2d, 0xff, 0xb3, - 0xa3, 0x86, 0xf9, 0x93, 0x3c, 0xf8, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x33, 0xa0, 0xdd, 0xb0, 0x7f, - 0x07, 0x00, 0x00, +func (m *ShopItem) Reset() { *m = ShopItem{} } +func (m *ShopItem) String() string { return proto.CompactTextString(m) } +func (*ShopItem) ProtoMessage() {} +func (*ShopItem) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{10} +} +func (m *ShopItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ShopItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ShopItem.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ShopItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_ShopItem.Merge(m, src) +} +func (m *ShopItem) XXX_Size() int { + return m.Size() +} +func (m *ShopItem) XXX_DiscardUnknown() { + xxx_messageInfo_ShopItem.DiscardUnknown(m) } -func (m *Metadata) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err +var xxx_messageInfo_ShopItem proto.InternalMessageInfo + +func (m *ShopItem) GetTournamentTeam() *TournamentTeam { + if m != nil { + return m.TournamentTeam } - return dAtA[:n], nil + return nil } -func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.ID) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) +func (m *ShopItem) GetTournamentTeamID() string { + if m != nil { + return m.TournamentTeamID } - if m.CreatedAt != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintEntity(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt))) - n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i:]) + return "" +} + +type LevelFlavor struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` +} + +func (m *LevelFlavor) Reset() { *m = LevelFlavor{} } +func (m *LevelFlavor) String() string { return proto.CompactTextString(m) } +func (*LevelFlavor) ProtoMessage() {} +func (*LevelFlavor) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{11} +} +func (m *LevelFlavor) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LevelFlavor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LevelFlavor.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) if err != nil { - return 0, err + return nil, err } - i += n1 + return b[:n], nil } - if m.UpdatedAt != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintEntity(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt))) - n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdatedAt, dAtA[i:]) +} +func (m *LevelFlavor) XXX_Merge(src proto.Message) { + xxx_messageInfo_LevelFlavor.Merge(m, src) +} +func (m *LevelFlavor) XXX_Size() int { + return m.Size() +} +func (m *LevelFlavor) XXX_DiscardUnknown() { + xxx_messageInfo_LevelFlavor.DiscardUnknown(m) +} + +var xxx_messageInfo_LevelFlavor proto.InternalMessageInfo + +type LevelInstance struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + // + // associations + // + Hypervisor *Hypervisor `protobuf:"bytes,200,opt,name=hypervisor,proto3" json:"hypervisor,omitempty" gorm:"foreignkey:HypervisorID"` + HypervisorID string `protobuf:"bytes,201,opt,name=hypervisor_id,json=hypervisorId,proto3" json:"hypervisor_id,omitempty" sql:"type:string not null REFERENCES hypervisor(id)" gorm:"index"` +} + +func (m *LevelInstance) Reset() { *m = LevelInstance{} } +func (m *LevelInstance) String() string { return proto.CompactTextString(m) } +func (*LevelInstance) ProtoMessage() {} +func (*LevelInstance) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{12} +} +func (m *LevelInstance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LevelInstance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LevelInstance.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) if err != nil { - return 0, err + return nil, err } - i += n2 + return b[:n], nil } - return i, nil +} +func (m *LevelInstance) XXX_Merge(src proto.Message) { + xxx_messageInfo_LevelInstance.Merge(m, src) +} +func (m *LevelInstance) XXX_Size() int { + return m.Size() +} +func (m *LevelInstance) XXX_DiscardUnknown() { + xxx_messageInfo_LevelInstance.DiscardUnknown(m) } -func (m *TeamMember) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err +var xxx_messageInfo_LevelInstance proto.InternalMessageInfo + +func (m *LevelInstance) GetHypervisor() *Hypervisor { + if m != nil { + return m.Hypervisor } - return dAtA[:n], nil + return nil } -func (m *TeamMember) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n3, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - if m.Role != 0 { - dAtA[i] = 0xa0 - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintEntity(dAtA, i, uint64(m.Role)) +func (m *LevelInstance) GetHypervisorID() string { + if m != nil { + return m.HypervisorID } - if m.User != nil { - dAtA[i] = 0xc2 - i++ - dAtA[i] = 0xc - i++ - i = encodeVarintEntity(dAtA, i, uint64(m.User.Size())) - n4, err := m.User.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err + return "" +} + +type Hypervisor struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` +} + +func (m *Hypervisor) Reset() { *m = Hypervisor{} } +func (m *Hypervisor) String() string { return proto.CompactTextString(m) } +func (*Hypervisor) ProtoMessage() {} +func (*Hypervisor) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{13} +} +func (m *Hypervisor) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Hypervisor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Hypervisor.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err } - i += n4 - } - if len(m.UserID) > 0 { - dAtA[i] = 0xca - i++ - dAtA[i] = 0xc - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.UserID))) - i += copy(dAtA[i:], m.UserID) + return b[:n], nil } - if m.Team != nil { - dAtA[i] = 0xd2 - i++ - dAtA[i] = 0xc - i++ - i = encodeVarintEntity(dAtA, i, uint64(m.Team.Size())) - n5, err := m.Team.MarshalTo(dAtA[i:]) +} +func (m *Hypervisor) XXX_Merge(src proto.Message) { + xxx_messageInfo_Hypervisor.Merge(m, src) +} +func (m *Hypervisor) XXX_Size() int { + return m.Size() +} +func (m *Hypervisor) XXX_DiscardUnknown() { + xxx_messageInfo_Hypervisor.DiscardUnknown(m) +} + +var xxx_messageInfo_Hypervisor proto.InternalMessageInfo + +type Event struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` +} + +func (m *Event) Reset() { *m = Event{} } +func (m *Event) String() string { return proto.CompactTextString(m) } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{14} +} +func (m *Event) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Event.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) if err != nil { - return 0, err + return nil, err } - i += n5 - } - if len(m.TeamID) > 0 { - dAtA[i] = 0xda - i++ - dAtA[i] = 0xc - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.TeamID))) - i += copy(dAtA[i:], m.TeamID) + return b[:n], nil } - return i, nil +} +func (m *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return m.Size() +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) } -func (m *User) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil +var xxx_messageInfo_Event proto.InternalMessageInfo + +type Notification struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` } -func (m *User) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n6, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - if len(m.Username) > 0 { - dAtA[i] = 0xa2 - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) - } - if len(m.Email) > 0 { - dAtA[i] = 0xaa - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.Email))) - i += copy(dAtA[i:], m.Email) - } - if len(m.PasswordHash) > 0 { - dAtA[i] = 0xb2 - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.PasswordHash))) - i += copy(dAtA[i:], m.PasswordHash) - } - if len(m.PasswordSalt) > 0 { - dAtA[i] = 0xba - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.PasswordSalt))) - i += copy(dAtA[i:], m.PasswordSalt) - } - if len(m.Sessions) > 0 { - for _, msg := range m.Sessions { - dAtA[i] = 0xc2 - i++ - dAtA[i] = 0xc - i++ - i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n +func (m *Notification) Reset() { *m = Notification{} } +func (m *Notification) String() string { return proto.CompactTextString(m) } +func (*Notification) ProtoMessage() {} +func (*Notification) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{15} +} +func (m *Notification) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Notification.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err } + return b[:n], nil } - if len(m.TeamMemberships) > 0 { - for _, msg := range m.TeamMemberships { - dAtA[i] = 0xca - i++ - dAtA[i] = 0xc - i++ - i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n +} +func (m *Notification) XXX_Merge(src proto.Message) { + xxx_messageInfo_Notification.Merge(m, src) +} +func (m *Notification) XXX_Size() int { + return m.Size() +} +func (m *Notification) XXX_DiscardUnknown() { + xxx_messageInfo_Notification.DiscardUnknown(m) +} + +var xxx_messageInfo_Notification proto.InternalMessageInfo + +type Coupon struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + // + // fields + // + Value int32 `protobuf:"varint,100,opt,name=value,proto3" json:"value,omitempty"` + // + // associations + // + TeamMember *TeamMember `protobuf:"bytes,200,opt,name=team_member,json=teamMember,proto3" json:"team_member,omitempty" gorm:"foreignkey:TeamMemberID"` + TeamMemberID string `protobuf:"bytes,201,opt,name=team_member_id,json=teamMemberId,proto3" json:"team_member_id,omitempty" sql:"type:string REFERENCES team_member(id)" gorm:"index"` +} + +func (m *Coupon) Reset() { *m = Coupon{} } +func (m *Coupon) String() string { return proto.CompactTextString(m) } +func (*Coupon) ProtoMessage() {} +func (*Coupon) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{16} +} +func (m *Coupon) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Coupon) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Coupon.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err } + return b[:n], nil } - return i, nil +} +func (m *Coupon) XXX_Merge(src proto.Message) { + xxx_messageInfo_Coupon.Merge(m, src) +} +func (m *Coupon) XXX_Size() int { + return m.Size() +} +func (m *Coupon) XXX_DiscardUnknown() { + xxx_messageInfo_Coupon.DiscardUnknown(m) } -func (m *UserSession) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err +var xxx_messageInfo_Coupon proto.InternalMessageInfo + +func (m *Coupon) GetValue() int32 { + if m != nil { + return m.Value } - return dAtA[:n], nil + return 0 } -func (m *UserSession) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n7, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err +func (m *Coupon) GetTeamMember() *TeamMember { + if m != nil { + return m.TeamMember } - i += n7 - if len(m.Username) > 0 { - dAtA[i] = 0xa2 - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.Username))) - i += copy(dAtA[i:], m.Username) + return nil +} + +func (m *Coupon) GetTeamMemberID() string { + if m != nil { + return m.TeamMemberID } - if len(m.UserID) > 0 { - dAtA[i] = 0xc2 - i++ - dAtA[i] = 0xc - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.UserID))) - i += copy(dAtA[i:], m.UserID) + return "" +} + +type Achievement struct { + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + Type Achievement_Type `protobuf:"varint,100,opt,name=type,proto3,enum=pathwar.entity.Achievement_Type" json:"type,omitempty"` + TeamMember *TeamMember `protobuf:"bytes,200,opt,name=team_member,json=teamMember,proto3" json:"team_member,omitempty" gorm:"foreignkey:TeamMemberID"` + TeamMemberID string `protobuf:"bytes,201,opt,name=team_member_id,json=teamMemberId,proto3" json:"team_member_id,omitempty" sql:"type:string not null REFERENCES team_member(id)" gorm:"index"` +} + +func (m *Achievement) Reset() { *m = Achievement{} } +func (m *Achievement) String() string { return proto.CompactTextString(m) } +func (*Achievement) ProtoMessage() {} +func (*Achievement) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{17} +} +func (m *Achievement) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Achievement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Achievement.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return i, nil +} +func (m *Achievement) XXX_Merge(src proto.Message) { + xxx_messageInfo_Achievement.Merge(m, src) +} +func (m *Achievement) XXX_Size() int { + return m.Size() +} +func (m *Achievement) XXX_DiscardUnknown() { + xxx_messageInfo_Achievement.DiscardUnknown(m) } -func (m *Team) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err +var xxx_messageInfo_Achievement proto.InternalMessageInfo + +func (m *Achievement) GetType() Achievement_Type { + if m != nil { + return m.Type } - return dAtA[:n], nil + return Achievement_Undefined } -func (m *Team) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n8, err := m.Metadata.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err +func (m *Achievement) GetTeamMember() *TeamMember { + if m != nil { + return m.TeamMember } - i += n8 - if len(m.Name) > 0 { - dAtA[i] = 0xa2 - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) + return nil +} + +func (m *Achievement) GetTeamMemberID() string { + if m != nil { + return m.TeamMemberID } - if len(m.GravatarUrl) > 0 { - dAtA[i] = 0xaa + return "" +} + +type Dump struct { + UserSessions []*UserSession `protobuf:"bytes,1,rep,name=user_sessions,json=userSessions,proto3" json:"user_sessions,omitempty"` + Levels []*Level `protobuf:"bytes,2,rep,name=levels,proto3" json:"levels,omitempty"` + Users []*User `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"` + TeamMembers []*TeamMember `protobuf:"bytes,4,rep,name=team_members,json=teamMembers,proto3" json:"team_members,omitempty"` + Teams []*Team `protobuf:"bytes,5,rep,name=teams,proto3" json:"teams,omitempty"` +} + +func (m *Dump) Reset() { *m = Dump{} } +func (m *Dump) String() string { return proto.CompactTextString(m) } +func (*Dump) ProtoMessage() {} +func (*Dump) Descriptor() ([]byte, []int) { + return fileDescriptor_9b38ccb06a827056, []int{18} +} +func (m *Dump) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Dump) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Dump.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Dump) XXX_Merge(src proto.Message) { + xxx_messageInfo_Dump.Merge(m, src) +} +func (m *Dump) XXX_Size() int { + return m.Size() +} +func (m *Dump) XXX_DiscardUnknown() { + xxx_messageInfo_Dump.DiscardUnknown(m) +} + +var xxx_messageInfo_Dump proto.InternalMessageInfo + +func (m *Dump) GetUserSessions() []*UserSession { + if m != nil { + return m.UserSessions + } + return nil +} + +func (m *Dump) GetLevels() []*Level { + if m != nil { + return m.Levels + } + return nil +} + +func (m *Dump) GetUsers() []*User { + if m != nil { + return m.Users + } + return nil +} + +func (m *Dump) GetTeamMembers() []*TeamMember { + if m != nil { + return m.TeamMembers + } + return nil +} + +func (m *Dump) GetTeams() []*Team { + if m != nil { + return m.Teams + } + return nil +} + +func init() { + proto.RegisterEnum("pathwar.entity.TeamMember_Role", TeamMember_Role_name, TeamMember_Role_value) + proto.RegisterEnum("pathwar.entity.Achievement_Type", Achievement_Type_name, Achievement_Type_value) + proto.RegisterType((*Metadata)(nil), "pathwar.entity.Metadata") + proto.RegisterType((*TeamMember)(nil), "pathwar.entity.TeamMember") + proto.RegisterType((*User)(nil), "pathwar.entity.User") + proto.RegisterType((*UserSession)(nil), "pathwar.entity.UserSession") + proto.RegisterType((*Team)(nil), "pathwar.entity.Team") + proto.RegisterType((*Level)(nil), "pathwar.entity.Level") + proto.RegisterType((*Tournament)(nil), "pathwar.entity.Tournament") + proto.RegisterType((*TournamentTeam)(nil), "pathwar.entity.TournamentTeam") + proto.RegisterType((*WhoswhoAttempt)(nil), "pathwar.entity.WhoswhoAttempt") + proto.RegisterType((*LevelSubscription)(nil), "pathwar.entity.LevelSubscription") + proto.RegisterType((*ShopItem)(nil), "pathwar.entity.ShopItem") + proto.RegisterType((*LevelFlavor)(nil), "pathwar.entity.LevelFlavor") + proto.RegisterType((*LevelInstance)(nil), "pathwar.entity.LevelInstance") + proto.RegisterType((*Hypervisor)(nil), "pathwar.entity.Hypervisor") + proto.RegisterType((*Event)(nil), "pathwar.entity.Event") + proto.RegisterType((*Notification)(nil), "pathwar.entity.Notification") + proto.RegisterType((*Coupon)(nil), "pathwar.entity.Coupon") + proto.RegisterType((*Achievement)(nil), "pathwar.entity.Achievement") + proto.RegisterType((*Dump)(nil), "pathwar.entity.Dump") +} + +func init() { proto.RegisterFile("entity/entity.proto", fileDescriptor_9b38ccb06a827056) } + +var fileDescriptor_9b38ccb06a827056 = []byte{ + // 1534 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x73, 0xdb, 0xc4, + 0x17, 0x8f, 0x1c, 0xdb, 0xb1, 0x9f, 0x9d, 0xc4, 0xd9, 0x24, 0x8d, 0x92, 0xa6, 0x96, 0xab, 0xef, + 0x77, 0x98, 0x40, 0xa9, 0x03, 0x2e, 0x99, 0x81, 0x74, 0x60, 0x88, 0x9b, 0xa4, 0xf5, 0xd0, 0x14, + 0x46, 0x69, 0xca, 0x0c, 0x07, 0x8c, 0x62, 0x6d, 0x6c, 0x51, 0x59, 0x12, 0xda, 0x95, 0x83, 0x87, + 0xe1, 0xc6, 0x15, 0xe8, 0x3f, 0xc0, 0x9f, 0x00, 0x27, 0x86, 0x3f, 0x80, 0x53, 0x0a, 0x1c, 0x7a, + 0x61, 0x86, 0x0b, 0x86, 0x49, 0xff, 0x03, 0xdf, 0x99, 0x61, 0x76, 0x65, 0x59, 0xb2, 0xa3, 0x94, + 0x74, 0x9c, 0xd2, 0x0b, 0x27, 0xef, 0xbe, 0xf7, 0x79, 0x3f, 0xf7, 0xed, 0x7b, 0x5a, 0xc3, 0x2c, + 0x36, 0xa9, 0x4e, 0xdb, 0xab, 0xde, 0x4f, 0xd1, 0x76, 0x2c, 0x6a, 0xa1, 0x29, 0x5b, 0xa5, 0x8d, + 0x43, 0xd5, 0x29, 0x7a, 0xd4, 0xa5, 0xeb, 0x75, 0x9d, 0x36, 0xdc, 0xfd, 0x62, 0xcd, 0x6a, 0xae, + 0xd6, 0x2d, 0x43, 0x35, 0xeb, 0xab, 0x1c, 0xb8, 0xef, 0x1e, 0xac, 0xda, 0xb4, 0x6d, 0x63, 0xb2, + 0x4a, 0xf5, 0x26, 0x26, 0x54, 0x6d, 0xda, 0xc1, 0xca, 0x53, 0xb6, 0x74, 0x75, 0x40, 0xb8, 0x6e, + 0x05, 0xa2, 0x6c, 0xc7, 0x37, 0x7c, 0xe5, 0x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 0xe1, 0x47, 0xbd, 0x18, 0xff, 0xc7, 0xe7, 0x67, 0x26, 0xf4, 0x9e, 0x67, 0xa6, 0xd8, 0x96, 0x88, + 0x89, 0x68, 0x53, 0x4c, 0x4e, 0xf1, 0x20, 0xe5, 0x2b, 0x47, 0xc7, 0x79, 0xe1, 0xd1, 0x71, 0x5e, + 0xf8, 0xf3, 0x38, 0x2f, 0x3c, 0x78, 0x9c, 0x1f, 0x7b, 0xf4, 0x38, 0x3f, 0xf6, 0xdb, 0xe3, 0xfc, + 0xd8, 0x07, 0x33, 0xbe, 0x94, 0x7d, 0xd8, 0xfb, 0xb3, 0x74, 0x3f, 0xc9, 0xff, 0x0e, 0xbc, 0xf6, + 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x71, 0x39, 0xea, 0x72, 0x44, 0x15, 0x00, 0x00, +} + +func (m *Metadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ID) > 0 { + dAtA[i] = 0xa i++ - dAtA[i] = 0x6 + i = encodeVarintEntity(dAtA, i, uint64(len(m.ID))) + i += copy(dAtA[i:], m.ID) + } + if m.CreatedAt != nil { + dAtA[i] = 0x12 i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.GravatarUrl))) - i += copy(dAtA[i:], m.GravatarUrl) + i = encodeVarintEntity(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt))) + n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 } - if len(m.Members) > 0 { - for _, msg := range m.Members { - dAtA[i] = 0xc2 - i++ - dAtA[i] = 0xc - i++ - i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n + if m.UpdatedAt != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintEntity(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt))) + n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdatedAt, dAtA[i:]) + if err != nil { + return 0, err } + i += n2 } return i, nil } -func (m *Level) Marshal() (dAtA []byte, err error) { +func (m *TeamMember) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -939,7 +1419,7 @@ func (m *Level) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Level) MarshalTo(dAtA []byte) (int, error) { +func (m *TeamMember) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -947,75 +1427,62 @@ func (m *Level) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n9, err := m.Metadata.MarshalTo(dAtA[i:]) + n3, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 - if len(m.Name) > 0 { - dAtA[i] = 0xa2 - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if len(m.Description) > 0 { - dAtA[i] = 0xaa - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.Description))) - i += copy(dAtA[i:], m.Description) - } - if len(m.Author) > 0 { - dAtA[i] = 0xb2 - i++ - dAtA[i] = 0x6 - i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.Author))) - i += copy(dAtA[i:], m.Author) - } - if len(m.SourceUrl) > 0 { - dAtA[i] = 0xba + i += n3 + if m.Role != 0 { + dAtA[i] = 0xa0 i++ dAtA[i] = 0x6 i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.SourceUrl))) - i += copy(dAtA[i:], m.SourceUrl) + i = encodeVarintEntity(dAtA, i, uint64(m.Role)) } - if len(m.Version) > 0 { + if m.User != nil { dAtA[i] = 0xc2 i++ - dAtA[i] = 0x6 + dAtA[i] = 0xc i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.Version))) - i += copy(dAtA[i:], m.Version) + i = encodeVarintEntity(dAtA, i, uint64(m.User.Size())) + n4, err := m.User.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 } - if len(m.Lang) > 0 { + if len(m.UserID) > 0 { dAtA[i] = 0xca i++ - dAtA[i] = 0x6 + dAtA[i] = 0xc i++ - i = encodeVarintEntity(dAtA, i, uint64(len(m.Lang))) - i += copy(dAtA[i:], m.Lang) + i = encodeVarintEntity(dAtA, i, uint64(len(m.UserID))) + i += copy(dAtA[i:], m.UserID) } - if m.IsDraft { - dAtA[i] = 0xd0 + if m.TournamentTeam != nil { + dAtA[i] = 0xd2 i++ - dAtA[i] = 0x6 + dAtA[i] = 0xc i++ - if m.IsDraft { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + i = encodeVarintEntity(dAtA, i, uint64(m.TournamentTeam.Size())) + n5, err := m.TournamentTeam.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n5 + } + if len(m.TournamentTeamID) > 0 { + dAtA[i] = 0xda i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.TournamentTeamID))) + i += copy(dAtA[i:], m.TournamentTeamID) } return i, nil } -func (m *Dump) Marshal() (dAtA []byte, err error) { +func (m *User) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1025,50 +1492,64 @@ func (m *Dump) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Dump) MarshalTo(dAtA []byte) (int, error) { +func (m *User) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l - if len(m.UserSessions) > 0 { - for _, msg := range m.UserSessions { - dAtA[i] = 0xa - i++ - i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n6, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - if len(m.Levels) > 0 { - for _, msg := range m.Levels { - dAtA[i] = 0x12 - i++ - i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + i += n6 + if len(m.Username) > 0 { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) } - if len(m.Users) > 0 { - for _, msg := range m.Users { - dAtA[i] = 0x1a - i++ - i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } + if len(m.Email) > 0 { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.Email))) + i += copy(dAtA[i:], m.Email) } - if len(m.TeamMembers) > 0 { - for _, msg := range m.TeamMembers { - dAtA[i] = 0x22 + if len(m.PasswordHash) > 0 { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.PasswordHash))) + i += copy(dAtA[i:], m.PasswordHash) + } + if len(m.PasswordSalt) > 0 { + dAtA[i] = 0xba + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.PasswordSalt))) + i += copy(dAtA[i:], m.PasswordSalt) + } + if len(m.SshKey) > 0 { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.SshKey))) + i += copy(dAtA[i:], m.SshKey) + } + if len(m.Sessions) > 0 { + for _, msg := range m.Sessions { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc i++ i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) @@ -1078,9 +1559,11 @@ func (m *Dump) MarshalTo(dAtA []byte) (int, error) { i += n } } - if len(m.Teams) > 0 { - for _, msg := range m.Teams { - dAtA[i] = 0x2a + if len(m.TeamMemberships) > 0 { + for _, msg := range m.TeamMemberships { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc i++ i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) @@ -1093,240 +1576,2454 @@ func (m *Dump) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeVarintEntity(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *UserSession) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return offset + 1 + return dAtA[:n], nil } -func (m *Metadata) Size() (n int) { - if m == nil { - return 0 - } + +func (m *UserSession) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l - l = len(m.ID) - if l > 0 { - n += 1 + l + sovEntity(uint64(l)) + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n7, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - if m.CreatedAt != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt) - n += 1 + l + sovEntity(uint64(l)) + i += n7 + if len(m.Username) > 0 { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.Username))) + i += copy(dAtA[i:], m.Username) } - if m.UpdatedAt != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt) - n += 1 + l + sovEntity(uint64(l)) + if len(m.UserID) > 0 { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.UserID))) + i += copy(dAtA[i:], m.UserID) } - return n + return i, nil } -func (m *TeamMember) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Metadata.Size() - n += 1 + l + sovEntity(uint64(l)) - if m.Role != 0 { - n += 2 + sovEntity(uint64(m.Role)) - } - if m.User != nil { - l = m.User.Size() - n += 2 + l + sovEntity(uint64(l)) - } - l = len(m.UserID) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) - } - if m.Team != nil { - l = m.Team.Size() - n += 2 + l + sovEntity(uint64(l)) - } - l = len(m.TeamID) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) +func (m *Team) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *User) Size() (n int) { - if m == nil { - return 0 - } +func (m *Team) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l - l = m.Metadata.Size() - n += 1 + l + sovEntity(uint64(l)) - l = len(m.Username) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) - } - l = len(m.Email) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) - } - l = len(m.PasswordHash) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n8, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - l = len(m.PasswordSalt) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) + i += n8 + if len(m.Name) > 0 { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } - if len(m.Sessions) > 0 { - for _, e := range m.Sessions { - l = e.Size() - n += 2 + l + sovEntity(uint64(l)) - } + if len(m.GravatarUrl) > 0 { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.GravatarUrl))) + i += copy(dAtA[i:], m.GravatarUrl) } - if len(m.TeamMemberships) > 0 { - for _, e := range m.TeamMemberships { - l = e.Size() - n += 2 + l + sovEntity(uint64(l)) + if len(m.Members) > 0 { + for _, msg := range m.Members { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - return n + return i, nil } -func (m *UserSession) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Metadata.Size() - n += 1 + l + sovEntity(uint64(l)) - l = len(m.Username) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) - } - l = len(m.UserID) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) +func (m *Level) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *Team) Size() (n int) { - if m == nil { - return 0 - } +func (m *Level) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l - l = m.Metadata.Size() - n += 1 + l + sovEntity(uint64(l)) - l = len(m.Name) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n9, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - l = len(m.GravatarUrl) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) + i += n9 + if len(m.Name) > 0 { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) } - if len(m.Members) > 0 { - for _, e := range m.Members { - l = e.Size() - n += 2 + l + sovEntity(uint64(l)) + if len(m.Description) > 0 { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.Description))) + i += copy(dAtA[i:], m.Description) + } + if len(m.Author) > 0 { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.Author))) + i += copy(dAtA[i:], m.Author) + } + if len(m.SourceUrl) > 0 { + dAtA[i] = 0xba + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.SourceUrl))) + i += copy(dAtA[i:], m.SourceUrl) + } + if len(m.Version) > 0 { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + } + if len(m.Lang) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.Lang))) + i += copy(dAtA[i:], m.Lang) + } + if m.IsDraft { + dAtA[i] = 0xd0 + i++ + dAtA[i] = 0x6 + i++ + if m.IsDraft { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i++ } - return n + return i, nil } -func (m *Level) Size() (n int) { - if m == nil { - return 0 +func (m *Tournament) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Tournament) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l - l = m.Metadata.Size() - n += 1 + l + sovEntity(uint64(l)) - l = len(m.Name) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n10, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - l = len(m.Description) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) + i += n10 + return i, nil +} + +func (m *TournamentTeam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - l = len(m.Author) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) + return dAtA[:n], nil +} + +func (m *TournamentTeam) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n11, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - l = len(m.SourceUrl) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) + i += n11 + if m.Tournament != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Tournament.Size())) + n12, err := m.Tournament.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 } - l = len(m.Version) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) + if len(m.TournamentID) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.TournamentID))) + i += copy(dAtA[i:], m.TournamentID) } - l = len(m.Lang) - if l > 0 { - n += 2 + l + sovEntity(uint64(l)) + return i, nil +} + +func (m *WhoswhoAttempt) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - if m.IsDraft { - n += 3 + return dAtA[:n], nil +} + +func (m *WhoswhoAttempt) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n13, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - return n + i += n13 + return i, nil } -func (m *Dump) Size() (n int) { - if m == nil { - return 0 +func (m *LevelSubscription) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *LevelSubscription) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l - if len(m.UserSessions) > 0 { - for _, e := range m.UserSessions { - l = e.Size() - n += 1 + l + sovEntity(uint64(l)) - } + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n14, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - if len(m.Levels) > 0 { - for _, e := range m.Levels { - l = e.Size() - n += 1 + l + sovEntity(uint64(l)) + i += n14 + if m.TournamentTeam != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.TournamentTeam.Size())) + n15, err := m.TournamentTeam.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n15 } - if len(m.Users) > 0 { - for _, e := range m.Users { - l = e.Size() - n += 1 + l + sovEntity(uint64(l)) - } + if len(m.TournamentTeamID) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.TournamentTeamID))) + i += copy(dAtA[i:], m.TournamentTeamID) } - if len(m.TeamMembers) > 0 { - for _, e := range m.TeamMembers { - l = e.Size() - n += 1 + l + sovEntity(uint64(l)) + return i, nil +} + +func (m *ShopItem) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ShopItem) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n16, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + if m.TournamentTeam != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.TournamentTeam.Size())) + n17, err := m.TournamentTeam.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } + i += n17 } - if len(m.Teams) > 0 { - for _, e := range m.Teams { - l = e.Size() - n += 1 + l + sovEntity(uint64(l)) + if len(m.TournamentTeamID) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.TournamentTeamID))) + i += copy(dAtA[i:], m.TournamentTeamID) + } + return i, nil +} + +func (m *LevelFlavor) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LevelFlavor) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n18, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + return i, nil +} + +func (m *LevelInstance) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LevelInstance) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n19, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + if m.Hypervisor != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Hypervisor.Size())) + n20, err := m.Hypervisor.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + if len(m.HypervisorID) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.HypervisorID))) + i += copy(dAtA[i:], m.HypervisorID) + } + return i, nil +} + +func (m *Hypervisor) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Hypervisor) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n21, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + return i, nil +} + +func (m *Event) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n22, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + return i, nil +} + +func (m *Notification) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Notification) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n23, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + return i, nil +} + +func (m *Coupon) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Coupon) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n24, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + if m.Value != 0 { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Value)) + } + if m.TeamMember != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.TeamMember.Size())) + n25, err := m.TeamMember.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + } + if len(m.TeamMemberID) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.TeamMemberID))) + i += copy(dAtA[i:], m.TeamMemberID) + } + return i, nil +} + +func (m *Achievement) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Achievement) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) + n26, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + if m.Type != 0 { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x6 + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Type)) + } + if m.TeamMember != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.TeamMember.Size())) + n27, err := m.TeamMember.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + } + if len(m.TeamMemberID) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.TeamMemberID))) + i += copy(dAtA[i:], m.TeamMemberID) + } + return i, nil +} + +func (m *Dump) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Dump) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.UserSessions) > 0 { + for _, msg := range m.UserSessions { + dAtA[i] = 0xa + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Levels) > 0 { + for _, msg := range m.Levels { + dAtA[i] = 0x12 + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Users) > 0 { + for _, msg := range m.Users { + dAtA[i] = 0x1a + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.TeamMembers) > 0 { + for _, msg := range m.TeamMembers { + dAtA[i] = 0x22 + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Teams) > 0 { + for _, msg := range m.Teams { + dAtA[i] = 0x2a + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func encodeVarintEntity(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *Metadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ID) + if l > 0 { + n += 1 + l + sovEntity(uint64(l)) + } + if m.CreatedAt != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt) + n += 1 + l + sovEntity(uint64(l)) + } + if m.UpdatedAt != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt) + n += 1 + l + sovEntity(uint64(l)) + } + return n +} + +func (m *TeamMember) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + if m.Role != 0 { + n += 2 + sovEntity(uint64(m.Role)) + } + if m.User != nil { + l = m.User.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.UserID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + if m.TournamentTeam != nil { + l = m.TournamentTeam.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.TournamentTeamID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + return n +} + +func (m *User) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + l = len(m.Username) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.Email) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.PasswordHash) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.PasswordSalt) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.SshKey) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + if len(m.Sessions) > 0 { + for _, e := range m.Sessions { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } + if len(m.TeamMemberships) > 0 { + for _, e := range m.TeamMemberships { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } + return n +} + +func (m *UserSession) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + l = len(m.Username) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.UserID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + return n +} + +func (m *Team) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + l = len(m.Name) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.GravatarUrl) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } + return n +} + +func (m *Level) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + l = len(m.Name) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.Author) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.SourceUrl) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.Lang) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + if m.IsDraft { + n += 3 + } + return n +} + +func (m *Tournament) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + return n +} + +func (m *TournamentTeam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + if m.Tournament != nil { + l = m.Tournament.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.TournamentID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + return n +} + +func (m *WhoswhoAttempt) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + return n +} + +func (m *LevelSubscription) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + if m.TournamentTeam != nil { + l = m.TournamentTeam.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.TournamentTeamID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + return n +} + +func (m *ShopItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + if m.TournamentTeam != nil { + l = m.TournamentTeam.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.TournamentTeamID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + return n +} + +func (m *LevelFlavor) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + return n +} + +func (m *LevelInstance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + if m.Hypervisor != nil { + l = m.Hypervisor.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.HypervisorID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + return n +} + +func (m *Hypervisor) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + return n +} + +func (m *Event) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + return n +} + +func (m *Notification) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + return n +} + +func (m *Coupon) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + if m.Value != 0 { + n += 2 + sovEntity(uint64(m.Value)) + } + if m.TeamMember != nil { + l = m.TeamMember.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.TeamMemberID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + return n +} + +func (m *Achievement) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() + n += 1 + l + sovEntity(uint64(l)) + if m.Type != 0 { + n += 2 + sovEntity(uint64(m.Type)) + } + if m.TeamMember != nil { + l = m.TeamMember.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.TeamMemberID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + return n +} + +func (m *Dump) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.UserSessions) > 0 { + for _, e := range m.UserSessions { + l = e.Size() + n += 1 + l + sovEntity(uint64(l)) + } + } + if len(m.Levels) > 0 { + for _, e := range m.Levels { + l = e.Size() + n += 1 + l + sovEntity(uint64(l)) + } + } + if len(m.Users) > 0 { + for _, e := range m.Users { + l = e.Size() + n += 1 + l + sovEntity(uint64(l)) + } + } + if len(m.TeamMembers) > 0 { + for _, e := range m.TeamMembers { + l = e.Size() + n += 1 + l + sovEntity(uint64(l)) + } + } + if len(m.Teams) > 0 { + for _, e := range m.Teams { + l = e.Size() + n += 1 + l + sovEntity(uint64(l)) + } + } + return n +} + +func sovEntity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozEntity(x uint64) (n int) { + return sovEntity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Metadata) 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 ErrIntOverflowEntity + } + 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: Metadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CreatedAt == nil { + m.CreatedAt = new(time.Time) + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UpdatedAt == nil { + m.UpdatedAt = new(time.Time) + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TeamMember) 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 ErrIntOverflowEntity + } + 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: TeamMember: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TeamMember: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 100: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + m.Role = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Role |= (TeamMember_Role(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.User == nil { + m.User = &User{} + } + if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 201: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 202: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeam", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TournamentTeam == nil { + m.TournamentTeam = &TournamentTeam{} + } + if err := m.TournamentTeam.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 203: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeamID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TournamentTeamID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *User) 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 ErrIntOverflowEntity + } + 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: User: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 100: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 101: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Email", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Email = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 102: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PasswordHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PasswordHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 103: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PasswordSalt", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PasswordSalt = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 104: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SshKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SshKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sessions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sessions = append(m.Sessions, &UserSession{}) + if err := m.Sessions[len(m.Sessions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 201: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TeamMemberships", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TeamMemberships = append(m.TeamMemberships, &TeamMember{}) + if err := m.TeamMemberships[len(m.TeamMemberships)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UserSession) 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 ErrIntOverflowEntity + } + 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: UserSession: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UserSession: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 100: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Team) 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 ErrIntOverflowEntity + } + 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: Team: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Team: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 100: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 101: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GravatarUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GravatarUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, &TeamMember{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Level) 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 ErrIntOverflowEntity + } + 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: Level: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Level: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 100: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 101: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 102: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Author", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Author = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 103: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 104: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 105: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lang", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Lang = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 106: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsDraft", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.IsDraft = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tournament) 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 ErrIntOverflowEntity + } + 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: Tournament: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tournament: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - return n -} -func sovEntity(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n -} -func sozEntity(x uint64) (n int) { - return sovEntity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *Metadata) Unmarshal(dAtA []byte) error { +func (m *TournamentTeam) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1349,17 +4046,17 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Metadata: wiretype end group for non-group") + return fmt.Errorf("proto: TournamentTeam: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TournamentTeam: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEntity @@ -1369,24 +4066,25 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthEntity } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.ID = string(dAtA[iNdEx:postIndex]) + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 200: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tournament", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1410,16 +4108,95 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CreatedAt == nil { - m.CreatedAt = new(time.Time) + if m.Tournament == nil { + m.Tournament = &Tournament{} } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := m.Tournament.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 201: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TournamentID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TournamentID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WhoswhoAttempt) 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 ErrIntOverflowEntity + } + 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: WhoswhoAttempt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WhoswhoAttempt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1443,10 +4220,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.UpdatedAt == nil { - m.UpdatedAt = new(time.Time) - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1471,7 +4245,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } return nil } -func (m *TeamMember) Unmarshal(dAtA []byte) error { +func (m *LevelSubscription) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1494,10 +4268,10 @@ func (m *TeamMember) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TeamMember: wiretype end group for non-group") + return fmt.Errorf("proto: LevelSubscription: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TeamMember: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LevelSubscription: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1530,11 +4304,11 @@ func (m *TeamMember) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 100: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeam", wireType) } - m.Role = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEntity @@ -1544,14 +4318,107 @@ func (m *TeamMember) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Role |= (TeamMember_Role(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - case 200: + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TournamentTeam == nil { + m.TournamentTeam = &TournamentTeam{} + } + if err := m.TournamentTeam.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 201: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeamID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TournamentTeamID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ShopItem) 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 ErrIntOverflowEntity + } + 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: ShopItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ShopItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1575,45 +4442,13 @@ func (m *TeamMember) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.User == nil { - m.User = &User{} - } - if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 201: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 202: + case 200: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Team", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeam", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1637,16 +4472,16 @@ func (m *TeamMember) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Team == nil { - m.Team = &Team{} + if m.TournamentTeam == nil { + m.TournamentTeam = &TournamentTeam{} } - if err := m.Team.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TournamentTeam.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 203: + case 201: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TeamID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeamID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1671,7 +4506,7 @@ func (m *TeamMember) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TeamID = string(dAtA[iNdEx:postIndex]) + m.TournamentTeamID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1694,7 +4529,7 @@ func (m *TeamMember) Unmarshal(dAtA []byte) error { } return nil } -func (m *User) Unmarshal(dAtA []byte) error { +func (m *LevelFlavor) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1717,10 +4552,10 @@ func (m *User) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: User: wiretype end group for non-group") + return fmt.Errorf("proto: LevelFlavor: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LevelFlavor: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1753,40 +4588,61 @@ func (m *User) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if skippy < 0 { return ErrInvalidLengthEntity } - postIndex := iNdEx + intStringLen - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 101: + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LevelInstance) 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 ErrIntOverflowEntity + } + 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: LevelInstance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LevelInstance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Email", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEntity @@ -1796,26 +4652,27 @@ func (m *User) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthEntity } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Email = string(dAtA[iNdEx:postIndex]) + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 102: + case 200: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PasswordHash", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hypervisor", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEntity @@ -1825,24 +4682,28 @@ func (m *User) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthEntity } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.PasswordHash = string(dAtA[iNdEx:postIndex]) + if m.Hypervisor == nil { + m.Hypervisor = &Hypervisor{} + } + if err := m.Hypervisor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 103: + case 201: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PasswordSalt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HypervisorID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1867,11 +4728,61 @@ func (m *User) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PasswordSalt = string(dAtA[iNdEx:postIndex]) + m.HypervisorID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 200: + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Hypervisor) 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 ErrIntOverflowEntity + } + 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: Hypervisor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Hypervisor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sessions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1895,14 +4806,63 @@ func (m *User) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Sessions = append(m.Sessions, &UserSession{}) - if err := m.Sessions[len(m.Sessions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 201: + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) 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 ErrIntOverflowEntity + } + 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: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TeamMemberships", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1926,8 +4886,7 @@ func (m *User) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TeamMemberships = append(m.TeamMemberships, &TeamMember{}) - if err := m.TeamMemberships[len(m.TeamMemberships)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1952,7 +4911,7 @@ func (m *User) Unmarshal(dAtA []byte) error { } return nil } -func (m *UserSession) Unmarshal(dAtA []byte) error { +func (m *Notification) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1975,10 +4934,10 @@ func (m *UserSession) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UserSession: wiretype end group for non-group") + return fmt.Errorf("proto: Notification: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UserSession: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Notification: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2011,64 +4970,6 @@ func (m *UserSession) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEntity(dAtA[iNdEx:]) @@ -2090,7 +4991,7 @@ func (m *UserSession) Unmarshal(dAtA []byte) error { } return nil } -func (m *Team) Unmarshal(dAtA []byte) error { +func (m *Coupon) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2113,10 +5014,10 @@ func (m *Team) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Team: wiretype end group for non-group") + return fmt.Errorf("proto: Coupon: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Team: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Coupon: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2150,10 +5051,10 @@ func (m *Team) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - var stringLen uint64 + m.Value = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEntity @@ -2163,26 +5064,16 @@ func (m *Team) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + m.Value |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 101: + case 200: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GravatarUrl", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TeamMember", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEntity @@ -2192,26 +5083,30 @@ func (m *Team) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthEntity } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.GravatarUrl = string(dAtA[iNdEx:postIndex]) + if m.TeamMember == nil { + m.TeamMember = &TeamMember{} + } + if err := m.TeamMember.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 200: + case 201: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TeamMemberID", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEntity @@ -2221,22 +5116,20 @@ func (m *Team) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthEntity } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Members = append(m.Members, &TeamMember{}) - if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.TeamMemberID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2259,7 +5152,7 @@ func (m *Team) Unmarshal(dAtA []byte) error { } return nil } -func (m *Level) Unmarshal(dAtA []byte) error { +func (m *Achievement) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2282,10 +5175,10 @@ func (m *Level) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Level: wiretype end group for non-group") + return fmt.Errorf("proto: Achievement: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Level: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Achievement: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2319,68 +5212,10 @@ func (m *Level) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 101: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 102: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Author", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var stringLen uint64 + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEntity @@ -2390,26 +5225,16 @@ func (m *Level) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + m.Type |= (Achievement_Type(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Author = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 103: + case 200: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceUrl", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TeamMember", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEntity @@ -2419,53 +5244,28 @@ func (m *Level) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthEntity } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.SourceUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 104: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEntity + if m.TeamMember == nil { + m.TeamMember = &TeamMember{} } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.TeamMember.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 105: + case 201: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lang", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TeamMemberID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2490,28 +5290,8 @@ func (m *Level) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Lang = string(dAtA[iNdEx:postIndex]) + m.TeamMemberID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 106: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsDraft", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEntity - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.IsDraft = bool(v != 0) default: iNdEx = preIndex skippy, err := skipEntity(dAtA[iNdEx:]) diff --git a/entity/entity.proto b/entity/entity.proto index c393ed0be..d00237053 100644 --- a/entity/entity.proto +++ b/entity/entity.proto @@ -35,13 +35,14 @@ message TeamMember { // associations // - User user = 200; - string user_id = 201 [(gogoproto.customname) = "UserID"]; + User user = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:UserID\""]; + string user_id = 201 [(gogoproto.customname) = "UserID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES user(id)\" gorm:\"index\""]; - Team team = 202; - string team_id = 203 [(gogoproto.customname) = "TeamID"]; + TournamentTeam tournament_team = 202 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentTeamID\""]; + string tournament_team_id = 203 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES tournament_team(id)\" gorm:\"index\""]; } +// User definces a User Account / Profile message User { Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; @@ -53,6 +54,7 @@ message User { string email = 101; string password_hash = 102; string password_salt = 103; + string ssh_key = 104; // // associations @@ -116,6 +118,199 @@ message Level { // } +message Tournament { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + + // + // associations + // +} + +message TournamentTeam { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + + // + // associations + // + + Tournament tournament = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentID\""]; + string tournament_id = 201 [(gogoproto.customname) = "TournamentID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES tournament(id)\" gorm:\"index\""]; +} + +message WhoswhoAttempt { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + + // + // associations + // +} + +message LevelSubscription { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + + // + // associations + // + + TournamentTeam tournament_team = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentTeamID\""]; + string tournament_team_id = 201 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES tournament_team(id)\" gorm:\"index\""]; +} + +message ShopItem { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + + // + // associations + // + + TournamentTeam tournament_team = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentTeamID\""]; + string tournament_team_id = 201 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES tournament_team(id)\" gorm:\"index\""]; +} + +message LevelFlavor { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + + // + // associations + // +} + +message LevelInstance { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + + // + // associations + // + Hypervisor hypervisor = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:HypervisorID\""]; + string hypervisor_id = 201 [(gogoproto.customname) = "HypervisorID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES hypervisor(id)\" gorm:\"index\""]; +} + +message Hypervisor { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + + // + // associations + // +} + +message Event { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + + // + // associations + // +} + +message Notification { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + + // + // associations + // +} + +message Coupon { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + int32 value = 100; + + // + // associations + // + TeamMember team_member = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TeamMemberID\""]; + string team_member_id = 201 [(gogoproto.customname) = "TeamMemberID", (gogoproto.moretags) = "sql:\"type:string REFERENCES team_member(id)\" gorm:\"index\""]; +} + +message Achievement { + Metadata metadata = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + + // + // fields + // + enum Type { + Undefined = 0; + Buy1LevelAchievement = 1; + Buy5LevelsAchievement = 2; + Buy10LevelsAchievements = 3; + Buy20LevelsAchievements = 4; + Buy50LevelsAchievements = 5; + Buy100LevelsAchievements = 6; + Buy200LevelsAchievements = 7; + Buy500LevelsAchievements = 8; + Buy1000LevelsAchievements = 9; + Validate1LevelAchievement = 10; + Validate5LevelsAchievement = 11; + Validate10LevelsAchievements = 12; + Validate20LevelsAchievements = 13; + Validate50LevelsAchievements = 14; + Validate100LevelsAchievements = 15; + Validate200LevelsAchievements = 16; + Validate500LevelsAchievements = 17; + Validate1000LevelsAchievements = 18; + Validate1Coupon = 19; + Validate5Coupons = 20; + Validate10Coupons = 21; + Validate20Coupons = 22; + Validate50Coupons = 23; + Validate100Coupons = 24; + Validate200Coupons = 25; + Validate500Coupons = 26; + Validate1000Coupons = 27; + // Special = 99; + } + Type type = 100; + + // + // associations + // + + TeamMember team_member = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TeamMemberID\""]; + string team_member_id = 201 [(gogoproto.customname) = "TeamMemberID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES team_member(id)\" gorm:\"index\""]; +} + message Dump { // non-gorm entity -> no metadata diff --git a/sql/sql.go b/sql/sql.go index 730543385..8512406c6 100644 --- a/sql/sql.go +++ b/sql/sql.go @@ -30,10 +30,13 @@ func FromOpts(opts *Options) (*gorm.DB, error) { db.BlockGlobalUpdate(true) db.SingularTable(true) db.LogMode(true) + if err := db.Exec("PRAGMA foreign_keys = ON").Error; err != nil { + return nil, err + } if err := db.AutoMigrate(entity.All()...).Error; err != nil { return nil, err } - // FIXME: apply real migrations + // FIXME: use gormigrate return db, nil } From 6ac64670e694cd1fbc899a41343b5563fa9ad393 Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Thu, 14 Mar 2019 16:19:12 +0100 Subject: [PATCH 2/3] feat: switch to mysql --- .circleci/config.yml | 5 +- .dockerignore | 2 + Dockerfile | 9 +- Makefile | 37 +++++-- docker-compose.yml | 22 ++++- entity/entity.go | 2 +- entity/entity.pb.go | 207 ++++++++++++++++++++-------------------- entity/entity.proto | 16 ++-- go.mod | 7 +- go.sum | 5 +- sql/cmd_sql.go | 4 +- sql/sql.go | 9 +- test/Dockerfile | 2 +- test/docker-compose.yml | 10 +- 14 files changed, 186 insertions(+), 151 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 612ea25b5..7afb82a60 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,8 +50,9 @@ jobs: - setup_remote_docker: docker_layer_caching: true - run: docker build -t pathwar/pathwar . - - run: make docker.integration - - run: make docker.integration + - run: docker build -t pathwar/test ./test + - run: make integration.run + - run: make integration.run # yes, again - run: docker-compose logs workflows: diff --git a/.dockerignore b/.dockerignore index 050ba0709..2af4c450d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,5 @@ +.circleci/ +test/ .git/ *~ .#* diff --git a/Dockerfile b/Dockerfile index 85ce49a11..c41a3590c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # builder -FROM golang:1.11-alpine as builder +FROM golang:1.12-alpine as builder RUN apk --no-cache --update add nodejs-npm make gcc g++ musl-dev openssl-dev git -ENV GO111MODULE=on -COPY go.* /go/src/pathwar.pw/ +ENV GO111MODULE=on GOPROXY=https://goproxy.io +COPY go.mod go.sum /go/src/pathwar.pw/ WORKDIR /go/src/pathwar.pw RUN go get . COPY . . @@ -10,7 +10,8 @@ RUN touch .proto.generated && make install # runtime FROM alpine:3.8 -RUN apk --no-cache --update add openssl +RUN apk --no-cache --update add openssl wget bash +RUN wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && chmod +x wait-for-it.sh COPY --from=builder /go/bin/pathwar.pw /bin/pathwar.pw ENTRYPOINT ["/bin/pathwar.pw"] CMD ["server"] diff --git a/Makefile b/Makefile index d54cb96c6..cc341e36b 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ help: sed 's/^/ $(HELP_MSG_PREFIX)make /' .PHONY: run -run: $(BIN) +run: $(BIN) mysql.up $(BIN) server $(RUN_OPTS) .PHONY: install @@ -47,6 +47,26 @@ install: $(BIN) $(BIN): .proto.generated $(PWCTL_OUT_FILES) $(OUR_SOURCES) go install -v +.PHONY: mysql.up +mysql.up: + docker-compose up -d mysql + @echo "Waiting for mysql to be ready..." + @while ! mysqladmin ping -h127.0.0.1 -P3306 --silent; do sleep 1; done + @echo "Done." + +.PHONY: mysql.down +mysql.down: + docker-compose stop mysql || true + docker-compose rm -f -v mysql || true + +.PHONY: mysql.shell +mysql.shell: + mysql -h127.0.0.1 -P3306 -uroot -puns3cur3 pathwar + +.PHONY: mysql.dump +mysql.dump: + mysqldump -h127.0.0.1 -P3306 -uroot -puns3cur3 pathwar + .PHONY: clean clean: rm -f $(GENERATED_FILES) .proto.generated @@ -93,13 +113,14 @@ test: .proto.generated .PHONY: docker.build docker.build: - docker build -t pathwar/pathwar . - -.PHONY: docker.integration -docker.integration: - docker-compose -f ./test/docker-compose.yml up -d server - docker-compose -f ./test/docker-compose.yml run client - docker-compose -f ./test/docker-compose.yml down + docker build -t pathwar/pathwar:latest . + docker build -t pathwar/pathwar:test ./test + +.PHONY: integration.run +integration.run: + docker-compose -f ./docker-compose.yml -f ./test/docker-compose.yml up -d --no-build server + docker-compose -f ./docker-compose.yml -f ./test/docker-compose.yml run --no-deps client + docker-compose -f ./docker-compose.yml -f ./test/docker-compose.yml down .PHONY: integration integration: diff --git a/docker-compose.yml b/docker-compose.yml index 9e0f9336a..bae15a3a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,10 +2,22 @@ version: '2.3' services: server: - &server - image: pathwar/pathwar - command: server - #depends_on: - # - mysql + image: pathwar/pathwar:latest + build: . + entrypoint: /bin/bash -c + command: + - ./wait-for-it.sh mysql:3306 -- /bin/pathwar.pw server --sql-config="root:uns3cur3@tcp(mysql:3306)/pathwar?charset=utf8" + depends_on: + - mysql ports: - 8000 + + mysql: + image: mysql:latest + command: --default-authentication-plugin=mysql_native_password + restart: always + ports: + - 3306:3306 + environment: + MYSQL_ROOT_PASSWORD: uns3cur3 + MYSQL_DATABASE: pathwar \ No newline at end of file diff --git a/entity/entity.go b/entity/entity.go index 2fefce6c4..8bc473219 100644 --- a/entity/entity.go +++ b/entity/entity.go @@ -2,7 +2,6 @@ package entity func All() []interface{} { return []interface{}{ - Achievement{}, Coupon{}, Event{}, Hypervisor{}, @@ -19,5 +18,6 @@ func All() []interface{} { UserSession{}, User{}, WhoswhoAttempt{}, + Achievement{}, } } diff --git a/entity/entity.pb.go b/entity/entity.pb.go index 340195fe5..d66c6e606 100644 --- a/entity/entity.pb.go +++ b/entity/entity.pb.go @@ -224,9 +224,9 @@ type TeamMember struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` Role TeamMember_Role `protobuf:"varint,100,opt,name=role,proto3,enum=pathwar.entity.TeamMember_Role" json:"role,omitempty"` User *User `protobuf:"bytes,200,opt,name=user,proto3" json:"user,omitempty" gorm:"foreignkey:UserID"` - UserID string `protobuf:"bytes,201,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" sql:"type:string not null REFERENCES user(id)" gorm:"index"` + UserID string `protobuf:"bytes,201,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" sql:"not null" gorm:"index"` TournamentTeam *TournamentTeam `protobuf:"bytes,202,opt,name=tournament_team,json=tournamentTeam,proto3" json:"tournament_team,omitempty" gorm:"foreignkey:TournamentTeamID"` - TournamentTeamID string `protobuf:"bytes,203,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"type:string not null REFERENCES tournament_team(id)" gorm:"index"` + TournamentTeamID string `protobuf:"bytes,203,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"not null" gorm:"index"` } func (m *TeamMember) Reset() { *m = TeamMember{} } @@ -638,7 +638,7 @@ var xxx_messageInfo_Tournament proto.InternalMessageInfo type TournamentTeam struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` Tournament *Tournament `protobuf:"bytes,200,opt,name=tournament,proto3" json:"tournament,omitempty" gorm:"foreignkey:TournamentID"` - TournamentID string `protobuf:"bytes,201,opt,name=tournament_id,json=tournamentId,proto3" json:"tournament_id,omitempty" sql:"type:string not null REFERENCES tournament(id)" gorm:"index"` + TournamentID string `protobuf:"bytes,201,opt,name=tournament_id,json=tournamentId,proto3" json:"tournament_id,omitempty" sql:"not null" gorm:"index"` } func (m *TournamentTeam) Reset() { *m = TournamentTeam{} } @@ -728,7 +728,7 @@ var xxx_messageInfo_WhoswhoAttempt proto.InternalMessageInfo type LevelSubscription struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` TournamentTeam *TournamentTeam `protobuf:"bytes,200,opt,name=tournament_team,json=tournamentTeam,proto3" json:"tournament_team,omitempty" gorm:"foreignkey:TournamentTeamID"` - TournamentTeamID string `protobuf:"bytes,201,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"type:string not null REFERENCES tournament_team(id)" gorm:"index"` + TournamentTeamID string `protobuf:"bytes,201,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"not null" gorm:"index"` } func (m *LevelSubscription) Reset() { *m = LevelSubscription{} } @@ -781,7 +781,7 @@ func (m *LevelSubscription) GetTournamentTeamID() string { type ShopItem struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` TournamentTeam *TournamentTeam `protobuf:"bytes,200,opt,name=tournament_team,json=tournamentTeam,proto3" json:"tournament_team,omitempty" gorm:"foreignkey:TournamentTeamID"` - TournamentTeamID string `protobuf:"bytes,201,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"type:string not null REFERENCES tournament_team(id)" gorm:"index"` + TournamentTeamID string `protobuf:"bytes,201,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"not null" gorm:"index"` } func (m *ShopItem) Reset() { *m = ShopItem{} } @@ -874,7 +874,7 @@ type LevelInstance struct { // associations // Hypervisor *Hypervisor `protobuf:"bytes,200,opt,name=hypervisor,proto3" json:"hypervisor,omitempty" gorm:"foreignkey:HypervisorID"` - HypervisorID string `protobuf:"bytes,201,opt,name=hypervisor_id,json=hypervisorId,proto3" json:"hypervisor_id,omitempty" sql:"type:string not null REFERENCES hypervisor(id)" gorm:"index"` + HypervisorID string `protobuf:"bytes,201,opt,name=hypervisor_id,json=hypervisorId,proto3" json:"hypervisor_id,omitempty" sql:"not null" gorm:"index"` } func (m *LevelInstance) Reset() { *m = LevelInstance{} } @@ -1045,7 +1045,7 @@ type Coupon struct { // associations // TeamMember *TeamMember `protobuf:"bytes,200,opt,name=team_member,json=teamMember,proto3" json:"team_member,omitempty" gorm:"foreignkey:TeamMemberID"` - TeamMemberID string `protobuf:"bytes,201,opt,name=team_member_id,json=teamMemberId,proto3" json:"team_member_id,omitempty" sql:"type:string REFERENCES team_member(id)" gorm:"index"` + TeamMemberID string `protobuf:"bytes,201,opt,name=team_member_id,json=teamMemberId,proto3" json:"team_member_id,omitempty" gorm:"index"` } func (m *Coupon) Reset() { *m = Coupon{} } @@ -1106,7 +1106,7 @@ type Achievement struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` Type Achievement_Type `protobuf:"varint,100,opt,name=type,proto3,enum=pathwar.entity.Achievement_Type" json:"type,omitempty"` TeamMember *TeamMember `protobuf:"bytes,200,opt,name=team_member,json=teamMember,proto3" json:"team_member,omitempty" gorm:"foreignkey:TeamMemberID"` - TeamMemberID string `protobuf:"bytes,201,opt,name=team_member_id,json=teamMemberId,proto3" json:"team_member_id,omitempty" sql:"type:string not null REFERENCES team_member(id)" gorm:"index"` + TeamMemberID string `protobuf:"bytes,201,opt,name=team_member_id,json=teamMemberId,proto3" json:"team_member_id,omitempty" sql:"not null" gorm:"index"` } func (m *Achievement) Reset() { *m = Achievement{} } @@ -1266,103 +1266,100 @@ func init() { func init() { proto.RegisterFile("entity/entity.proto", fileDescriptor_9b38ccb06a827056) } var fileDescriptor_9b38ccb06a827056 = []byte{ - // 1534 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x73, 0xdb, 0xc4, - 0x17, 0x8f, 0x1c, 0xdb, 0xb1, 0x9f, 0x9d, 0xc4, 0xd9, 0x24, 0x8d, 0x92, 0xa6, 0x96, 0xab, 0xef, - 0x77, 0x98, 0x40, 0xa9, 0x03, 0x2e, 0x99, 0x81, 0x74, 0x60, 0x88, 0x9b, 0xa4, 0xf5, 0xd0, 0x14, - 0x46, 0x69, 0xca, 0x0c, 0x07, 0x8c, 0x62, 0x6d, 0x6c, 0x51, 0x59, 0x12, 0xda, 0x95, 0x83, 0x87, - 0xe1, 0xc6, 0x15, 0xe8, 0x3f, 0xc0, 0x9f, 0x00, 0x27, 0x86, 0x3f, 0x80, 0x53, 0x0a, 0x1c, 0x7a, - 0x61, 0x86, 0x0b, 0x86, 0x49, 0xff, 0x03, 0xdf, 0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 0xfa, 0x5f, 0xc8, 0xee, 0xe7, 0xa7, 0x65, 0xf7, - 0x5e, 0x44, 0x76, 0xcb, 0x67, 0xeb, 0x86, 0x4f, 0x91, 0xe6, 0x6f, 0x92, 0x10, 0x67, 0xf1, 0x0e, - 0x3f, 0xaa, 0x44, 0x98, 0x2b, 0xbb, 0xed, 0x57, 0x79, 0x47, 0x0b, 0xe5, 0x26, 0x27, 0xa0, 0x45, - 0x98, 0x2f, 0xbb, 0xed, 0x35, 0xce, 0x21, 0x61, 0x56, 0x0c, 0x5d, 0x84, 0x05, 0x26, 0xf4, 0xca, - 0x09, 0x1e, 0xc9, 0x8d, 0xf7, 0x98, 0xa5, 0x28, 0x66, 0xbc, 0xc7, 0x5c, 0x8b, 0x62, 0x26, 0xd0, - 0x32, 0x88, 0x5c, 0x6d, 0x14, 0x37, 0xd9, 0xe3, 0x96, 0x22, 0xb9, 0x13, 0x3d, 0xee, 0x5a, 0x24, - 0x37, 0x85, 0x2e, 0xc1, 0xa2, 0xa7, 0x39, 0x8a, 0x9d, 0x66, 0xec, 0x7b, 0xaa, 0xa1, 0x6b, 0x2a, - 0xc5, 0x27, 0x33, 0x01, 0x28, 0x0f, 0x4b, 0x3e, 0x3b, 0x22, 0x1d, 0x19, 0x54, 0x80, 0xe5, 0xbe, - 0x78, 0x94, 0x81, 0x6c, 0x18, 0x11, 0x99, 0x98, 0xc9, 0x30, 0x22, 0x32, 0x3b, 0x53, 0xe8, 0x32, - 0x5c, 0x0a, 0xac, 0x44, 0x41, 0xa6, 0xc3, 0x90, 0xe8, 0x3c, 0xe5, 0xc2, 0x90, 0xe8, 0x64, 0xcd, - 0x20, 0x19, 0xf2, 0x21, 0x43, 0x51, 0x18, 0x84, 0x66, 0x61, 0xba, 0x8f, 0xf1, 0xda, 0x5e, 0x6e, - 0x16, 0xcd, 0x41, 0xae, 0xaf, 0xdb, 0x23, 0x92, 0xdc, 0x1c, 0x9a, 0x87, 0x99, 0x40, 0x9d, 0x4f, - 0x9e, 0x0f, 0x93, 0x4b, 0x7d, 0xf2, 0x85, 0x30, 0x79, 0xad, 0x4f, 0x5e, 0x40, 0x17, 0x00, 0x85, - 0x7c, 0xf2, 0xe9, 0x62, 0x98, 0x5e, 0x0a, 0xe8, 0x8b, 0x61, 0xfa, 0x5a, 0x40, 0x5f, 0x42, 0x0b, - 0x30, 0x1b, 0x8e, 0xcd, 0x67, 0x5c, 0x94, 0xbf, 0x8a, 0x41, 0x7c, 0xd3, 0x6d, 0xda, 0xe8, 0x6d, - 0x98, 0xe4, 0x6f, 0xd0, 0xfe, 0xb3, 0xfb, 0x0c, 0xaf, 0xee, 0xac, 0x1b, 0x6c, 0x08, 0xba, 0x0a, - 0x49, 0x83, 0xe7, 0x4c, 0x8c, 0x71, 0xd1, 0xf9, 0x61, 0x51, 0x9e, 0x51, 0xa5, 0x07, 0x42, 0x2f, - 0x41, 0x82, 0x89, 0x13, 0x71, 0x9c, 0xa3, 0x23, 0xff, 0x9d, 0x52, 0x3c, 0x08, 0x7a, 0x13, 0xb2, - 0xe1, 0x47, 0xbd, 0x18, 0xff, 0xc7, 0xe7, 0x67, 0x26, 0xf4, 0x9e, 0x67, 0xa6, 0xd8, 0x96, 0x88, - 0x89, 0x68, 0x53, 0x4c, 0x4e, 0xf1, 0x20, 0xe5, 0x2b, 0x47, 0xc7, 0x79, 0xe1, 0xd1, 0x71, 0x5e, - 0xf8, 0xf3, 0x38, 0x2f, 0x3c, 0x78, 0x9c, 0x1f, 0x7b, 0xf4, 0x38, 0x3f, 0xf6, 0xdb, 0xe3, 0xfc, - 0xd8, 0x07, 0x33, 0xbe, 0x94, 0x7d, 0xd8, 0xfb, 0xb3, 0x74, 0x3f, 0xc9, 0xff, 0x0e, 0xbc, 0xf6, - 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x71, 0x39, 0xea, 0x72, 0x44, 0x15, 0x00, 0x00, + // 1473 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00,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3, 0xe8, 0x35, 0x48, 0xf3, + 0xa7, 0x66, 0xff, 0x11, 0x54, 0x19, 0xb5, 0x8d, 0x85, 0xaa, 0x3e, 0xe8, 0xba, 0x44, 0x15, 0xe8, + 0xbf, 0x80, 0xb0, 0x87, 0x67, 0x11, 0xb6, 0x99, 0x40, 0xd8, 0x39, 0x97, 0x65, 0x9c, 0xbf, 0x6f, + 0xb2, 0x90, 0xe6, 0x85, 0x8c, 0x3e, 0x2e, 0x64, 0x58, 0xac, 0xfb, 0xdd, 0x57, 0xc5, 0x5c, 0x89, + 0x15, 0x5d, 0x94, 0xd0, 0x0a, 0x2c, 0xd5, 0xfd, 0xee, 0x96, 0xd0, 0xd0, 0xb8, 0x2a, 0x85, 0xd6, + 0x60, 0x99, 0x1b, 0xbd, 0x72, 0x4a, 0x47, 0x8b, 0x93, 0x7d, 0x65, 0x2d, 0x49, 0x99, 0xee, 0x2b, + 0xb7, 0x92, 0x94, 0x19, 0xb4, 0x0e, 0xb2, 0x70, 0x9b, 0xa4, 0xcd, 0xf6, 0xb5, 0xb5, 0x44, 0xed, + 0x54, 0x5f, 0xbb, 0x95, 0xa8, 0xcd, 0xa1, 0xcb, 0xb0, 0x12, 0x78, 0x4e, 0x52, 0x4f, 0x73, 0xf5, + 0x43, 0x6c, 0x1a, 0xfc, 0xbd, 0x7d, 0x9a, 0x09, 0x40, 0x25, 0x58, 0x0d, 0xd5, 0x09, 0x74, 0xe4, + 0x51, 0x05, 0xd6, 0x07, 0xe6, 0x49, 0x01, 0x0a, 0x71, 0x44, 0x22, 0x31, 0x33, 0x71, 0x44, 0x22, + 0x3b, 0xb3, 0xe8, 0x0a, 0x5c, 0x8e, 0xa2, 0x24, 0x41, 0xe6, 0xe2, 0x90, 0x64, 0x9e, 0x8a, 0x71, + 0x48, 0x32, 0x59, 0xf3, 0x48, 0x81, 0x52, 0x2c, 0x50, 0x12, 0x06, 0xa1, 0x05, 0x98, 0x1b, 0x60, + 0x82, 0x11, 0x55, 0x5c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 0x48, 0x8d, 0xd6, 0x91, 0x00, 0x14, 0x00, + 0x00, } func (m *Metadata) Marshal() (dAtA []byte, err error) { diff --git a/entity/entity.proto b/entity/entity.proto index d00237053..6932d9494 100644 --- a/entity/entity.proto +++ b/entity/entity.proto @@ -36,10 +36,10 @@ message TeamMember { // User user = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:UserID\""]; - string user_id = 201 [(gogoproto.customname) = "UserID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES user(id)\" gorm:\"index\""]; + string user_id = 201 [(gogoproto.customname) = "UserID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; TournamentTeam tournament_team = 202 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentTeamID\""]; - string tournament_team_id = 203 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES tournament_team(id)\" gorm:\"index\""]; + string tournament_team_id = 203 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } // User definces a User Account / Profile @@ -142,7 +142,7 @@ message TournamentTeam { // Tournament tournament = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentID\""]; - string tournament_id = 201 [(gogoproto.customname) = "TournamentID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES tournament(id)\" gorm:\"index\""]; + string tournament_id = 201 [(gogoproto.customname) = "TournamentID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } message WhoswhoAttempt { @@ -169,7 +169,7 @@ message LevelSubscription { // TournamentTeam tournament_team = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentTeamID\""]; - string tournament_team_id = 201 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES tournament_team(id)\" gorm:\"index\""]; + string tournament_team_id = 201 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } message ShopItem { @@ -184,7 +184,7 @@ message ShopItem { // TournamentTeam tournament_team = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentTeamID\""]; - string tournament_team_id = 201 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES tournament_team(id)\" gorm:\"index\""]; + string tournament_team_id = 201 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } message LevelFlavor { @@ -210,7 +210,7 @@ message LevelInstance { // associations // Hypervisor hypervisor = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:HypervisorID\""]; - string hypervisor_id = 201 [(gogoproto.customname) = "HypervisorID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES hypervisor(id)\" gorm:\"index\""]; + string hypervisor_id = 201 [(gogoproto.customname) = "HypervisorID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } message Hypervisor { @@ -261,7 +261,7 @@ message Coupon { // associations // TeamMember team_member = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TeamMemberID\""]; - string team_member_id = 201 [(gogoproto.customname) = "TeamMemberID", (gogoproto.moretags) = "sql:\"type:string REFERENCES team_member(id)\" gorm:\"index\""]; + string team_member_id = 201 [(gogoproto.customname) = "TeamMemberID", (gogoproto.moretags) = "gorm:\"index\""]; } message Achievement { @@ -308,7 +308,7 @@ message Achievement { // TeamMember team_member = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TeamMemberID\""]; - string team_member_id = 201 [(gogoproto.customname) = "TeamMemberID", (gogoproto.moretags) = "sql:\"type:string not null REFERENCES team_member(id)\" gorm:\"index\""]; + string team_member_id = 201 [(gogoproto.customname) = "TeamMemberID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } message Dump { diff --git a/go.mod b/go.mod index dd1c840c6..e2b39639e 100644 --- a/go.mod +++ b/go.mod @@ -11,12 +11,11 @@ require ( github.com/docker/go-connections v0.4.0 github.com/docker/go-units v0.3.3 // indirect github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 // indirect - github.com/go-sql-driver/mysql v1.4.1 // indirect + github.com/go-sql-driver/mysql v1.4.1 github.com/gobuffalo/packr/v2 v2.0.0-rc.15 github.com/gogo/gateway v1.0.0 github.com/gogo/protobuf v1.2.0 github.com/golang/protobuf v1.2.0 - github.com/google/go-cmp v0.2.0 // indirect github.com/gorilla/mux v1.7.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190104160321-4832df01553a github.com/grpc-ecosystem/grpc-gateway v1.6.4 @@ -24,7 +23,7 @@ require ( github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a // indirect github.com/jinzhu/now v0.0.0-20181116074157-8ec929ed50c3 // indirect github.com/lib/pq v1.0.0 // indirect - github.com/mattn/go-sqlite3 v1.10.0 + github.com/mattn/go-sqlite3 v1.10.0 // indirect github.com/opencontainers/go-digest v1.0.0-rc1 // indirect github.com/opencontainers/image-spec v1.0.1 // indirect github.com/pkg/errors v0.8.1 @@ -40,6 +39,6 @@ require ( google.golang.org/appengine v1.2.0 // indirect google.golang.org/genproto v0.0.0-20190108161440-ae2f86662275 google.golang.org/grpc v1.17.0 - gotest.tools v2.2.0+incompatible // indirect + gotest.tools v0.0.0-20181223230014-1083505acf35 // indirect moul.io/zapgorm v0.0.0-20181220094309-2149c5ded6fc ) diff --git a/go.sum b/go.sum index 3dedfba09..beb79efb2 100644 --- a/go.sum +++ b/go.sum @@ -453,6 +453,7 @@ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180810170437-e96c4e24768d/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -501,8 +502,8 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gotest.tools v2.2.0+incompatible h1:y0IMTfclpMdsdIbr6uwmJn5/WZ7vFuObxDMdrylFM3A= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools v0.0.0-20181223230014-1083505acf35 h1:zpdCK+REwbk+rqjJmHhiCN6iBIigrZ39glqSF0P3KF0= +gotest.tools v0.0.0-20181223230014-1083505acf35/go.mod h1:R//lfYlUuTOTfblYI3lGoAAAebUdzjvbmQsuB7Ykd90= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= moul.io/zapgorm v0.0.0-20181220094309-2149c5ded6fc h1:Ddo1Fa0ruGmrNMWVOzEfbMcp3yy3XrspnmQMJ4o7mfg= moul.io/zapgorm v0.0.0-20181220094309-2149c5ded6fc/go.mod h1:5XkuYCrMvJcscMD3+T4QGDaWsCZiql8k2Pv5iNhTB/g= diff --git a/sql/cmd_sql.go b/sql/cmd_sql.go index f88e1c179..8b7846665 100644 --- a/sql/cmd_sql.go +++ b/sql/cmd_sql.go @@ -9,7 +9,7 @@ import ( ) type Options struct { - Path string `mapstructure:"path"` + Config string `mapstructure:"config"` } func Commands() cli.Commands { @@ -28,7 +28,7 @@ type sqlCommand struct{ opts Options } func (cmd *sqlCommand) LoadDefaultOptions() error { return viper.Unmarshal(&cmd.opts) } func (cmd *sqlCommand) ParseFlags(flags *pflag.FlagSet) { - flags.StringVarP(&cmd.opts.Path, "sql-path", "", "/tmp/pathwar.db", "SQL db path") + flags.StringVarP(&cmd.opts.Config, "sql-config", "", "root:uns3cur3@tcp(127.0.0.1:3306)/pathwar?charset=utf8", "SQL connection config") if err := viper.BindPFlags(flags); err != nil { zap.L().Warn("failed to bind viper flags", zap.Error(err)) } diff --git a/sql/sql.go b/sql/sql.go index 8512406c6..2520be67a 100644 --- a/sql/sql.go +++ b/sql/sql.go @@ -6,7 +6,8 @@ import ( "os" "github.com/jinzhu/gorm" - _ "github.com/mattn/go-sqlite3" // required by gorm + //_ "github.com/mattn/go-sqlite3" // required by gorm + _ "github.com/go-sql-driver/mysql" // required by gorm "go.uber.org/zap" "moul.io/zapgorm" @@ -14,7 +15,7 @@ import ( ) func FromOpts(opts *Options) (*gorm.DB, error) { - db, err := gorm.Open("sqlite3", opts.Path) + db, err := gorm.Open("mysql", opts.Config) if err != nil { return nil, err } @@ -30,10 +31,10 @@ func FromOpts(opts *Options) (*gorm.DB, error) { db.BlockGlobalUpdate(true) db.SingularTable(true) db.LogMode(true) - if err := db.Exec("PRAGMA foreign_keys = ON").Error; err != nil { + if err := db.AutoMigrate(entity.All()...).Error; err != nil { return nil, err } - if err := db.AutoMigrate(entity.All()...).Error; err != nil { + if err := db.Model(entity.Achievement{}).AddForeignKey("team_member_id", "team_member(id)", "RESTRICT", "RESTRICT").Error; err != nil { return nil, err } // FIXME: use gormigrate diff --git a/test/Dockerfile b/test/Dockerfile index b42d40cb1..c9d35c14c 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -3,6 +3,6 @@ RUN apk --no-cache add curl openssl python3 make bash jq \ && pip3 install -U pip setuptools httpie \ && http --version \ && jq --version +RUN wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && chmod +x wait-for-it.sh ENTRYPOINT ["/bin/bash", "-c"] -CMD ["sleep 5; ./integration.sh"] COPY . . diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 21bf971ba..d9788de9c 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,15 +1,15 @@ version: '2.3' services: - server: - extends: - file: ../docker-compose.yml - service: server - client: + image: pathwar/pathwar:test build: . environment: TARGET: http://server:8000 + command: + - ./wait-for-it.sh server:8000 -- ./integration.sh depends_on: - server + links: + - server tty: true From 54022dd74f3d83e4ce78d818019aedda4b7cabbd Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Thu, 14 Mar 2019 16:33:12 +0100 Subject: [PATCH 3/3] feat: define schema relationships --- .circleci/config.yml | 2 +- docker-compose.yml | 6 +- entity/entity.go | 28 +- entity/entity.pb.go | 2146 ++++++++++++++++++++++++++++++++++----- entity/entity.proto | 50 +- sql/sql.go | 25 +- test/docker-compose.yml | 2 +- 7 files changed, 1990 insertions(+), 269 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7afb82a60..65f010f15 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,7 +50,7 @@ jobs: - setup_remote_docker: docker_layer_caching: true - run: docker build -t pathwar/pathwar . - - run: docker build -t pathwar/test ./test + - run: docker build -t pathwar/pathwar:test ./test - run: make integration.run - run: make integration.run # yes, again - run: docker-compose logs diff --git a/docker-compose.yml b/docker-compose.yml index bae15a3a5..3ec667365 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,9 +4,11 @@ services: server: image: pathwar/pathwar:latest build: . - entrypoint: /bin/bash -c + entrypoint: + - "/bin/bash" + - "-c" command: - - ./wait-for-it.sh mysql:3306 -- /bin/pathwar.pw server --sql-config="root:uns3cur3@tcp(mysql:3306)/pathwar?charset=utf8" + - "./wait-for-it.sh mysql:3306 -- /bin/pathwar.pw server --sql-config='root:uns3cur3@tcp(mysql:3306)/pathwar?charset=utf8'" depends_on: - mysql ports: diff --git a/entity/entity.go b/entity/entity.go index 8bc473219..981fd3b50 100644 --- a/entity/entity.go +++ b/entity/entity.go @@ -1,7 +1,34 @@ package entity +func ByName(name string) interface{} { + return AllMap()[name] +} + +func AllMap() map[string]interface{} { + return map[string]interface{}{ + "Achievement": Achievement{}, + "Coupon": Coupon{}, + "Event": Event{}, + "Hypervisor": Hypervisor{}, + "LevelFlavor": LevelFlavor{}, + "LevelInstance": LevelInstance{}, + "LevelSubscription": LevelSubscription{}, + "Level": Level{}, + "Notification": Notification{}, + "ShopItem": ShopItem{}, + "TeamMember": TeamMember{}, + "Team": Team{}, + "TournamentTeam": TournamentTeam{}, + "Tournament": Tournament{}, + "UserSession": UserSession{}, + "User": User{}, + "WhoswhoAttempt": WhoswhoAttempt{}, + } +} + func All() []interface{} { return []interface{}{ + Achievement{}, Coupon{}, Event{}, Hypervisor{}, @@ -18,6 +45,5 @@ func All() []interface{} { UserSession{}, User{}, WhoswhoAttempt{}, - Achievement{}, } } diff --git a/entity/entity.pb.go b/entity/entity.pb.go index d66c6e606..09df054bc 100644 --- a/entity/entity.pb.go +++ b/entity/entity.pb.go @@ -221,12 +221,16 @@ func (m *Metadata) GetUpdatedAt() *time.Time { } type TeamMember struct { - Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` - Role TeamMember_Role `protobuf:"varint,100,opt,name=role,proto3,enum=pathwar.entity.TeamMember_Role" json:"role,omitempty"` - User *User `protobuf:"bytes,200,opt,name=user,proto3" json:"user,omitempty" gorm:"foreignkey:UserID"` - UserID string `protobuf:"bytes,201,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" sql:"not null" gorm:"index"` - TournamentTeam *TournamentTeam `protobuf:"bytes,202,opt,name=tournament_team,json=tournamentTeam,proto3" json:"tournament_team,omitempty" gorm:"foreignkey:TournamentTeamID"` - TournamentTeamID string `protobuf:"bytes,203,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"not null" gorm:"index"` + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + Role TeamMember_Role `protobuf:"varint,100,opt,name=role,proto3,enum=pathwar.entity.TeamMember_Role" json:"role,omitempty"` + User *User `protobuf:"bytes,200,opt,name=user,proto3" json:"user,omitempty" gorm:"foreignkey:UserID"` + UserID string `protobuf:"bytes,201,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" sql:"not null" gorm:"index"` + TournamentTeam *TournamentTeam `protobuf:"bytes,202,opt,name=tournament_team,json=tournamentTeam,proto3" json:"tournament_team,omitempty" gorm:"foreignkey:TournamentTeamID"` + TournamentTeamID string `protobuf:"bytes,203,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"not null" gorm:"index"` + Coupons []*Coupon `protobuf:"bytes,204,rep,name=coupons,proto3" json:"coupons,omitempty"` + Achievements []*Achievement `protobuf:"bytes,205,rep,name=achievements,proto3" json:"achievements,omitempty"` + SentWhoswhoAttempts []*WhoswhoAttempt `protobuf:"bytes,206,rep,name=sent_whoswho_attempts,json=sentWhoswhoAttempts,proto3" json:"sent_whoswho_attempts,omitempty"` + ReceivedWhoswhoAttempts []*WhoswhoAttempt `protobuf:"bytes,207,rep,name=received_whoswho_attempts,json=receivedWhoswhoAttempts,proto3" json:"received_whoswho_attempts,omitempty"` } func (m *TeamMember) Reset() { *m = TeamMember{} } @@ -297,16 +301,45 @@ func (m *TeamMember) GetTournamentTeamID() string { return "" } +func (m *TeamMember) GetCoupons() []*Coupon { + if m != nil { + return m.Coupons + } + return nil +} + +func (m *TeamMember) GetAchievements() []*Achievement { + if m != nil { + return m.Achievements + } + return nil +} + +func (m *TeamMember) GetSentWhoswhoAttempts() []*WhoswhoAttempt { + if m != nil { + return m.SentWhoswhoAttempts + } + return nil +} + +func (m *TeamMember) GetReceivedWhoswhoAttempts() []*WhoswhoAttempt { + if m != nil { + return m.ReceivedWhoswhoAttempts + } + return nil +} + // User definces a User Account / Profile type User struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` - Username string `protobuf:"bytes,100,opt,name=username,proto3" json:"username,omitempty"` - Email string `protobuf:"bytes,101,opt,name=email,proto3" json:"email,omitempty"` - PasswordHash string `protobuf:"bytes,102,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"` - PasswordSalt string `protobuf:"bytes,103,opt,name=password_salt,json=passwordSalt,proto3" json:"password_salt,omitempty"` - SshKey string `protobuf:"bytes,104,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"` - Sessions []*UserSession `protobuf:"bytes,200,rep,name=sessions,proto3" json:"sessions,omitempty"` - TeamMemberships []*TeamMember `protobuf:"bytes,201,rep,name=team_memberships,json=teamMemberships,proto3" json:"team_memberships,omitempty"` + Username string `protobuf:"bytes,100,opt,name=username,proto3" json:"username,omitempty"` + Email string `protobuf:"bytes,101,opt,name=email,proto3" json:"email,omitempty"` + PasswordHash string `protobuf:"bytes,102,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"` + PasswordSalt string `protobuf:"bytes,103,opt,name=password_salt,json=passwordSalt,proto3" json:"password_salt,omitempty"` + SshKey string `protobuf:"bytes,104,opt,name=ssh_key,json=sshKey,proto3" json:"ssh_key,omitempty"` + Sessions []*UserSession `protobuf:"bytes,200,rep,name=sessions,proto3" json:"sessions,omitempty"` + TeamMemberships []*TeamMember `protobuf:"bytes,201,rep,name=team_memberships,json=teamMemberships,proto3" json:"team_memberships,omitempty"` + Notifications []*Notification `protobuf:"bytes,202,rep,name=notifications,proto3" json:"notifications,omitempty"` } func (m *User) Reset() { *m = User{} } @@ -391,10 +424,18 @@ func (m *User) GetTeamMemberships() []*TeamMember { return nil } +func (m *User) GetNotifications() []*Notification { + if m != nil { + return m.Notifications + } + return nil +} + type UserSession struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` Username string `protobuf:"bytes,100,opt,name=username,proto3" json:"username,omitempty"` - UserID string `protobuf:"bytes,200,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + User *User `protobuf:"bytes,200,opt,name=user,proto3" json:"user,omitempty" gorm:"foreignkey:UserID"` + UserID string `protobuf:"bytes,201,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" sql:"not null" gorm:"index"` } func (m *UserSession) Reset() { *m = UserSession{} } @@ -437,6 +478,13 @@ func (m *UserSession) GetUsername() string { return "" } +func (m *UserSession) GetUser() *User { + if m != nil { + return m.User + } + return nil +} + func (m *UserSession) GetUserID() string { if m != nil { return m.UserID @@ -445,10 +493,11 @@ func (m *UserSession) GetUserID() string { } type Team struct { - Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` - Name string `protobuf:"bytes,100,opt,name=name,proto3" json:"name,omitempty"` - GravatarUrl string `protobuf:"bytes,101,opt,name=gravatar_url,json=gravatarUrl,proto3" json:"gravatar_url,omitempty"` - Members []*TeamMember `protobuf:"bytes,200,rep,name=members,proto3" json:"members,omitempty"` + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + Name string `protobuf:"bytes,100,opt,name=name,proto3" json:"name,omitempty"` + GravatarUrl string `protobuf:"bytes,101,opt,name=gravatar_url,json=gravatarUrl,proto3" json:"gravatar_url,omitempty"` + TournamentTeams []*TournamentTeam `protobuf:"bytes,200,rep,name=tournament_teams,json=tournamentTeams,proto3" json:"tournament_teams,omitempty"` + ReceivedWhoswhoAttempts []*WhoswhoAttempt `protobuf:"bytes,201,rep,name=received_whoswho_attempts,json=receivedWhoswhoAttempts,proto3" json:"received_whoswho_attempts,omitempty"` } func (m *Team) Reset() { *m = Team{} } @@ -498,9 +547,16 @@ func (m *Team) GetGravatarUrl() string { return "" } -func (m *Team) GetMembers() []*TeamMember { +func (m *Team) GetTournamentTeams() []*TournamentTeam { + if m != nil { + return m.TournamentTeams + } + return nil +} + +func (m *Team) GetReceivedWhoswhoAttempts() []*WhoswhoAttempt { if m != nil { - return m.Members + return m.ReceivedWhoswhoAttempts } return nil } @@ -599,7 +655,8 @@ func (m *Level) GetIsDraft() bool { } type Tournament struct { - Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + TournamentTeams []*TournamentTeam `protobuf:"bytes,200,rep,name=tournament_teams,json=tournamentTeams,proto3" json:"tournament_teams,omitempty"` } func (m *Tournament) Reset() { *m = Tournament{} } @@ -635,10 +692,20 @@ func (m *Tournament) XXX_DiscardUnknown() { var xxx_messageInfo_Tournament proto.InternalMessageInfo +func (m *Tournament) GetTournamentTeams() []*TournamentTeam { + if m != nil { + return m.TournamentTeams + } + return nil +} + type TournamentTeam struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` Tournament *Tournament `protobuf:"bytes,200,opt,name=tournament,proto3" json:"tournament,omitempty" gorm:"foreignkey:TournamentID"` TournamentID string `protobuf:"bytes,201,opt,name=tournament_id,json=tournamentId,proto3" json:"tournament_id,omitempty" sql:"not null" gorm:"index"` + Team *Team `protobuf:"bytes,202,opt,name=team,proto3" json:"team,omitempty" gorm:"foreignkey:TeamID"` + TeamID string `protobuf:"bytes,203,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty" sql:"not null" gorm:"index"` + ShopItems []*ShopItem `protobuf:"bytes,204,rep,name=shop_items,json=shopItems,proto3" json:"shop_items,omitempty"` } func (m *TournamentTeam) Reset() { *m = TournamentTeam{} } @@ -688,8 +755,42 @@ func (m *TournamentTeam) GetTournamentID() string { return "" } +func (m *TournamentTeam) GetTeam() *Team { + if m != nil { + return m.Team + } + return nil +} + +func (m *TournamentTeam) GetTeamID() string { + if m != nil { + return m.TeamID + } + return "" +} + +func (m *TournamentTeam) GetShopItems() []*ShopItem { + if m != nil { + return m.ShopItems + } + return nil +} + type WhoswhoAttempt struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + // + // fields + // + Success bool `protobuf:"varint,100,opt,name=success,proto3" json:"success,omitempty"` + // + // associations + // + AuthorTeamMember *TeamMember `protobuf:"bytes,200,opt,name=author_team_member,json=authorTeamMember,proto3" json:"author_team_member,omitempty" sql:"not null" gorm:"foreignkey:AuthorTeamMemberID"` + AuthorTeamMemberID string `protobuf:"bytes,201,opt,name=author_team_member_id,json=authorTeamMemberId,proto3" json:"author_team_member_id,omitempty" sql:"not null" gorm:"index"` + TargetTeamMember *TeamMember `protobuf:"bytes,202,opt,name=target_team_member,json=targetTeamMember,proto3" json:"target_team_member,omitempty" sql:"not null" gorm:"foreignkey:TargetTeamMemberID"` + TargetTeamMemberID string `protobuf:"bytes,203,opt,name=target_team_member_id,json=targetTeamMemberId,proto3" json:"target_team_member_id,omitempty" sql:"not null" gorm:"index"` + TargetTournamentTeam *TournamentTeam `protobuf:"bytes,204,opt,name=target_tournament_team,json=targetTournamentTeam,proto3" json:"target_tournament_team,omitempty" sql:"not null" gorm:"foreignkey:TargetTournamentTeamID"` + TargetTournamentTeamID string `protobuf:"bytes,205,opt,name=target_tournament_team_id,json=targetTournamentTeamId,proto3" json:"target_tournament_team_id,omitempty" sql:"not null" gorm:"index"` } func (m *WhoswhoAttempt) Reset() { *m = WhoswhoAttempt{} } @@ -725,10 +826,61 @@ func (m *WhoswhoAttempt) XXX_DiscardUnknown() { var xxx_messageInfo_WhoswhoAttempt proto.InternalMessageInfo +func (m *WhoswhoAttempt) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *WhoswhoAttempt) GetAuthorTeamMember() *TeamMember { + if m != nil { + return m.AuthorTeamMember + } + return nil +} + +func (m *WhoswhoAttempt) GetAuthorTeamMemberID() string { + if m != nil { + return m.AuthorTeamMemberID + } + return "" +} + +func (m *WhoswhoAttempt) GetTargetTeamMember() *TeamMember { + if m != nil { + return m.TargetTeamMember + } + return nil +} + +func (m *WhoswhoAttempt) GetTargetTeamMemberID() string { + if m != nil { + return m.TargetTeamMemberID + } + return "" +} + +func (m *WhoswhoAttempt) GetTargetTournamentTeam() *TournamentTeam { + if m != nil { + return m.TargetTournamentTeam + } + return nil +} + +func (m *WhoswhoAttempt) GetTargetTournamentTeamID() string { + if m != nil { + return m.TargetTournamentTeamID + } + return "" +} + type LevelSubscription struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` TournamentTeam *TournamentTeam `protobuf:"bytes,200,opt,name=tournament_team,json=tournamentTeam,proto3" json:"tournament_team,omitempty" gorm:"foreignkey:TournamentTeamID"` TournamentTeamID string `protobuf:"bytes,201,opt,name=tournament_team_id,json=tournamentTeamId,proto3" json:"tournament_team_id,omitempty" sql:"not null" gorm:"index"` + LevelFlavor *LevelFlavor `protobuf:"bytes,202,opt,name=level_flavor,json=levelFlavor,proto3" json:"level_flavor,omitempty" gorm:"foreignkey:LevelFlavorID"` + LevelFlavorID string `protobuf:"bytes,203,opt,name=level_flavor_id,json=levelFlavorId,proto3" json:"level_flavor_id,omitempty" sql:"not null" gorm:"index"` } func (m *LevelSubscription) Reset() { *m = LevelSubscription{} } @@ -778,6 +930,20 @@ func (m *LevelSubscription) GetTournamentTeamID() string { return "" } +func (m *LevelSubscription) GetLevelFlavor() *LevelFlavor { + if m != nil { + return m.LevelFlavor + } + return nil +} + +func (m *LevelSubscription) GetLevelFlavorID() string { + if m != nil { + return m.LevelFlavorID + } + return "" +} + type ShopItem struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` TournamentTeam *TournamentTeam `protobuf:"bytes,200,opt,name=tournament_team,json=tournamentTeam,proto3" json:"tournament_team,omitempty" gorm:"foreignkey:TournamentTeamID"` @@ -832,7 +998,11 @@ func (m *ShopItem) GetTournamentTeamID() string { } type LevelFlavor struct { - Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + Level *Level `protobuf:"bytes,200,opt,name=level,proto3" json:"level,omitempty" gorm:"foreignkey:LevelID"` + LevelID string `protobuf:"bytes,201,opt,name=level_id,json=levelId,proto3" json:"level_id,omitempty" sql:"not null" gorm:"index"` + LevelInstances []*LevelInstance `protobuf:"bytes,202,rep,name=level_instances,json=levelInstances,proto3" json:"level_instances,omitempty"` + LevelSubscriptions []*LevelSubscription `protobuf:"bytes,203,rep,name=level_subscriptions,json=levelSubscriptions,proto3" json:"level_subscriptions,omitempty"` } func (m *LevelFlavor) Reset() { *m = LevelFlavor{} } @@ -868,13 +1038,40 @@ func (m *LevelFlavor) XXX_DiscardUnknown() { var xxx_messageInfo_LevelFlavor proto.InternalMessageInfo +func (m *LevelFlavor) GetLevel() *Level { + if m != nil { + return m.Level + } + return nil +} + +func (m *LevelFlavor) GetLevelID() string { + if m != nil { + return m.LevelID + } + return "" +} + +func (m *LevelFlavor) GetLevelInstances() []*LevelInstance { + if m != nil { + return m.LevelInstances + } + return nil +} + +func (m *LevelFlavor) GetLevelSubscriptions() []*LevelSubscription { + if m != nil { + return m.LevelSubscriptions + } + return nil +} + type LevelInstance struct { - Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` - // - // associations - // - Hypervisor *Hypervisor `protobuf:"bytes,200,opt,name=hypervisor,proto3" json:"hypervisor,omitempty" gorm:"foreignkey:HypervisorID"` - HypervisorID string `protobuf:"bytes,201,opt,name=hypervisor_id,json=hypervisorId,proto3" json:"hypervisor_id,omitempty" sql:"not null" gorm:"index"` + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + Hypervisor *Hypervisor `protobuf:"bytes,200,opt,name=hypervisor,proto3" json:"hypervisor,omitempty" gorm:"foreignkey:HypervisorID"` + HypervisorID string `protobuf:"bytes,201,opt,name=hypervisor_id,json=hypervisorId,proto3" json:"hypervisor_id,omitempty" sql:"not null" gorm:"index"` + LevelFlavor *LevelFlavor `protobuf:"bytes,202,opt,name=level_flavor,json=levelFlavor,proto3" json:"level_flavor,omitempty" gorm:"foreignkey:LevelFlavorID"` + LevelFlavorID string `protobuf:"bytes,203,opt,name=level_flavor_id,json=levelFlavorId,proto3" json:"level_flavor_id,omitempty" sql:"not null" gorm:"index"` } func (m *LevelInstance) Reset() { *m = LevelInstance{} } @@ -924,8 +1121,23 @@ func (m *LevelInstance) GetHypervisorID() string { return "" } +func (m *LevelInstance) GetLevelFlavor() *LevelFlavor { + if m != nil { + return m.LevelFlavor + } + return nil +} + +func (m *LevelInstance) GetLevelFlavorID() string { + if m != nil { + return m.LevelFlavorID + } + return "" +} + type Hypervisor struct { - Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + LevelInstances []*LevelInstance `protobuf:"bytes,200,rep,name=level_instances,json=levelInstances,proto3" json:"level_instances,omitempty"` } func (m *Hypervisor) Reset() { *m = Hypervisor{} } @@ -961,6 +1173,13 @@ func (m *Hypervisor) XXX_DiscardUnknown() { var xxx_messageInfo_Hypervisor proto.InternalMessageInfo +func (m *Hypervisor) GetLevelInstances() []*LevelInstance { + if m != nil { + return m.LevelInstances + } + return nil +} + type Event struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` } @@ -1000,6 +1219,8 @@ var xxx_messageInfo_Event proto.InternalMessageInfo type Notification struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` + User *User `protobuf:"bytes,200,opt,name=user,proto3" json:"user,omitempty" gorm:"foreignkey:UserID"` + UserID string `protobuf:"bytes,201,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty" sql:"not null" gorm:"index"` } func (m *Notification) Reset() { *m = Notification{} } @@ -1035,6 +1256,20 @@ func (m *Notification) XXX_DiscardUnknown() { var xxx_messageInfo_Notification proto.InternalMessageInfo +func (m *Notification) GetUser() *User { + if m != nil { + return m.User + } + return nil +} + +func (m *Notification) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + type Coupon struct { Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` // @@ -1266,100 +1501,130 @@ func init() { func init() { proto.RegisterFile("entity/entity.proto", fileDescriptor_9b38ccb06a827056) } var fileDescriptor_9b38ccb06a827056 = []byte{ - // 1473 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x72, 0x1b, 0xc5, - 0x16, 0xf6, 0xc8, 0x92, 0x2c, 0x1f, 0xc9, 0xb6, 0xdc, 0xb6, 0xe3, 0xf1, 0x4f, 0x24, 0x65, 0xee, - 0xad, 0x5b, 0xbe, 0x37, 0x37, 0x32, 0x28, 0xb8, 0x8a, 0x0a, 0x05, 0x85, 0x15, 0x93, 0x44, 0x45, - 0x12, 0x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, - 0xc9, 0x57, 0xd1, 0x32, 0x2c, 0xc4, 0x6b, 0x0b, 0x15, 0x6b, 0xca, 0x97, 0x29, 0x48, 0xef, 0xf8, - 0x96, 0x8b, 0xde, 0x86, 0x19, 0xf1, 0x16, 0x1b, 0x3c, 0x3f, 0xff, 0xc0, 0xeb, 0xb3, 0xe0, 0x47, - 0x1b, 0x8a, 0xae, 0x41, 0xd6, 0x14, 0x9c, 0xc9, 0x29, 0x61, 0xba, 0x34, 0x6a, 0x2a, 0x18, 0x55, - 0xfb, 0x20, 0xf4, 0x3f, 0xc8, 0x70, 0x73, 0x2a, 0x4f, 0x0a, 0x74, 0xe2, 0x2f, 0x2b, 0x6a, 0x00, - 0x41, 0x6f, 0x42, 0x21, 0xfe, 0xb8, 0x95, 0xd3, 0xe7, 0x3e, 0xc3, 0xf2, 0xb1, 0x77, 0x2d, 0x0f, - 0xc5, 0xb7, 0x54, 0xce, 0x24, 0x87, 0xe2, 0x76, 0x6a, 0x00, 0xa9, 0x5f, 0x3d, 0x3a, 0x2e, 0x49, - 0x4f, 0x8f, 0x4b, 0xd2, 0xaf, 0xc7, 0x25, 0xe9, 0xf1, 0xf3, 0xd2, 0xc4, 0xd3, 0xe7, 0xa5, 0x89, - 0x9f, 0x9f, 0x97, 0x26, 0x3e, 0x9c, 0x0f, 0xad, 0xdc, 0xc3, 0xfe, 0x0f, 0x7d, 0xfb, 0x59, 0xf1, - 0x53, 0xd6, 0xf5, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x48, 0x8d, 0xd6, 0x91, 0x00, 0x14, 0x00, - 0x00, + // 1954 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x23, 0x49, + 0x15, 0x9f, 0xf6, 0x57, 0x9c, 0x67, 0x27, 0xf1, 0x54, 0xbe, 0x3a, 0x99, 0xc4, 0xed, 0xe9, 0x95, + 0x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1, 0x0e, 0xa8, 0x1c, 0x36, 0x89, 0x9b, 0x1b, 0x72, 0x0f, 0x12, + 0xb9, 0x0b, 0x43, 0xee, 0x61, 0x22, 0x37, 0x8f, 0x76, 0x61, 0x4b, 0x20, 0x27, 0xb1, 0x17, 0x19, + 0xfb, 0x5d, 0xd3, 0xb1, 0x2d, 0x93, 0xe2, 0x49, 0x4f, 0x00, 0x2a, 0xc3, 0x76, 0xc8, 0x4e, 0x70, + 0x47, 0x01, 0x55, 0x60, 0x67, 0xa4, 0x9e, 0x34, 0x41, 0x51, 0x96, 0x48, 0x74, 0xcc, 0x92, 0x2c, + 0x91, 0xe8, 0x9d, 0x65, 0x74, 0x1b, 0x76, 0xa3, 0x59, 0x92, 0x44, 0x56, 0x64, 0x91, 0x64, 0x3f, + 0x95, 0x64, 0x91, 0x64, 0x67, 0xdd, 0x44, 0x3a, 0x94, 0xa5, 0x89, 0x92, 0x64, 0x10, 0x5a, 0x85, + 0x95, 0x91, 0x8c, 0x28, 0x51, 0xa5, 0x55, 0xb4, 0x06, 0xa5, 0x11, 0xb6, 0x20, 0x92, 0xd2, 0x1a, + 0x5a, 0x87, 0x9b, 0x11, 0x5c, 0x48, 0x5e, 0x97, 0xc9, 0x07, 0x23, 0xf2, 0x86, 0x4c, 0x3e, 0x1c, + 0x91, 0x37, 0xd1, 0x06, 0x20, 0x69, 0x4d, 0x21, 0x5d, 0x95, 0xe9, 0x07, 0x11, 0x7d, 0x4b, 0xa6, + 0x1f, 0x46, 0xf4, 0x6d, 0xb4, 0x09, 0xab, 0xb2, 0x6d, 0x21, 0xe3, 0x96, 0xfe, 0xd3, 0x14, 0x64, + 0xee, 0xf7, 0x3a, 0x1e, 0x7a, 0x13, 0x96, 0x78, 0xe5, 0x1e, 0x3d, 0xa4, 0x5f, 0xe1, 0x1d, 0xbd, + 0xd8, 0x8b, 0x06, 0x04, 0xbd, 0x0c, 0x39, 0x7e, 0xe0, 0x11, 0x35, 0xc5, 0x55, 0x93, 0x9b, 0x4e, + 0x63, 0x28, 0x84, 0x5e, 0x84, 0x2c, 0x53, 0x27, 0x6a, 0x9a, 0x4b, 0x27, 0x9e, 0x39, 0x86, 0x10, + 0x41, 0x5f, 0x86, 0xa2, 0xfc, 0x4c, 0xaf, 0x66, 0x66, 0xbe, 0xd0, 0x17, 0xa4, 0x17, 0x7a, 0x36, + 0x95, 0x78, 0xdb, 0xcb, 0x26, 0x4f, 0xc5, 0x1f, 0xf4, 0x84, 0x48, 0xed, 0xa5, 0x8b, 0x41, 0x59, + 0x79, 0x36, 0x28, 0x2b, 0x7f, 0x1f, 0x94, 0x95, 0xf7, 0x9f, 0x97, 0x6f, 0x3c, 0x7b, 0x5e, 0xbe, + 0xf1, 0xe7, 0xe7, 0xe5, 0x1b, 0xdf, 0xb9, 0x19, 0x6a, 0x79, 0xe7, 0xc3, 0x7f, 0x76, 0x4f, 0x72, + 0xfc, 0xbf, 0xcb, 0x3b, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x85, 0x10, 0xc3, 0xde, 0xf1, 0x1d, + 0x00, 0x00, } func (m *Metadata) Marshal() (dAtA []byte, err error) { @@ -1476,6 +1741,62 @@ func (m *TeamMember) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintEntity(dAtA, i, uint64(len(m.TournamentTeamID))) i += copy(dAtA[i:], m.TournamentTeamID) } + if len(m.Coupons) > 0 { + for _, msg := range m.Coupons { + dAtA[i] = 0xe2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Achievements) > 0 { + for _, msg := range m.Achievements { + dAtA[i] = 0xea + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.SentWhoswhoAttempts) > 0 { + for _, msg := range m.SentWhoswhoAttempts { + dAtA[i] = 0xf2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.ReceivedWhoswhoAttempts) > 0 { + for _, msg := range m.ReceivedWhoswhoAttempts { + dAtA[i] = 0xfa + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -1570,6 +1891,20 @@ func (m *User) MarshalTo(dAtA []byte) (int, error) { i += n } } + if len(m.Notifications) > 0 { + for _, msg := range m.Notifications { + dAtA[i] = 0xd2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -1604,11 +1939,23 @@ func (m *UserSession) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintEntity(dAtA, i, uint64(len(m.Username))) i += copy(dAtA[i:], m.Username) } - if len(m.UserID) > 0 { + if m.User != nil { dAtA[i] = 0xc2 i++ dAtA[i] = 0xc i++ + i = encodeVarintEntity(dAtA, i, uint64(m.User.Size())) + n8, err := m.User.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if len(m.UserID) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ i = encodeVarintEntity(dAtA, i, uint64(len(m.UserID))) i += copy(dAtA[i:], m.UserID) } @@ -1633,11 +1980,11 @@ func (m *Team) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n8, err := m.Metadata.MarshalTo(dAtA[i:]) + n9, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n9 if len(m.Name) > 0 { dAtA[i] = 0xa2 i++ @@ -1654,8 +2001,8 @@ func (m *Team) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintEntity(dAtA, i, uint64(len(m.GravatarUrl))) i += copy(dAtA[i:], m.GravatarUrl) } - if len(m.Members) > 0 { - for _, msg := range m.Members { + if len(m.TournamentTeams) > 0 { + for _, msg := range m.TournamentTeams { dAtA[i] = 0xc2 i++ dAtA[i] = 0xc @@ -1668,6 +2015,20 @@ func (m *Team) MarshalTo(dAtA []byte) (int, error) { i += n } } + if len(m.ReceivedWhoswhoAttempts) > 0 { + for _, msg := range m.ReceivedWhoswhoAttempts { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -1689,11 +2050,11 @@ func (m *Level) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n9, err := m.Metadata.MarshalTo(dAtA[i:]) + n10, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n10 if len(m.Name) > 0 { dAtA[i] = 0xa2 i++ @@ -1775,15 +2136,29 @@ func (m *Tournament) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n10, err := m.Metadata.MarshalTo(dAtA[i:]) + n11, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 - return i, nil -} - -func (m *TournamentTeam) Marshal() (dAtA []byte, err error) { + i += n11 + if len(m.TournamentTeams) > 0 { + for _, msg := range m.TournamentTeams { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *TournamentTeam) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1801,22 +2176,22 @@ func (m *TournamentTeam) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n11, err := m.Metadata.MarshalTo(dAtA[i:]) + n12, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n12 if m.Tournament != nil { dAtA[i] = 0xc2 i++ dAtA[i] = 0xc i++ i = encodeVarintEntity(dAtA, i, uint64(m.Tournament.Size())) - n12, err := m.Tournament.MarshalTo(dAtA[i:]) + n13, err := m.Tournament.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n13 } if len(m.TournamentID) > 0 { dAtA[i] = 0xca @@ -1826,6 +2201,40 @@ func (m *TournamentTeam) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintEntity(dAtA, i, uint64(len(m.TournamentID))) i += copy(dAtA[i:], m.TournamentID) } + if m.Team != nil { + dAtA[i] = 0xd2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Team.Size())) + n14, err := m.Team.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + if len(m.TeamID) > 0 { + dAtA[i] = 0xda + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.TeamID))) + i += copy(dAtA[i:], m.TeamID) + } + if len(m.ShopItems) > 0 { + for _, msg := range m.ShopItems { + dAtA[i] = 0xe2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -1847,11 +2256,83 @@ func (m *WhoswhoAttempt) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n13, err := m.Metadata.MarshalTo(dAtA[i:]) + n15, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n15 + if m.Success { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x6 + i++ + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.AuthorTeamMember != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.AuthorTeamMember.Size())) + n16, err := m.AuthorTeamMember.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + if len(m.AuthorTeamMemberID) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.AuthorTeamMemberID))) + i += copy(dAtA[i:], m.AuthorTeamMemberID) + } + if m.TargetTeamMember != nil { + dAtA[i] = 0xd2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.TargetTeamMember.Size())) + n17, err := m.TargetTeamMember.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if len(m.TargetTeamMemberID) > 0 { + dAtA[i] = 0xda + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.TargetTeamMemberID))) + i += copy(dAtA[i:], m.TargetTeamMemberID) + } + if m.TargetTournamentTeam != nil { + dAtA[i] = 0xe2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.TargetTournamentTeam.Size())) + n18, err := m.TargetTournamentTeam.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + if len(m.TargetTournamentTeamID) > 0 { + dAtA[i] = 0xea + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.TargetTournamentTeamID))) + i += copy(dAtA[i:], m.TargetTournamentTeamID) + } return i, nil } @@ -1873,22 +2354,22 @@ func (m *LevelSubscription) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n14, err := m.Metadata.MarshalTo(dAtA[i:]) + n19, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n19 if m.TournamentTeam != nil { dAtA[i] = 0xc2 i++ dAtA[i] = 0xc i++ i = encodeVarintEntity(dAtA, i, uint64(m.TournamentTeam.Size())) - n15, err := m.TournamentTeam.MarshalTo(dAtA[i:]) + n20, err := m.TournamentTeam.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n20 } if len(m.TournamentTeamID) > 0 { dAtA[i] = 0xca @@ -1898,6 +2379,26 @@ func (m *LevelSubscription) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintEntity(dAtA, i, uint64(len(m.TournamentTeamID))) i += copy(dAtA[i:], m.TournamentTeamID) } + if m.LevelFlavor != nil { + dAtA[i] = 0xd2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.LevelFlavor.Size())) + n21, err := m.LevelFlavor.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + if len(m.LevelFlavorID) > 0 { + dAtA[i] = 0xda + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.LevelFlavorID))) + i += copy(dAtA[i:], m.LevelFlavorID) + } return i, nil } @@ -1919,22 +2420,22 @@ func (m *ShopItem) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n16, err := m.Metadata.MarshalTo(dAtA[i:]) + n22, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n22 if m.TournamentTeam != nil { dAtA[i] = 0xc2 i++ dAtA[i] = 0xc i++ i = encodeVarintEntity(dAtA, i, uint64(m.TournamentTeam.Size())) - n17, err := m.TournamentTeam.MarshalTo(dAtA[i:]) + n23, err := m.TournamentTeam.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n23 } if len(m.TournamentTeamID) > 0 { dAtA[i] = 0xca @@ -1965,11 +2466,59 @@ func (m *LevelFlavor) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n18, err := m.Metadata.MarshalTo(dAtA[i:]) + n24, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n24 + if m.Level != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.Level.Size())) + n25, err := m.Level.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + } + if len(m.LevelID) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.LevelID))) + i += copy(dAtA[i:], m.LevelID) + } + if len(m.LevelInstances) > 0 { + for _, msg := range m.LevelInstances { + dAtA[i] = 0xd2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.LevelSubscriptions) > 0 { + for _, msg := range m.LevelSubscriptions { + dAtA[i] = 0xda + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -1991,22 +2540,22 @@ func (m *LevelInstance) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n19, err := m.Metadata.MarshalTo(dAtA[i:]) + n26, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n26 if m.Hypervisor != nil { dAtA[i] = 0xc2 i++ dAtA[i] = 0xc i++ i = encodeVarintEntity(dAtA, i, uint64(m.Hypervisor.Size())) - n20, err := m.Hypervisor.MarshalTo(dAtA[i:]) + n27, err := m.Hypervisor.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n27 } if len(m.HypervisorID) > 0 { dAtA[i] = 0xca @@ -2016,6 +2565,26 @@ func (m *LevelInstance) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintEntity(dAtA, i, uint64(len(m.HypervisorID))) i += copy(dAtA[i:], m.HypervisorID) } + if m.LevelFlavor != nil { + dAtA[i] = 0xd2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.LevelFlavor.Size())) + n28, err := m.LevelFlavor.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n28 + } + if len(m.LevelFlavorID) > 0 { + dAtA[i] = 0xda + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.LevelFlavorID))) + i += copy(dAtA[i:], m.LevelFlavorID) + } return i, nil } @@ -2037,11 +2606,25 @@ func (m *Hypervisor) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n21, err := m.Metadata.MarshalTo(dAtA[i:]) + n29, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n29 + if len(m.LevelInstances) > 0 { + for _, msg := range m.LevelInstances { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -2063,11 +2646,11 @@ func (m *Event) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n22, err := m.Metadata.MarshalTo(dAtA[i:]) + n30, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n30 return i, nil } @@ -2089,11 +2672,31 @@ func (m *Notification) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n23, err := m.Metadata.MarshalTo(dAtA[i:]) + n31, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n31 + if m.User != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(m.User.Size())) + n32, err := m.User.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 + } + if len(m.UserID) > 0 { + dAtA[i] = 0xca + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintEntity(dAtA, i, uint64(len(m.UserID))) + i += copy(dAtA[i:], m.UserID) + } return i, nil } @@ -2115,11 +2718,11 @@ func (m *Coupon) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n24, err := m.Metadata.MarshalTo(dAtA[i:]) + n33, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n33 if m.Value != 0 { dAtA[i] = 0xa0 i++ @@ -2133,11 +2736,11 @@ func (m *Coupon) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xc i++ i = encodeVarintEntity(dAtA, i, uint64(m.TeamMember.Size())) - n25, err := m.TeamMember.MarshalTo(dAtA[i:]) + n34, err := m.TeamMember.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n25 + i += n34 } if len(m.TeamMemberID) > 0 { dAtA[i] = 0xca @@ -2168,11 +2771,11 @@ func (m *Achievement) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintEntity(dAtA, i, uint64(m.Metadata.Size())) - n26, err := m.Metadata.MarshalTo(dAtA[i:]) + n35, err := m.Metadata.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n35 if m.Type != 0 { dAtA[i] = 0xa0 i++ @@ -2186,11 +2789,11 @@ func (m *Achievement) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xc i++ i = encodeVarintEntity(dAtA, i, uint64(m.TeamMember.Size())) - n27, err := m.TeamMember.MarshalTo(dAtA[i:]) + n36, err := m.TeamMember.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n27 + i += n36 } if len(m.TeamMemberID) > 0 { dAtA[i] = 0xca @@ -2338,6 +2941,30 @@ func (m *TeamMember) Size() (n int) { if l > 0 { n += 2 + l + sovEntity(uint64(l)) } + if len(m.Coupons) > 0 { + for _, e := range m.Coupons { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } + if len(m.Achievements) > 0 { + for _, e := range m.Achievements { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } + if len(m.SentWhoswhoAttempts) > 0 { + for _, e := range m.SentWhoswhoAttempts { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } + if len(m.ReceivedWhoswhoAttempts) > 0 { + for _, e := range m.ReceivedWhoswhoAttempts { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } return n } @@ -2381,6 +3008,12 @@ func (m *User) Size() (n int) { n += 2 + l + sovEntity(uint64(l)) } } + if len(m.Notifications) > 0 { + for _, e := range m.Notifications { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } return n } @@ -2396,6 +3029,10 @@ func (m *UserSession) Size() (n int) { if l > 0 { n += 2 + l + sovEntity(uint64(l)) } + if m.User != nil { + l = m.User.Size() + n += 2 + l + sovEntity(uint64(l)) + } l = len(m.UserID) if l > 0 { n += 2 + l + sovEntity(uint64(l)) @@ -2419,8 +3056,14 @@ func (m *Team) Size() (n int) { if l > 0 { n += 2 + l + sovEntity(uint64(l)) } - if len(m.Members) > 0 { - for _, e := range m.Members { + if len(m.TournamentTeams) > 0 { + for _, e := range m.TournamentTeams { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } + if len(m.ReceivedWhoswhoAttempts) > 0 { + for _, e := range m.ReceivedWhoswhoAttempts { l = e.Size() n += 2 + l + sovEntity(uint64(l)) } @@ -2474,6 +3117,12 @@ func (m *Tournament) Size() (n int) { _ = l l = m.Metadata.Size() n += 1 + l + sovEntity(uint64(l)) + if len(m.TournamentTeams) > 0 { + for _, e := range m.TournamentTeams { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } return n } @@ -2493,6 +3142,20 @@ func (m *TournamentTeam) Size() (n int) { if l > 0 { n += 2 + l + sovEntity(uint64(l)) } + if m.Team != nil { + l = m.Team.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.TeamID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + if len(m.ShopItems) > 0 { + for _, e := range m.ShopItems { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } return n } @@ -2504,16 +3167,43 @@ func (m *WhoswhoAttempt) Size() (n int) { _ = l l = m.Metadata.Size() n += 1 + l + sovEntity(uint64(l)) - return n -} - -func (m *LevelSubscription) Size() (n int) { - if m == nil { - return 0 + if m.Success { + n += 3 } - var l int - _ = l - l = m.Metadata.Size() + if m.AuthorTeamMember != nil { + l = m.AuthorTeamMember.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.AuthorTeamMemberID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + if m.TargetTeamMember != nil { + l = m.TargetTeamMember.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.TargetTeamMemberID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + if m.TargetTournamentTeam != nil { + l = m.TargetTournamentTeam.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.TargetTournamentTeamID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + return n +} + +func (m *LevelSubscription) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Metadata.Size() n += 1 + l + sovEntity(uint64(l)) if m.TournamentTeam != nil { l = m.TournamentTeam.Size() @@ -2523,6 +3213,14 @@ func (m *LevelSubscription) Size() (n int) { if l > 0 { n += 2 + l + sovEntity(uint64(l)) } + if m.LevelFlavor != nil { + l = m.LevelFlavor.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.LevelFlavorID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } return n } @@ -2553,6 +3251,26 @@ func (m *LevelFlavor) Size() (n int) { _ = l l = m.Metadata.Size() n += 1 + l + sovEntity(uint64(l)) + if m.Level != nil { + l = m.Level.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.LevelID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } + if len(m.LevelInstances) > 0 { + for _, e := range m.LevelInstances { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } + if len(m.LevelSubscriptions) > 0 { + for _, e := range m.LevelSubscriptions { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } return n } @@ -2572,6 +3290,14 @@ func (m *LevelInstance) Size() (n int) { if l > 0 { n += 2 + l + sovEntity(uint64(l)) } + if m.LevelFlavor != nil { + l = m.LevelFlavor.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.LevelFlavorID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } return n } @@ -2583,6 +3309,12 @@ func (m *Hypervisor) Size() (n int) { _ = l l = m.Metadata.Size() n += 1 + l + sovEntity(uint64(l)) + if len(m.LevelInstances) > 0 { + for _, e := range m.LevelInstances { + l = e.Size() + n += 2 + l + sovEntity(uint64(l)) + } + } return n } @@ -2605,6 +3337,14 @@ func (m *Notification) Size() (n int) { _ = l l = m.Metadata.Size() n += 1 + l + sovEntity(uint64(l)) + if m.User != nil { + l = m.User.Size() + n += 2 + l + sovEntity(uint64(l)) + } + l = len(m.UserID) + if l > 0 { + n += 2 + l + sovEntity(uint64(l)) + } return n } @@ -3051,6 +3791,130 @@ func (m *TeamMember) Unmarshal(dAtA []byte) error { } m.TournamentTeamID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 204: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coupons", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coupons = append(m.Coupons, &Coupon{}) + if err := m.Coupons[len(m.Coupons)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 205: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Achievements", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Achievements = append(m.Achievements, &Achievement{}) + if err := m.Achievements[len(m.Achievements)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 206: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SentWhoswhoAttempts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SentWhoswhoAttempts = append(m.SentWhoswhoAttempts, &WhoswhoAttempt{}) + if err := m.SentWhoswhoAttempts[len(m.SentWhoswhoAttempts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 207: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceivedWhoswhoAttempts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReceivedWhoswhoAttempts = append(m.ReceivedWhoswhoAttempts, &WhoswhoAttempt{}) + if err := m.ReceivedWhoswhoAttempts[len(m.ReceivedWhoswhoAttempts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEntity(dAtA[iNdEx:]) @@ -3338,6 +4202,37 @@ func (m *User) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 202: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Notifications", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Notifications = append(m.Notifications, &Notification{}) + if err := m.Notifications[len(m.Notifications)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEntity(dAtA[iNdEx:]) @@ -3448,6 +4343,39 @@ func (m *UserSession) Unmarshal(dAtA []byte) error { m.Username = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.User == nil { + m.User = &User{} + } + if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 201: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) } @@ -3616,7 +4544,7 @@ func (m *Team) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 200: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeams", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3640,21 +4568,52 @@ func (m *Team) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Members = append(m.Members, &TeamMember{}) - if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.TournamentTeams = append(m.TournamentTeams, &TournamentTeam{}) + if err := m.TournamentTeams[len(m.TournamentTeams)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEntity(dAtA[iNdEx:]) - if err != nil { - return err + case 201: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceivedWhoswhoAttempts", wireType) } - if skippy < 0 { + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { return ErrInvalidLengthEntity } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReceivedWhoswhoAttempts = append(m.ReceivedWhoswhoAttempts, &WhoswhoAttempt{}) + if err := m.ReceivedWhoswhoAttempts[len(m.ReceivedWhoswhoAttempts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy @@ -3999,6 +4958,37 @@ func (m *Tournament) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TournamentTeams = append(m.TournamentTeams, &TournamentTeam{}) + if err := m.TournamentTeams[len(m.TournamentTeams)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEntity(dAtA[iNdEx:]) @@ -4141,6 +5131,99 @@ func (m *TournamentTeam) Unmarshal(dAtA []byte) error { } m.TournamentID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 202: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Team", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Team == nil { + m.Team = &Team{} + } + if err := m.Team.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 203: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TeamID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TeamID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 204: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShopItems", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShopItems = append(m.ShopItems, &ShopItem{}) + if err := m.ShopItems[len(m.ShopItems)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEntity(dAtA[iNdEx:]) @@ -4193,9 +5276,420 @@ func (m *WhoswhoAttempt) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 100: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthorTeamMember", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AuthorTeamMember == nil { + m.AuthorTeamMember = &TeamMember{} + } + if err := m.AuthorTeamMember.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 201: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthorTeamMemberID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuthorTeamMemberID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 202: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetTeamMember", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TargetTeamMember == nil { + m.TargetTeamMember = &TeamMember{} + } + if err := m.TargetTeamMember.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 203: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetTeamMemberID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetTeamMemberID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 204: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetTournamentTeam", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TargetTournamentTeam == nil { + m.TargetTournamentTeam = &TournamentTeam{} + } + if err := m.TargetTournamentTeam.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 205: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetTournamentTeamID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetTournamentTeamID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEntity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEntity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LevelSubscription) 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 ErrIntOverflowEntity + } + 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: LevelSubscription: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LevelSubscription: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeam", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TournamentTeam == nil { + m.TournamentTeam = &TournamentTeam{} + } + if err := m.TournamentTeam.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 201: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeamID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TournamentTeamID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 202: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LevelFlavor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LevelFlavor == nil { + m.LevelFlavor = &LevelFlavor{} + } + if err := m.LevelFlavor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 203: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LevelFlavorID", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEntity @@ -4205,21 +5699,20 @@ func (m *WhoswhoAttempt) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthEntity } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.LevelFlavorID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4242,7 +5735,7 @@ func (m *WhoswhoAttempt) Unmarshal(dAtA []byte) error { } return nil } -func (m *LevelSubscription) Unmarshal(dAtA []byte) error { +func (m *ShopItem) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4265,10 +5758,10 @@ func (m *LevelSubscription) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LevelSubscription: wiretype end group for non-group") + return fmt.Errorf("proto: ShopItem: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LevelSubscription: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ShopItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4384,7 +5877,7 @@ func (m *LevelSubscription) Unmarshal(dAtA []byte) error { } return nil } -func (m *ShopItem) Unmarshal(dAtA []byte) error { +func (m *LevelFlavor) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4407,10 +5900,10 @@ func (m *ShopItem) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ShopItem: wiretype end group for non-group") + return fmt.Errorf("proto: LevelFlavor: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ShopItem: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LevelFlavor: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4445,7 +5938,7 @@ func (m *ShopItem) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 200: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeam", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4469,16 +5962,16 @@ func (m *ShopItem) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TournamentTeam == nil { - m.TournamentTeam = &TournamentTeam{} + if m.Level == nil { + m.Level = &Level{} } - if err := m.TournamentTeam.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Level.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 201: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TournamentTeamID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LevelID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4503,61 +5996,42 @@ func (m *ShopItem) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TournamentTeamID = string(dAtA[iNdEx:postIndex]) + m.LevelID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEntity(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEntity + case 202: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LevelInstances", wireType) } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LevelFlavor) 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 ErrIntOverflowEntity + if msglen < 0 { + return ErrInvalidLengthEntity } - if iNdEx >= l { + postIndex := iNdEx + msglen + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break + m.LevelInstances = append(m.LevelInstances, &LevelInstance{}) + if err := m.LevelInstances[len(m.LevelInstances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LevelFlavor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LevelFlavor: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 203: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LevelSubscriptions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4581,7 +6055,8 @@ func (m *LevelFlavor) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.LevelSubscriptions = append(m.LevelSubscriptions, &LevelSubscription{}) + if err := m.LevelSubscriptions[len(m.LevelSubscriptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4727,6 +6202,68 @@ func (m *LevelInstance) Unmarshal(dAtA []byte) error { } m.HypervisorID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 202: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LevelFlavor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LevelFlavor == nil { + m.LevelFlavor = &LevelFlavor{} + } + if err := m.LevelFlavor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 203: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LevelFlavorID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LevelFlavorID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEntity(dAtA[iNdEx:]) @@ -4807,6 +6344,37 @@ func (m *Hypervisor) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LevelInstances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LevelInstances = append(m.LevelInstances, &LevelInstance{}) + if err := m.LevelInstances[len(m.LevelInstances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEntity(dAtA[iNdEx:]) @@ -4967,6 +6535,68 @@ func (m *Notification) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.User == nil { + m.User = &User{} + } + if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 201: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEntity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEntity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEntity(dAtA[iNdEx:]) diff --git a/entity/entity.proto b/entity/entity.proto index 6932d9494..ed362b72c 100644 --- a/entity/entity.proto +++ b/entity/entity.proto @@ -40,6 +40,11 @@ message TeamMember { TournamentTeam tournament_team = 202 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentTeamID\""]; string tournament_team_id = 203 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; + + repeated Coupon coupons = 204; + repeated Achievement achievements = 205; + repeated WhoswhoAttempt sent_whoswho_attempts = 206; + repeated WhoswhoAttempt received_whoswho_attempts = 207; } // User definces a User Account / Profile @@ -60,8 +65,9 @@ message User { // associations // - repeated UserSession sessions = 200; // HasMany - repeated TeamMember team_memberships = 201; // Many2Many + repeated UserSession sessions = 200; + repeated TeamMember team_memberships = 201; + repeated Notification notifications = 202; } message UserSession { @@ -77,7 +83,8 @@ message UserSession { // associations // - string user_id = 200 [(gogoproto.customname) = "UserID"]; // HasOne + User user = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:UserID\""]; + string user_id = 201 [(gogoproto.customname) = "UserID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } message Team { @@ -94,7 +101,8 @@ message Team { // associations // - repeated TeamMember members = 200; // HasMany + repeated TournamentTeam tournament_teams = 200; + repeated WhoswhoAttempt received_whoswho_attempts = 201; } message Level { @@ -128,6 +136,8 @@ message Tournament { // // associations // + + repeated TournamentTeam tournament_teams = 200; } message TournamentTeam { @@ -143,6 +153,11 @@ message TournamentTeam { Tournament tournament = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentID\""]; string tournament_id = 201 [(gogoproto.customname) = "TournamentID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; + + Team team = 202 [(gogoproto.moretags) = "gorm:\"foreignkey:TeamID\""]; + string team_id = 203 [(gogoproto.customname) = "TeamID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; + + repeated ShopItem shop_items = 204; } message WhoswhoAttempt { @@ -151,10 +166,19 @@ message WhoswhoAttempt { // // fields // + bool success = 100; // // associations // + TeamMember author_team_member = 200 [(gogoproto.moretags) = "sql:\"not null\" gorm:\"foreignkey:AuthorTeamMemberID\""]; + string author_team_member_id = 201 [(gogoproto.customname) = "AuthorTeamMemberID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; + + TeamMember target_team_member = 202 [(gogoproto.moretags) = "sql:\"not null\" gorm:\"foreignkey:TargetTeamMemberID\""]; + string target_team_member_id = 203 [(gogoproto.customname) = "TargetTeamMemberID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; + + TournamentTeam target_tournament_team = 204 [(gogoproto.moretags) = "sql:\"not null\" gorm:\"foreignkey:TargetTournamentTeamID\""]; + string target_tournament_team_id = 205 [(gogoproto.customname) = "TargetTournamentTeamID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } message LevelSubscription { @@ -170,6 +194,9 @@ message LevelSubscription { TournamentTeam tournament_team = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:TournamentTeamID\""]; string tournament_team_id = 201 [(gogoproto.customname) = "TournamentTeamID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; + + LevelFlavor level_flavor = 202 [(gogoproto.moretags) = "gorm:\"foreignkey:LevelFlavorID\""]; + string level_flavor_id = 203 [(gogoproto.customname) = "LevelFlavorID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } message ShopItem { @@ -197,6 +224,12 @@ message LevelFlavor { // // associations // + + Level level = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:LevelID\""]; + string level_id = 201 [(gogoproto.customname) = "LevelID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; + + repeated LevelInstance level_instances = 202; + repeated LevelSubscription level_subscriptions = 203; } message LevelInstance { @@ -209,8 +242,12 @@ message LevelInstance { // // associations // + Hypervisor hypervisor = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:HypervisorID\""]; string hypervisor_id = 201 [(gogoproto.customname) = "HypervisorID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; + + LevelFlavor level_flavor = 202 [(gogoproto.moretags) = "gorm:\"foreignkey:LevelFlavorID\""]; + string level_flavor_id = 203 [(gogoproto.customname) = "LevelFlavorID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } message Hypervisor { @@ -223,6 +260,8 @@ message Hypervisor { // // associations // + + repeated LevelInstance level_instances = 200; } message Event { @@ -247,6 +286,9 @@ message Notification { // // associations // + + User user = 200 [(gogoproto.moretags) = "gorm:\"foreignkey:UserID\""]; + string user_id = 201 [(gogoproto.customname) = "UserID", (gogoproto.moretags) = "sql:\"not null\" gorm:\"index\""]; } message Coupon { diff --git a/sql/sql.go b/sql/sql.go index 2520be67a..c22b8d524 100644 --- a/sql/sql.go +++ b/sql/sql.go @@ -34,8 +34,29 @@ func FromOpts(opts *Options) (*gorm.DB, error) { if err := db.AutoMigrate(entity.All()...).Error; err != nil { return nil, err } - if err := db.Model(entity.Achievement{}).AddForeignKey("team_member_id", "team_member(id)", "RESTRICT", "RESTRICT").Error; err != nil { - return nil, err + for _, fk := range [][3]string{ + {"Achievement", "team_member_id", "team_member(id)"}, + {"Coupon", "team_member_id", "team_member(id)"}, + {"LevelFlavor", "level_id", "level(id)"}, + {"LevelInstance", "hypervisor_id", "hypervisor(id)"}, + {"LevelInstance", "level_flavor_id", "level_flavor(id)"}, + {"LevelSubscription", "level_flavor_id", "level_flavor(id)"}, + {"LevelSubscription", "tournament_team_id", "tournament_team(id)"}, + {"Notification", "user_id", "user(id)"}, + {"ShopItem", "tournament_team_id", "tournament_team(id)"}, + {"TeamMember", "tournament_team_id", "tournament_team(id)"}, + {"TeamMember", "user_id", "user(id)"}, + {"TournamentTeam", "team_id", "team(id)"}, + {"TournamentTeam", "tournament_id", "tournament(id)"}, + {"UserSession", "user_id", "user(id)"}, + {"WhoswhoAttempt", "author_team_member_id", "team_member(id)"}, + {"WhoswhoAttempt", "target_team_member_id", "team_member(id)"}, + {"WhoswhoAttempt", "target_tournament_team_id", "tournament_team(id)"}, + } { + e := entity.ByName(fk[0]) + if err := db.Model(e).AddForeignKey(fk[1], fk[2], "RESTRICT", "RESTRICT").Error; err != nil { + return nil, err + } } // FIXME: use gormigrate diff --git a/test/docker-compose.yml b/test/docker-compose.yml index d9788de9c..3edbeb57e 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -3,7 +3,7 @@ version: '2.3' services: client: image: pathwar/pathwar:test - build: . + #build: . environment: TARGET: http://server:8000 command: