From 90cc460e1c04ab7a6ad57e65bb62edda4e5d5022 Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Mon, 26 Apr 2021 13:22:15 +0300 Subject: [PATCH 01/13] disabled challenges added to rpc message Signed-off-by: Ahmet Turkmen --- proto/store.pb.go | 167 +++++++++++++++++++++++++--------------------- proto/store.proto | 2 + 2 files changed, 94 insertions(+), 75 deletions(-) diff --git a/proto/store.pb.go b/proto/store.pb.go index 87cc9d9..62caa3c 100644 --- a/proto/store.pb.go +++ b/proto/store.pb.go @@ -629,6 +629,7 @@ type AddEventRequest struct { CreatedBy string `protobuf:"bytes,11,opt,name=createdBy,proto3" json:"createdBy,omitempty"` OnlyVPN bool `protobuf:"varint,12,opt,name=onlyVPN,proto3" json:"onlyVPN,omitempty"` SecretKey string `protobuf:"bytes,13,opt,name=secretKey,proto3" json:"secretKey,omitempty"` + DisabledExercises string `protobuf:"bytes,14,opt,name=disabledExercises,proto3" json:"disabledExercises,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -750,6 +751,13 @@ func (m *AddEventRequest) GetSecretKey() string { return "" } +func (m *AddEventRequest) GetDisabledExercises() string { + if m != nil { + return m.DisabledExercises + } + return "" +} + type AddTeamRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` EventTag string `protobuf:"bytes,2,opt,name=event_tag,json=eventTag,proto3" json:"event_tag,omitempty"` @@ -929,6 +937,7 @@ type GetEventResponse_Events struct { CreatedBy string `protobuf:"bytes,11,opt,name=createdBy,proto3" json:"createdBy,omitempty"` OnlyVPN bool `protobuf:"varint,12,opt,name=onlyVPN,proto3" json:"onlyVPN,omitempty"` SecretKey string `protobuf:"bytes,13,opt,name=secretKey,proto3" json:"secretKey,omitempty"` + DisabledExercises string `protobuf:"bytes,14,opt,name=disabledExercises,proto3" json:"disabledExercises,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1050,6 +1059,13 @@ func (m *GetEventResponse_Events) GetSecretKey() string { return "" } +func (m *GetEventResponse_Events) GetDisabledExercises() string { + if m != nil { + return m.DisabledExercises + } + return "" +} + type GetEventTeamsRequest struct { EventTag string `protobuf:"bytes,1,opt,name=eventTag,proto3" json:"eventTag,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1460,81 +1476,82 @@ func init() { func init() { proto.RegisterFile("store.proto", fileDescriptor_98bbca36ef968dfc) } var fileDescriptor_98bbca36ef968dfc = []byte{ - // 1182 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xdd, 0x6e, 0x1b, 0x55, - 0x10, 0xf6, 0x4f, 0x9c, 0x78, 0x27, 0x3f, 0x35, 0x07, 0xa7, 0xdd, 0x3a, 0x51, 0x15, 0x1d, 0x21, - 0x11, 0x02, 0xf8, 0x22, 0x95, 0x50, 0xa0, 0x02, 0xe4, 0x36, 0x49, 0x15, 0x25, 0x54, 0x61, 0xed, - 0x72, 0x87, 0xd0, 0xa9, 0x77, 0x9a, 0xac, 0x58, 0xef, 0x6e, 0xf7, 0x9c, 0xa4, 0xf1, 0x1d, 0x12, - 0x57, 0xbc, 0x07, 0xcf, 0xc0, 0x2b, 0x70, 0xc9, 0xb3, 0xf0, 0x06, 0x68, 0xcf, 0xdf, 0xfe, 0xd8, - 0x4e, 0x53, 0x89, 0x9b, 0xde, 0xed, 0xcc, 0x99, 0xbf, 0x9d, 0xf9, 0x66, 0xce, 0x1c, 0x58, 0xe5, - 0x22, 0x4e, 0xb1, 0x9f, 0xa4, 0xb1, 0x88, 0x49, 0x4b, 0x12, 0x74, 0x03, 0xd6, 0x8e, 0x26, 0x89, - 0x98, 0x7a, 0xf8, 0xe6, 0x0a, 0xb9, 0xa0, 0x31, 0x6c, 0xbe, 0x4c, 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 0x64, 0x40, 0x39, 0x23, 0xfb, 0xe7, 0x31, 0x4b, 0xd8, 0x38, 0x10, - 0x53, 0x77, 0x59, 0x1e, 0x5a, 0x3a, 0xd3, 0xe4, 0x82, 0xa5, 0xb2, 0x3f, 0xdc, 0x15, 0x65, 0xd7, - 0x32, 0x48, 0x1f, 0x08, 0xde, 0x24, 0x38, 0x16, 0xe8, 0x1f, 0x07, 0x51, 0xc0, 0x2f, 0xa5, 0x58, - 0x5b, 0x8a, 0xcd, 0x39, 0x21, 0x8f, 0x00, 0x5e, 0x4b, 0x0a, 0xfd, 0x81, 0x70, 0x1d, 0x29, 0x57, - 0xe0, 0x14, 0xb2, 0x06, 0xa5, 0x12, 0x6e, 0x83, 0x33, 0x4e, 0x91, 0x09, 0xf4, 0x9f, 0x4e, 0xdd, - 0x55, 0x15, 0x85, 0x65, 0x64, 0xd8, 0x8d, 0xa3, 0x70, 0xfa, 0xd3, 0xf9, 0x0b, 0x77, 0x4d, 0x61, - 0x57, 0x93, 0x32, 0x7a, 0x1c, 0xa7, 0x28, 0x4e, 0x71, 0xea, 0xae, 0xeb, 0xe8, 0x0d, 0x83, 0xfe, - 0x5e, 0x87, 0x8d, 0x81, 0xef, 0x67, 0x43, 0xcf, 0x94, 0x62, 0x03, 0x1a, 0x81, 0xaf, 0x0b, 0xd1, - 0x08, 0x7c, 0xb2, 0x05, 0x8e, 0x2c, 0xff, 0x2f, 0x79, 0x31, 0x72, 0x3c, 0x74, 0xa1, 0x85, 0x13, - 0x16, 0x84, 0xba, 0x1a, 0x8a, 0xb0, 0xd5, 0x5c, 0x2a, 0x54, 0xb3, 0x07, 0xed, 0x84, 0x71, 0xfe, - 0x36, 0x4e, 0x7d, 0x99, 0x7e, 0xc7, 0xb3, 0x34, 0x7d, 0x01, 0x1b, 0x27, 0x11, 0xc7, 0x54, 0xd8, - 0x51, 0xe5, 0xc2, 0xca, 0x0f, 0xc8, 0x39, 0xbb, 0x30, 0x90, 0x30, 0x24, 0xa1, 0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d4, 0x26, 0xdb, 0x73, 0xe7, 0x1f, 0xf0, 0x44, - 0x59, 0x29, 0xad, 0xe8, 0xe4, 0x63, 0xe3, 0xb1, 0xf0, 0x8a, 0x29, 0xfe, 0xd6, 0xec, 0x36, 0x4f, - 0x6b, 0xe4, 0x00, 0x1c, 0xbb, 0x8e, 0x5a, 0x0b, 0xc5, 0xd5, 0xb6, 0xd7, 0x9d, 0x65, 0x4a, 0xff, - 0x4f, 0x00, 0xf2, 0x17, 0x08, 0xe9, 0x56, 0x22, 0x95, 0x2f, 0x18, 0x0b, 0x91, 0xf2, 0x53, 0x45, - 0x65, 0x73, 0x38, 0x3f, 0x9b, 0xc3, 0xf7, 0xcd, 0xe6, 0x31, 0x74, 0x54, 0xff, 0x3c, 0x0b, 0x63, - 0xae, 0xa6, 0x0d, 0x79, 0xa8, 0xc5, 0x67, 0x27, 0x90, 0x0d, 0xa9, 0xdc, 0x73, 0xb4, 0x46, 0x7e, - 0x86, 0x87, 0x0b, 0x47, 0x09, 0xf9, 0xb4, 0xa4, 0xb5, 0x78, 0xd8, 0x2c, 0x36, 0x3f, 0x84, 0xee, - 0xbc, 0xc9, 0x41, 0xe8, 0x8c, 0xe5, 0x99, 0xb1, 0xb2, 0xd8, 0xe8, 0xa9, 0x19, 0xb2, 0xe6, 0x8d, - 0xaa, 0x86, 0xfc, 0x8c, 0xc9, 0xc2, 0xf3, 0x75, 0xa1, 0xb1, 0x57, 0xcb, 0xf2, 0x39, 0xfc, 0xf8, - 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x66, 0x0c, 0xa6, 0x1d, 0x0f, 0x00, 0x00, + // 1197 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x57, 0xcd, 0x6f, 0x1b, 0x55, + 0x10, 0xf7, 0x47, 0x9c, 0xd8, 0x93, 0xc4, 0x75, 0x1f, 0x4e, 0xbb, 0x75,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x88, 0xb8, + 0x9a, 0x36, 0xe4, 0x81, 0x16, 0x9f, 0x9f, 0x40, 0x36, 0xa4, 0x62, 0xcf, 0xd1, 0x0a, 0xf9, 0x11, + 0x1e, 0x2c, 0x1d, 0x25, 0xe4, 0x93, 0x82, 0xd6, 0xf2, 0x61, 0xb3, 0xdc, 0xfc, 0x08, 0xba, 0x8b, + 0x26, 0x07, 0xa1, 0x73, 0x96, 0xe7, 0xc6, 0xca, 0x72, 0xa3, 0x27, 0x66, 0xc8, 0x9a, 0xf7, 0xaf, + 0x1a, 0xf2, 0x73, 0x26, 0x73, 0x4f, 0xe3, 0xa5, 0xc6, 0x5e, 0xaf, 0xca, 0xa7, 0xf6, 0x93, 0x7f, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x23, 0xd1, 0x1d, 0xc5, 0x79, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/store.proto b/proto/store.proto index 35c41c9..4c105c4 100644 --- a/proto/store.proto +++ b/proto/store.proto @@ -104,6 +104,7 @@ message AddEventRequest{ string createdBy = 11; bool onlyVPN = 12; string secretKey = 13; + string disabledExercises = 14; } message AddTeamRequest{ @@ -134,6 +135,7 @@ message GetEventResponse{ string createdBy =11; bool onlyVPN = 12; string secretKey = 13; + string disabledExercises = 14; } repeated Events events = 1; string errorMessage = 2; From cf60fb0b3dffad4176942dfd51256994715edc3c Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Mon, 26 Apr 2021 13:22:36 +0300 Subject: [PATCH 02/13] disabled challenges coloumn added to table Signed-off-by: Ahmet Turkmen --- database/query.go | 7 ++++--- database/store.go | 4 ++-- model/model.go | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/database/query.go b/database/query.go index eb9e1ee..b5f9139 100644 --- a/database/query.go +++ b/database/query.go @@ -15,7 +15,8 @@ var ( "finished_at timestamp," + "createdBy text," + "onlyVPN boolean," + - "secretKey text);" + "secretKey text," + + "disabledExercises text);" CreateTeamsTable = "CREATE TABLE IF NOT EXISTS Team(" + "id serial primary key, " + @@ -31,8 +32,8 @@ var ( AddTeamQuery = "INSERT INTO team (tag, event_id, email, name, password, created_at, last_access, solved_challenges)" + "VALUES ($1, $2, $3, $4, $5, $6, $7, $8)" - AddEventQuery = "INSERT INTO event (tag, name, available, capacity, frontends, status, exercises, started_at, finish_expected, finished_at, createdby, onlyvpn,secretKey)" + - "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10,$11,$12,$13)" + AddEventQuery = "INSERT INTO event (tag, name, available, capacity, frontends, status, exercises, started_at, finish_expected, finished_at, createdby, onlyvpn,secretKey, disabledExercises)" + + "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10,$11,$12,$13,$14)" UpdateCloseEvent = "UPDATE event SET tag = $2, finished_at = $3 WHERE tag = $1" UpdateEventStatus = "UPDATE event SET status = $2 WHERE tag = $1 " diff --git a/database/store.go b/database/store.go index 10b26d2..67432bb 100644 --- a/database/store.go +++ b/database/store.go @@ -94,7 +94,7 @@ func (s *store) AddEvent(in *pb.AddEventRequest) (string, error) { finishTime, _ := time.Parse(TimeFormat, in.FinishedAt) expectedFinishTime, _ := time.Parse(TimeFormat, in.ExpectedFinishTime) - _, err := s.db.Exec(AddEventQuery, in.Tag, in.Name, in.Available, in.Capacity, in.Frontends, in.Status, in.Exercises, startTime, expectedFinishTime, finishTime, in.CreatedBy, in.OnlyVPN, in.SecretKey) + _, err := s.db.Exec(AddEventQuery, in.Tag, in.Name, in.Available, in.Capacity, in.Frontends, in.Status, in.Exercises, startTime, expectedFinishTime, finishTime, in.CreatedBy, in.OnlyVPN, in.SecretKey, in.DisabledExercises) if err != nil { return "", err @@ -347,7 +347,7 @@ func parseEvents(rows *sql.Rows) ([]model.Event, error) { for rows.Next() { event := new(model.Event) err := rows.Scan(&event.Id, &event.Tag, &event.Name, &event.Available, &event.Capacity, &event.Status, &event.Frontends, - &event.Exercises, &event.StartedAt, &event.ExpectedFinishTime, &event.FinishedAt, &event.CreatedBy, &event.OnlyVPN, &event.SecretKey) + &event.Exercises, &event.StartedAt, &event.ExpectedFinishTime, &event.FinishedAt, &event.CreatedBy, &event.OnlyVPN, &event.SecretKey, &event.DisabledExercises) if err != nil && !strings.Contains(err.Error(), handleNullConversionError) { return nil, err } diff --git a/model/model.go b/model/model.go index 2099182..07f9579 100644 --- a/model/model.go +++ b/model/model.go @@ -15,6 +15,7 @@ type Event struct { CreatedBy string OnlyVPN bool SecretKey string + DisabledExercises string } type Team struct { From 985985a805fcb2b4ca30687fcc26c23ebbe51186 Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Mon, 26 Apr 2021 13:26:43 +0300 Subject: [PATCH 03/13] set_env updated due to deprecated usage Signed-off-by: Ahmet Turkmen --- .github/workflows/checkbrname.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checkbrname.yml b/.github/workflows/checkbrname.yml index 16f06b4..c706fb3 100644 --- a/.github/workflows/checkbrname.yml +++ b/.github/workflows/checkbrname.yml @@ -19,7 +19,7 @@ jobs: python-version: 3.7 - name: Extract branch name shell: bash - run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/})" + run: echo "$(echo ${GITHUB_REF#refs/heads/})" >> $BRANCH_NAME - name: Check branch name run: | From 476f3ef450355635e23122c6c108512d9aace59b Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Mon, 26 Apr 2021 13:28:28 +0300 Subject: [PATCH 04/13] remove extra echo command Signed-off-by: Ahmet Turkmen --- .github/workflows/checkbrname.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checkbrname.yml b/.github/workflows/checkbrname.yml index c706fb3..232f2bc 100644 --- a/.github/workflows/checkbrname.yml +++ b/.github/workflows/checkbrname.yml @@ -19,7 +19,7 @@ jobs: python-version: 3.7 - name: Extract branch name shell: bash - run: echo "$(echo ${GITHUB_REF#refs/heads/})" >> $BRANCH_NAME + run: echo "${GITHUB_REF#refs/heads/}" >> $BRANCH_NAME - name: Check branch name run: | From ec98b2274463f94d5296e92f01413736c67c5c52 Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Mon, 26 Apr 2021 13:32:14 +0300 Subject: [PATCH 05/13] branch name check workflow updated due to updates to set_env Signed-off-by: Ahmet Turkmen --- .github/workflows/checkbrname.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checkbrname.yml b/.github/workflows/checkbrname.yml index 232f2bc..012db95 100644 --- a/.github/workflows/checkbrname.yml +++ b/.github/workflows/checkbrname.yml @@ -19,10 +19,10 @@ jobs: python-version: 3.7 - name: Extract branch name shell: bash - run: echo "${GITHUB_REF#refs/heads/}" >> $BRANCH_NAME + run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - name: Check branch name run: | - echo "Checking ${BRANCH_NAME}..." + echo "Checking ${{ env.BRANCH_NAME }}..." curl --silent -o check-branch-name.py https://raw.githubusercontent.com/aau-network-security/richkit/develop/.githooks/check-branch-name.py - python3 check-branch-name.py "$BRANCH_NAME" + python3 check-branch-name.py "${{ env.BRANCH_NAME }}" From 1aecb759ad197393d06237206fea1e502c1d110a Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Mon, 26 Apr 2021 13:46:21 +0300 Subject: [PATCH 06/13] add other fields on create event request Signed-off-by: Ahmet Turkmen --- database/store_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/database/store_test.go b/database/store_test.go index 5c0aac9..1fb8202 100644 --- a/database/store_test.go +++ b/database/store_test.go @@ -214,6 +214,8 @@ func TestAddEvent(t *testing.T) { ExpectedFinishTime: "2020-05-21 14:35:01", FinishedAt: "0001-01-01 00:00:00", // it means that event is not finished yet OnlyVPN: false, + SecretKey: "", + DisabledExercises: "", } resp, err := c.AddEvent(context.Background(), &req) @@ -346,6 +348,9 @@ func TestMultipleEventWithSameTag(t *testing.T) { Capacity: 2, StartTime: "2020-06-20 14:35:01", ExpectedFinishTime: "2020-06-21 14:35:01", + OnlyVPN: false, + SecretKey: "", + DisabledExercises: "", } _, err = c.AddEvent(context.Background(), &req) From 01a30eb8ba11d66c0c8991459f926bf8e2b1692c Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Mon, 26 Apr 2021 13:47:05 +0300 Subject: [PATCH 07/13] update addEvent request with new field Signed-off-by: Ahmet Turkmen --- database/timeline_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/timeline_test.go b/database/timeline_test.go index 0653c10..7ecf5c8 100644 --- a/database/timeline_test.go +++ b/database/timeline_test.go @@ -57,7 +57,7 @@ func insertTeamEvent(eid int, db *sql.DB) error { } func insertFakeEvent(event fakeEvent, db *sql.DB) error { - _, err := db.Exec(AddEventQuery, event.tag, "", event.available, event.capacity, "kali", 1, "ftp,sql", event.sT.UTC(), event.fT.UTC(), time.Date(0001, 01, 01, 00, 00, 00, 0000, time.UTC).Format(time.RFC3339), "tester", false, "") + _, err := db.Exec(AddEventQuery, event.tag, "", event.available, event.capacity, "kali", 1, "ftp,sql", event.sT.UTC(), event.fT.UTC(), time.Date(0001, 01, 01, 00, 00, 00, 0000, time.UTC).Format(time.RFC3339), "tester", false, "", "") if err != nil { return err } From 86a51377b3d56182b95694e64f0f6c104632e9e9 Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Mon, 26 Apr 2021 13:51:12 +0300 Subject: [PATCH 08/13] do not clean records for having multiple events Signed-off-by: Ahmet Turkmen --- database/store_test.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/database/store_test.go b/database/store_test.go index 1fb8202..f45d98b 100644 --- a/database/store_test.go +++ b/database/store_test.go @@ -323,13 +323,7 @@ func TestCloseEvent(t *testing.T) { } func TestMultipleEventWithSameTag(t *testing.T) { - dbConn, err := createDBConnection() - if err != nil { - t.Fatalf("error on database connection create %v", err) - } - if err := cleanRecords(dbConn); err != nil { - t.Fatalf("error on cleaning records %v", err) - } + t.Log("Testing Multiple Events with same Tags") conn, err := createTestClientConn() if err != nil { From e6e1be876ce1c3b2c724391c2be7765f673550fc Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Mon, 26 Apr 2021 13:56:40 +0300 Subject: [PATCH 09/13] add disabledExercises to r.scan on tests Signed-off-by: Ahmet Turkmen --- database/timeline.go | 2 +- database/timeline_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/database/timeline.go b/database/timeline.go index 326e86d..ced52da 100644 --- a/database/timeline.go +++ b/database/timeline.go @@ -72,7 +72,7 @@ func getEvents(db *sql.DB) []model.Event { for r.Next() { event := new(model.Event) err := r.Scan(&event.Id, &event.Tag, &event.Name, &event.Available, &event.Capacity, &event.Status, &event.Frontends, - &event.Exercises, &event.StartedAt, &event.ExpectedFinishTime, &event.FinishedAt, &event.CreatedBy, &event.OnlyVPN, &event.SecretKey) + &event.Exercises, &event.StartedAt, &event.ExpectedFinishTime, &event.FinishedAt, &event.CreatedBy, &event.OnlyVPN, &event.SecretKey, &event.DisabledExercises) if err != nil && !strings.Contains(err.Error(), "Null conversion error ") { log.Fatalf("Error on scanning query %v", err) } diff --git a/database/timeline_test.go b/database/timeline_test.go index 7ecf5c8..555628f 100644 --- a/database/timeline_test.go +++ b/database/timeline_test.go @@ -214,6 +214,7 @@ func TestGetEvents(t *testing.T) { CreatedBy: "tester", OnlyVPN: false, SecretKey: "", + DisabledExercises: "", }} if got := getEvents(db); !reflect.DeepEqual(got, events) { From a3d033b3e6b042b41187c7a23e256bd48beedbdf Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Wed, 28 Apr 2021 13:38:14 +0300 Subject: [PATCH 10/13] add disabled chals to get event response Signed-off-by: Ahmet Turkmen --- util/util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/util/util.go b/util/util.go index 91ef5e8..3f83926 100644 --- a/util/util.go +++ b/util/util.go @@ -357,6 +357,7 @@ func getEventsResponse(result []model.Event) []*pb.GetEventResponse_Events { CreatedBy: e.CreatedBy, OnlyVPN: e.OnlyVPN, SecretKey: e.SecretKey, + DisabledExercises: e.DisabledExercises, }) } log.Printf("Get Events") From 83562d59068bdf5301723d4e8841a4abf4d7a1d4 Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Wed, 12 May 2021 16:55:33 +0300 Subject: [PATCH 11/13] delete team rpc is added Signed-off-by: Ahmet Turkmen --- proto/store.pb.go | 331 ++++++++++++++++++++++++++++++++-------------- proto/store.proto | 13 ++ 2 files changed, 243 insertions(+), 101 deletions(-) diff --git a/proto/store.pb.go b/proto/store.pb.go index 62caa3c..e920b1a 100644 --- a/proto/store.pb.go +++ b/proto/store.pb.go @@ -55,6 +55,92 @@ func (m *EmptyRequest) XXX_DiscardUnknown() { var xxx_messageInfo_EmptyRequest proto.InternalMessageInfo +type DelTeamRequest struct { + EvTag string `protobuf:"bytes,1,opt,name=evTag,proto3" json:"evTag,omitempty"` + TeamId string `protobuf:"bytes,2,opt,name=teamId,proto3" json:"teamId,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DelTeamRequest) Reset() { *m = DelTeamRequest{} } +func (m *DelTeamRequest) String() string { return proto.CompactTextString(m) } +func (*DelTeamRequest) ProtoMessage() {} +func (*DelTeamRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_98bbca36ef968dfc, []int{1} +} + +func (m *DelTeamRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DelTeamRequest.Unmarshal(m, b) +} +func (m *DelTeamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DelTeamRequest.Marshal(b, m, deterministic) +} +func (m *DelTeamRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelTeamRequest.Merge(m, src) +} +func (m *DelTeamRequest) XXX_Size() int { + return xxx_messageInfo_DelTeamRequest.Size(m) +} +func (m *DelTeamRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DelTeamRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DelTeamRequest proto.InternalMessageInfo + +func (m *DelTeamRequest) GetEvTag() string { + if m != nil { + return m.EvTag + } + return "" +} + +func (m *DelTeamRequest) GetTeamId() string { + if m != nil { + return m.TeamId + } + return "" +} + +type DelTeamResp struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DelTeamResp) Reset() { *m = DelTeamResp{} } +func (m *DelTeamResp) String() string { return proto.CompactTextString(m) } +func (*DelTeamResp) ProtoMessage() {} +func (*DelTeamResp) Descriptor() ([]byte, []int) { + return fileDescriptor_98bbca36ef968dfc, []int{2} +} + +func (m *DelTeamResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DelTeamResp.Unmarshal(m, b) +} +func (m *DelTeamResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DelTeamResp.Marshal(b, m, deterministic) +} +func (m *DelTeamResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelTeamResp.Merge(m, src) +} +func (m *DelTeamResp) XXX_Size() int { + return xxx_messageInfo_DelTeamResp.Size(m) +} +func (m *DelTeamResp) XXX_DiscardUnknown() { + xxx_messageInfo_DelTeamResp.DiscardUnknown(m) +} + +var xxx_messageInfo_DelTeamResp proto.InternalMessageInfo + +func (m *DelTeamResp) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + type UpdateTeamPassRequest struct { EncryptedPass string `protobuf:"bytes,1,opt,name=encryptedPass,proto3" json:"encryptedPass,omitempty"` TeamID string `protobuf:"bytes,2,opt,name=teamID,proto3" json:"teamID,omitempty"` @@ -68,7 +154,7 @@ func (m *UpdateTeamPassRequest) Reset() { *m = UpdateTeamPassRequest{} } func (m *UpdateTeamPassRequest) String() string { return proto.CompactTextString(m) } func (*UpdateTeamPassRequest) ProtoMessage() {} func (*UpdateTeamPassRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{1} + return fileDescriptor_98bbca36ef968dfc, []int{3} } func (m *UpdateTeamPassRequest) XXX_Unmarshal(b []byte) error { @@ -121,7 +207,7 @@ func (m *GetEventIDReq) Reset() { *m = GetEventIDReq{} } func (m *GetEventIDReq) String() string { return proto.CompactTextString(m) } func (*GetEventIDReq) ProtoMessage() {} func (*GetEventIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{2} + return fileDescriptor_98bbca36ef968dfc, []int{4} } func (m *GetEventIDReq) XXX_Unmarshal(b []byte) error { @@ -160,7 +246,7 @@ func (m *GetEventIDResp) Reset() { *m = GetEventIDResp{} } func (m *GetEventIDResp) String() string { return proto.CompactTextString(m) } func (*GetEventIDResp) ProtoMessage() {} func (*GetEventIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{3} + return fileDescriptor_98bbca36ef968dfc, []int{5} } func (m *GetEventIDResp) XXX_Unmarshal(b []byte) error { @@ -199,7 +285,7 @@ func (m *GetTimeSeriesResponse) Reset() { *m = GetTimeSeriesResponse{} } func (m *GetTimeSeriesResponse) String() string { return proto.CompactTextString(m) } func (*GetTimeSeriesResponse) ProtoMessage() {} func (*GetTimeSeriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{4} + return fileDescriptor_98bbca36ef968dfc, []int{6} } func (m *GetTimeSeriesResponse) XXX_Unmarshal(b []byte) error { @@ -238,7 +324,7 @@ func (m *GetEventStatusRequest) Reset() { *m = GetEventStatusRequest{} } func (m *GetEventStatusRequest) String() string { return proto.CompactTextString(m) } func (*GetEventStatusRequest) ProtoMessage() {} func (*GetEventStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{5} + return fileDescriptor_98bbca36ef968dfc, []int{7} } func (m *GetEventStatusRequest) XXX_Unmarshal(b []byte) error { @@ -278,7 +364,7 @@ func (m *GetEventByTagReq) Reset() { *m = GetEventByTagReq{} } func (m *GetEventByTagReq) String() string { return proto.CompactTextString(m) } func (*GetEventByTagReq) ProtoMessage() {} func (*GetEventByTagReq) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{6} + return fileDescriptor_98bbca36ef968dfc, []int{8} } func (m *GetEventByTagReq) XXX_Unmarshal(b []byte) error { @@ -324,7 +410,7 @@ func (m *GetEventByTagResp) Reset() { *m = GetEventByTagResp{} } func (m *GetEventByTagResp) String() string { return proto.CompactTextString(m) } func (*GetEventByTagResp) ProtoMessage() {} func (*GetEventByTagResp) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{7} + return fileDescriptor_98bbca36ef968dfc, []int{9} } func (m *GetEventByTagResp) XXX_Unmarshal(b []byte) error { @@ -364,7 +450,7 @@ func (m *DropEventReq) Reset() { *m = DropEventReq{} } func (m *DropEventReq) String() string { return proto.CompactTextString(m) } func (*DropEventReq) ProtoMessage() {} func (*DropEventReq) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{8} + return fileDescriptor_98bbca36ef968dfc, []int{10} } func (m *DropEventReq) XXX_Unmarshal(b []byte) error { @@ -410,7 +496,7 @@ func (m *DropEventResp) Reset() { *m = DropEventResp{} } func (m *DropEventResp) String() string { return proto.CompactTextString(m) } func (*DropEventResp) ProtoMessage() {} func (*DropEventResp) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{9} + return fileDescriptor_98bbca36ef968dfc, []int{11} } func (m *DropEventResp) XXX_Unmarshal(b []byte) error { @@ -454,7 +540,7 @@ func (m *GetEventRequest) Reset() { *m = GetEventRequest{} } func (m *GetEventRequest) String() string { return proto.CompactTextString(m) } func (*GetEventRequest) ProtoMessage() {} func (*GetEventRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{10} + return fileDescriptor_98bbca36ef968dfc, []int{12} } func (m *GetEventRequest) XXX_Unmarshal(b []byte) error { @@ -494,7 +580,7 @@ func (m *GetEventByUserReq) Reset() { *m = GetEventByUserReq{} } func (m *GetEventByUserReq) String() string { return proto.CompactTextString(m) } func (*GetEventByUserReq) ProtoMessage() {} func (*GetEventByUserReq) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{11} + return fileDescriptor_98bbca36ef968dfc, []int{13} } func (m *GetEventByUserReq) XXX_Unmarshal(b []byte) error { @@ -541,7 +627,7 @@ func (m *SetEventStatusRequest) Reset() { *m = SetEventStatusRequest{} } func (m *SetEventStatusRequest) String() string { return proto.CompactTextString(m) } func (*SetEventStatusRequest) ProtoMessage() {} func (*SetEventStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{12} + return fileDescriptor_98bbca36ef968dfc, []int{14} } func (m *SetEventStatusRequest) XXX_Unmarshal(b []byte) error { @@ -587,7 +673,7 @@ func (m *EventStatusStore) Reset() { *m = EventStatusStore{} } func (m *EventStatusStore) String() string { return proto.CompactTextString(m) } func (*EventStatusStore) ProtoMessage() {} func (*EventStatusStore) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{13} + return fileDescriptor_98bbca36ef968dfc, []int{15} } func (m *EventStatusStore) XXX_Unmarshal(b []byte) error { @@ -639,7 +725,7 @@ func (m *AddEventRequest) Reset() { *m = AddEventRequest{} } func (m *AddEventRequest) String() string { return proto.CompactTextString(m) } func (*AddEventRequest) ProtoMessage() {} func (*AddEventRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{14} + return fileDescriptor_98bbca36ef968dfc, []int{16} } func (m *AddEventRequest) XXX_Unmarshal(b []byte) error { @@ -773,7 +859,7 @@ func (m *AddTeamRequest) Reset() { *m = AddTeamRequest{} } func (m *AddTeamRequest) String() string { return proto.CompactTextString(m) } func (*AddTeamRequest) ProtoMessage() {} func (*AddTeamRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{15} + return fileDescriptor_98bbca36ef968dfc, []int{17} } func (m *AddTeamRequest) XXX_Unmarshal(b []byte) error { @@ -841,7 +927,7 @@ func (m *InsertResponse) Reset() { *m = InsertResponse{} } func (m *InsertResponse) String() string { return proto.CompactTextString(m) } func (*InsertResponse) ProtoMessage() {} func (*InsertResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{16} + return fileDescriptor_98bbca36ef968dfc, []int{18} } func (m *InsertResponse) XXX_Unmarshal(b []byte) error { @@ -888,7 +974,7 @@ func (m *GetEventResponse) Reset() { *m = GetEventResponse{} } func (m *GetEventResponse) String() string { return proto.CompactTextString(m) } func (*GetEventResponse) ProtoMessage() {} func (*GetEventResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{17} + return fileDescriptor_98bbca36ef968dfc, []int{19} } func (m *GetEventResponse) XXX_Unmarshal(b []byte) error { @@ -947,7 +1033,7 @@ func (m *GetEventResponse_Events) Reset() { *m = GetEventResponse_Events func (m *GetEventResponse_Events) String() string { return proto.CompactTextString(m) } func (*GetEventResponse_Events) ProtoMessage() {} func (*GetEventResponse_Events) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{17, 0} + return fileDescriptor_98bbca36ef968dfc, []int{19, 0} } func (m *GetEventResponse_Events) XXX_Unmarshal(b []byte) error { @@ -1077,7 +1163,7 @@ func (m *GetEventTeamsRequest) Reset() { *m = GetEventTeamsRequest{} } func (m *GetEventTeamsRequest) String() string { return proto.CompactTextString(m) } func (*GetEventTeamsRequest) ProtoMessage() {} func (*GetEventTeamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{18} + return fileDescriptor_98bbca36ef968dfc, []int{20} } func (m *GetEventTeamsRequest) XXX_Unmarshal(b []byte) error { @@ -1117,7 +1203,7 @@ func (m *GetEventTeamsResponse) Reset() { *m = GetEventTeamsResponse{} } func (m *GetEventTeamsResponse) String() string { return proto.CompactTextString(m) } func (*GetEventTeamsResponse) ProtoMessage() {} func (*GetEventTeamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{19} + return fileDescriptor_98bbca36ef968dfc, []int{21} } func (m *GetEventTeamsResponse) XXX_Unmarshal(b []byte) error { @@ -1169,7 +1255,7 @@ func (m *GetEventTeamsResponse_Teams) Reset() { *m = GetEventTeamsRespon func (m *GetEventTeamsResponse_Teams) String() string { return proto.CompactTextString(m) } func (*GetEventTeamsResponse_Teams) ProtoMessage() {} func (*GetEventTeamsResponse_Teams) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{19, 0} + return fileDescriptor_98bbca36ef968dfc, []int{21, 0} } func (m *GetEventTeamsResponse_Teams) XXX_Unmarshal(b []byte) error { @@ -1252,7 +1338,7 @@ func (m *UpdateEventRequest) Reset() { *m = UpdateEventRequest{} } func (m *UpdateEventRequest) String() string { return proto.CompactTextString(m) } func (*UpdateEventRequest) ProtoMessage() {} func (*UpdateEventRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{20} + return fileDescriptor_98bbca36ef968dfc, []int{22} } func (m *UpdateEventRequest) XXX_Unmarshal(b []byte) error { @@ -1307,7 +1393,7 @@ func (m *UpdateTeamSolvedChallengeRequest) Reset() { *m = UpdateTeamSolv func (m *UpdateTeamSolvedChallengeRequest) String() string { return proto.CompactTextString(m) } func (*UpdateTeamSolvedChallengeRequest) ProtoMessage() {} func (*UpdateTeamSolvedChallengeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{21} + return fileDescriptor_98bbca36ef968dfc, []int{23} } func (m *UpdateTeamSolvedChallengeRequest) XXX_Unmarshal(b []byte) error { @@ -1361,7 +1447,7 @@ func (m *UpdateTeamLastAccessRequest) Reset() { *m = UpdateTeamLastAcces func (m *UpdateTeamLastAccessRequest) String() string { return proto.CompactTextString(m) } func (*UpdateTeamLastAccessRequest) ProtoMessage() {} func (*UpdateTeamLastAccessRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{22} + return fileDescriptor_98bbca36ef968dfc, []int{24} } func (m *UpdateTeamLastAccessRequest) XXX_Unmarshal(b []byte) error { @@ -1408,7 +1494,7 @@ func (m *UpdateResponse) Reset() { *m = UpdateResponse{} } func (m *UpdateResponse) String() string { return proto.CompactTextString(m) } func (*UpdateResponse) ProtoMessage() {} func (*UpdateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_98bbca36ef968dfc, []int{23} + return fileDescriptor_98bbca36ef968dfc, []int{25} } func (m *UpdateResponse) XXX_Unmarshal(b []byte) error { @@ -1445,6 +1531,8 @@ func (m *UpdateResponse) GetErrorMessage() string { func init() { proto.RegisterType((*EmptyRequest)(nil), "store.EmptyRequest") + proto.RegisterType((*DelTeamRequest)(nil), "store.DelTeamRequest") + proto.RegisterType((*DelTeamResp)(nil), "store.DelTeamResp") proto.RegisterType((*UpdateTeamPassRequest)(nil), "store.UpdateTeamPassRequest") proto.RegisterType((*GetEventIDReq)(nil), "store.GetEventIDReq") proto.RegisterType((*GetEventIDResp)(nil), "store.GetEventIDResp") @@ -1476,82 +1564,85 @@ func init() { func init() { proto.RegisterFile("store.proto", fileDescriptor_98bbca36ef968dfc) } var fileDescriptor_98bbca36ef968dfc = []byte{ - // 1197 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x57, 0xcd, 0x6f, 0x1b, 0x55, - 0x10, 0xf7, 0x47, 0x9c, 0xd8, 0x93, 0xc4, 0x75, 0x1f, 0x4e, 0xbb, 0x75, 0xa3, 0x2a, 0x7a, 0x42, - 0x22, 0x84, 0xe2, 0x43, 0x2a, 0xa1, 0x40, 0x05, 0xc8, 0x6d, 0x9c, 0x2a, 0x4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, 0xe9, 0x09, 0x6c, 0x8d, 0x3e, 0xb4, 0x00, 0x4b, 0xff, 0x73, 0x0f, - 0x3a, 0x39, 0x4b, 0xa3, 0x14, 0x52, 0x4b, 0x23, 0xff, 0xb3, 0x0e, 0x77, 0x06, 0x9e, 0x57, 0xf8, - 0x4b, 0x02, 0x2b, 0x21, 0x9b, 0xa2, 0xf6, 0x27, 0xbf, 0x4d, 0x96, 0x6b, 0x59, 0x96, 0xb7, 0xa1, - 0xf5, 0x26, 0x89, 0x42, 0x81, 0xa1, 0xc7, 0x65, 0x3f, 0xb5, 0xdc, 0x8c, 0x91, 0x9e, 0xe2, 0x35, - 0x26, 0x13, 0x9f, 0x23, 0x77, 0x56, 0xd4, 0xa9, 0x65, 0xa4, 0xa7, 0xec, 0x8a, 0xf9, 0x01, 0x7b, - 0x1d, 0xa0, 0xd3, 0x90, 0x01, 0x65, 0x8c, 0xf4, 0x9f, 0x27, 0x2c, 0x66, 0x13, 0x5f, 0xcc, 0x9c, - 0x55, 0x79, 0x68, 0xe9, 0x54, 0x93, 0x0b, 0x96, 0xc8, 0xfe, 0x70, 0xd6, 0x94, 0x5d, 0xcb, 0x20, - 0x7d, 0x20, 0x78, 0x1d, 0xe3, 0x44, 0xa0, 0x77, 0xe4, 0x87, 0x3e, 0xbf, 0x90, 0x62, 0x4d, 0x29, - 0xb6, 0xe0, 0x84, 0x3c, 0x02, 0x78, 0x23, 0x29, 0xf4, 0x06, 0xc2, 0x69, 0x49, 0xb9, 0x1c, 0x27, - 0x97, 0x35, 0x28, 0x94, 0x70, 0x1b, 0x5a, 0x93, 0x04, 0x99, 0x40, 0xef, 0xd9, 0xcc, 0x59, 0x57, - 0x51, 0x58, 0x46, 0x8a, 0xdd, 0x28, 0x0c, 0x66, 0x3f, 0x9c, 0xbd, 0x74, 0x36, 0x14, 0x76, 0x35, - 0x29, 0xa3, 0xc7, 0x49, 0x82, 0xe2, 0x04, 0x67, 0xce, 0xa6, 0x8e, 0xde, 0x30, 0x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0x11, - 0x1e, 0x2c, 0x1d, 0x25, 0xe4, 0x93, 0x82, 0xd6, 0xf2, 0x61, 0xb3, 0xdc, 0xfc, 0x08, 0xba, 0x8b, - 0x26, 0x07, 0xa1, 0x73, 0x96, 0xe7, 0xc6, 0xca, 0x72, 0xa3, 0x27, 0x66, 0xc8, 0x9a, 0xf7, 0xaf, - 0x1a, 0xf2, 0x73, 0x26, 0x73, 0x4f, 0xe3, 0xa5, 0xc6, 0x5e, 0xaf, 0xca, 0xa7, 0xf6, 0x93, 0x7f, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x23, 0xd1, 0x1d, 0xc5, 0x79, 0x0f, 0x00, 0x00, + // 1245 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4b, 0x4f, 0x1b, 0x57, + 0x14, 0xf6, 0x03, 0x83, 0x7d, 0x00, 0xe3, 0xdc, 0x42, 0x32, 0x31, 0x28, 0x42, 0x57, 0x95, 0x42, + 0x69, 0xea, 0x05, 0x91, 0x2a, 0xd2, 0xa8, 0xa9, 0x9c, 0xd8, 0x44, 0x08, 0x1a, 0x51, 0xdb, 0xe9, + 0xae, 0xaa, 0x26, 0x9e, 0x13, 0x18, 0x75, 0x3c, 0x33, 0x99, 0x7b, 0x21, 0x78, 0xdd, 0x1f, 0xd2, + 0x4d, 0xd7, 0xdd, 0xf6, 0x27, 0x74, 0xd9, 0xdf, 0xd2, 0x7f, 0x50, 0xdd, 0xe7, 0x3c, 0x6c, 0x13, + 0x22, 0x75, 0x53, 0x65, 0xe7, 0xf3, 0xdd, 0xf3, 0xba, 0xe7, 0x35, 0xe7, 0x1a, 0x56, 0x19, 0x8f, + 0x12, 0xec, 0xc4, 0x49, 0xc4, 0x23, 0x52, 0x93, 0x04, 0x6d, 0xc2, 0x5a, 0x7f, 0x12, 0xf3, 0xe9, + 0x00, 0xdf, 0x5d, 0x22, 0xe3, 0xf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c7, 0x63, 0x64, 0x4c, 0x56, 0x56, 0x63, 0x90, 0x41, 0xc8, 0x3e, 0xb4, 0x58, 0x14, 0x5c, + 0xa1, 0xf7, 0xe2, 0xc2, 0x0d, 0x02, 0x0c, 0xcf, 0x91, 0xe9, 0x12, 0x9b, 0xc1, 0xa9, 0x07, 0x44, + 0xad, 0x66, 0xc5, 0xef, 0x62, 0x14, 0x78, 0x69, 0xe4, 0x35, 0x25, 0xf0, 0x10, 0xdf, 0x8f, 0x6c, + 0x03, 0x69, 0xaa, 0x50, 0x7f, 0xd5, 0x62, 0xfd, 0xd1, 0x10, 0x76, 0xd3, 0x05, 0x70, 0x98, 0xf7, + 0x21, 0x63, 0x53, 0x6f, 0x99, 0xe5, 0xec, 0x96, 0x39, 0xa7, 0x63, 0x77, 0x61, 0x75, 0x1c, 0x4d, + 0xe2, 0x00, 0x79, 0xc6, 0x5c, 0x16, 0xa2, 0x3f, 0xc0, 0x76, 0x6a, 0xef, 0xd4, 0x46, 0xe6, 0x43, + 0xa6, 0xda, 0x50, 0x77, 0x25, 0x63, 0x97, 0x9b, 0xf1, 0x6a, 0x68, 0x31, 0x18, 0x95, 0xca, 0xff, + 0x66, 0x30, 0x1e, 0xfc, 0x53, 0x87, 0x9a, 0xfa, 0x94, 0x3f, 0x85, 0xba, 0xf9, 0x62, 0x93, 0xbb, + 0xba, 0x5e, 0x0b, 0x9f, 0xf0, 0xf6, 0x96, 0xc6, 0xf3, 0xb3, 0x99, 0x96, 0xc8, 0x13, 0x58, 0xd1, + 0x1f, 0x0d, 0xb2, 0x95, 0xca, 0x66, 0x3e, 0x22, 0x8b, 0x45, 0x9f, 0x41, 0xc3, 0xb4, 0x05, 0xb3, + 0x86, 0x0b, 0x1b, 0x52, 0xfb, 0xde, 0x82, 0xd1, 0x4c, 0x4b, 0xa4, 0x9f, 0xee, 0xcd, 0x6a, 0x49, + 0x22, 0x4e, 0x81, 0xd9, 0xee, 0x4e, 0x37, 0xa9, 0x39, 0x4d, 0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0xb9, + 0xa6, 0xcf, 0x3f, 0xe4, 0xdb, 0xa4, 0x08, 0x8b, 0x74, 0xbe, 0x59, 0x96, 0x7f, 0x07, 0x3c, 0xfe, + 0x37, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x89, 0x34, 0xed, 0x1d, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1584,6 +1675,8 @@ type StoreClient interface { UpdateTeamSolvedChallenge(ctx context.Context, in *UpdateTeamSolvedChallengeRequest, opts ...grpc.CallOption) (*UpdateResponse, error) UpdateTeamLastAccess(ctx context.Context, in *UpdateTeamLastAccessRequest, opts ...grpc.CallOption) (*UpdateResponse, error) UpdateTeamPassword(ctx context.Context, in *UpdateTeamPassRequest, opts ...grpc.CallOption) (*UpdateResponse, error) + // Delete + DeleteTeam(ctx context.Context, in *DelTeamRequest, opts ...grpc.CallOption) (*DelTeamResp, error) } type storeClient struct { @@ -1729,6 +1822,15 @@ func (c *storeClient) UpdateTeamPassword(ctx context.Context, in *UpdateTeamPass return out, nil } +func (c *storeClient) DeleteTeam(ctx context.Context, in *DelTeamRequest, opts ...grpc.CallOption) (*DelTeamResp, error) { + out := new(DelTeamResp) + err := c.cc.Invoke(ctx, "/store.Store/DeleteTeam", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // StoreServer is the server API for Store service. type StoreServer interface { //Insert @@ -1749,6 +1851,8 @@ type StoreServer interface { UpdateTeamSolvedChallenge(context.Context, *UpdateTeamSolvedChallengeRequest) (*UpdateResponse, error) UpdateTeamLastAccess(context.Context, *UpdateTeamLastAccessRequest) (*UpdateResponse, error) UpdateTeamPassword(context.Context, *UpdateTeamPassRequest) (*UpdateResponse, error) + // Delete + DeleteTeam(context.Context, *DelTeamRequest) (*DelTeamResp, error) } // UnimplementedStoreServer can be embedded to have forward compatible implementations. @@ -1800,6 +1904,9 @@ func (*UnimplementedStoreServer) UpdateTeamLastAccess(ctx context.Context, req * func (*UnimplementedStoreServer) UpdateTeamPassword(ctx context.Context, req *UpdateTeamPassRequest) (*UpdateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateTeamPassword not implemented") } +func (*UnimplementedStoreServer) DeleteTeam(ctx context.Context, req *DelTeamRequest) (*DelTeamResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTeam not implemented") +} func RegisterStoreServer(s *grpc.Server, srv StoreServer) { s.RegisterService(&_Store_serviceDesc, srv) @@ -2075,6 +2182,24 @@ func _Store_UpdateTeamPassword_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Store_DeleteTeam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DelTeamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoreServer).DeleteTeam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/store.Store/DeleteTeam", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoreServer).DeleteTeam(ctx, req.(*DelTeamRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Store_serviceDesc = grpc.ServiceDesc{ ServiceName: "store.Store", HandlerType: (*StoreServer)(nil), @@ -2139,6 +2264,10 @@ var _Store_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateTeamPassword", Handler: _Store_UpdateTeamPassword_Handler, }, + { + MethodName: "DeleteTeam", + Handler: _Store_DeleteTeam_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "store.proto", diff --git a/proto/store.proto b/proto/store.proto index 4c105c4..ea59b6b 100644 --- a/proto/store.proto +++ b/proto/store.proto @@ -21,10 +21,23 @@ service Store { rpc UpdateTeamSolvedChallenge (UpdateTeamSolvedChallengeRequest) returns (UpdateResponse) {} rpc UpdateTeamLastAccess (UpdateTeamLastAccessRequest) returns (UpdateResponse) {} rpc UpdateTeamPassword (UpdateTeamPassRequest) returns (UpdateResponse) {} + + // Delete + rpc DeleteTeam(DelTeamRequest) returns (DelTeamResp) {} } message EmptyRequest {} + +message DelTeamRequest { + string evTag = 1; + string teamId = 2; +} + +message DelTeamResp { + string message = 1; +} + message UpdateTeamPassRequest { string encryptedPass = 1; string teamID = 2; From 6cf268da9b94c0e442bb9ba7fe3220d0e1bbf34f Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Wed, 12 May 2021 16:55:50 +0300 Subject: [PATCH 12/13] raw query string is added Signed-off-by: Ahmet Turkmen --- database/query.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/database/query.go b/database/query.go index b5f9139..5201a6a 100644 --- a/database/query.go +++ b/database/query.go @@ -32,6 +32,8 @@ var ( AddTeamQuery = "INSERT INTO team (tag, event_id, email, name, password, created_at, last_access, solved_challenges)" + "VALUES ($1, $2, $3, $4, $5, $6, $7, $8)" + DelTeamQuery = "DELETE FROM team WHERE tag=$1 and event_id = $2;" + AddEventQuery = "INSERT INTO event (tag, name, available, capacity, frontends, status, exercises, started_at, finish_expected, finished_at, createdby, onlyvpn,secretKey, disabledExercises)" + "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10,$11,$12,$13,$14)" From e56082e0c21527fd82456096f3da94b104bc0441 Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Wed, 12 May 2021 16:56:35 +0300 Subject: [PATCH 13/13] delete team rpc is updated with core functionality Signed-off-by: Ahmet Turkmen --- database/store.go | 19 ++++++++++++++++++- util/util.go | 9 +++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/database/store.go b/database/store.go index 67432bb..4587fb2 100644 --- a/database/store.go +++ b/database/store.go @@ -51,6 +51,7 @@ type Store interface { UpdateTeamPassword(in *pb.UpdateTeamPassRequest) error GetEventID(in *pb.GetEventIDReq) (int32, error) UpdateCloseEvent(*pb.UpdateEventRequest) (string, error) + DelTeam(request *pb.DelTeamRequest) (string, error) } func NewStore(conf *model.Config) (Store, error) { @@ -117,7 +118,23 @@ func (s *store) AddTeam(in *pb.AddTeamRequest) (string, error) { if err != nil { return "", err } - return "Team correctly added!", nil + return fmt.Sprintf("Team [ %s ] correctly added to event [ %s ]", in.Name, in.EventTag), nil +} + +func (s *store) DelTeam(req *pb.DelTeamRequest) (string, error) { + s.m.Lock() + defer s.m.Unlock() + + var eventId int + if err := s.db.QueryRow(QueryEventId, req.EvTag).Scan(&eventId); err != nil { + return "", err + } + _, err := s.db.Exec(DelTeamQuery, req.TeamId, eventId) + if err != nil { + return "", err + } + return fmt.Sprintf("Team [ %s ] is deleted from event tag [ %s ]", req.TeamId, req.EvTag), nil + } func (s *store) GetEvents(in *pb.GetEventRequest) ([]model.Event, error) { diff --git a/util/util.go b/util/util.go index 3f83926..94bda57 100644 --- a/util/util.go +++ b/util/util.go @@ -188,6 +188,15 @@ func (s server) UpdateTeamLastAccess(ctx context.Context, in *pb.UpdateTeamLastA return &pb.UpdateResponse{Message: result}, nil } +func (s server) DeleteTeam(ctx context.Context, req *pb.DelTeamRequest) (*pb.DelTeamResp, error) { + result, err := s.store.DelTeam(req) + if err != nil { + log.Printf("ERR: Error delete team %s from event %s, err: %s", req.TeamId, req.EvTag, err.Error()) + return &pb.DelTeamResp{Message: err.Error()}, nil + } + return &pb.DelTeamResp{Message: result}, nil +} + func (s server) UpdateTeamPassword(ctx context.Context, req *pb.UpdateTeamPassRequest) (*pb.UpdateResponse, error) { if err := s.store.UpdateTeamPassword(req); err != nil { log.Printf("ERR: Error Update team %s password: %s", req.TeamID, err.Error())