From dbdd8e073ce0cd03e3ee47828fde422e6200df47 Mon Sep 17 00:00:00 2001 From: Paul Esch-Laurent Date: Wed, 30 Nov 2022 15:36:46 -0600 Subject: [PATCH 01/75] wip: sysadmin w/ license can export any board --- server/api/archive.go | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/server/api/archive.go b/server/api/archive.go index da56350a4..396835858 100644 --- a/server/api/archive.go +++ b/server/api/archive.go @@ -9,6 +9,7 @@ import ( "github.com/mattermost/focalboard/server/model" "github.com/mattermost/focalboard/server/services/audit" + mmModel "github.com/mattermost/mattermost-server/v6/model" "github.com/mattermost/mattermost-server/v6/shared/mlog" ) @@ -54,10 +55,27 @@ func (a *API) handleArchiveExportBoard(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) boardID := vars["boardID"] userID := getUserID(r) + isSysAdmin := false - if !a.permissions.HasPermissionToBoard(userID, boardID, model.PermissionViewBoard) { - a.errorResponse(w, r, model.NewErrPermission("access denied to board")) - return + // Valid authorization (`manage_system`)? + if a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { + isSysAdmin = true + } + + // Don't need to check permission for a board if it's a sysadmin w/ `manage_system` + if !isSysAdmin { + if !a.permissions.HasPermissionToBoard(userID, boardID, model.PermissionViewBoard) { + a.errorResponse(w, r, model.NewErrPermission("access denied to board")) + return + } + // ... but do need to check the license + } else { + // Valid license feature (Compliance)? + license := a.app.GetLicense() + if license == nil || !(*license.Features.Compliance) { + a.errorResponse(w, r, model.NewErrNotImplemented("insufficient license")) + return + } } auditRec := a.makeAuditRecord(r, "archiveExportBoard", audit.Fail) From f662e35daa93fdc9db84cc032176a1d7819bada5 Mon Sep 17 00:00:00 2001 From: Paul Esch-Laurent Date: Wed, 30 Nov 2022 15:49:16 -0600 Subject: [PATCH 02/75] wip --- server/api/api.go | 1 + server/api/compliance.go | 76 ++++++++++++++++++++++++++++++++++++++++ server/app/app.go | 4 +++ 3 files changed, 81 insertions(+) create mode 100644 server/api/compliance.go diff --git a/server/api/api.go b/server/api/api.go index da87f0b24..873ba0406 100644 --- a/server/api/api.go +++ b/server/api/api.go @@ -97,6 +97,7 @@ func (a *API) RegisterRoutes(r *mux.Router) { a.registerBlocksRoutes(apiv2) a.registerContentBlocksRoutes(apiv2) a.registerStatisticsRoutes(apiv2) + a.registerComplianceRoutes(apiv2) // V3 routes a.registerCardsRoutes(apiv2) diff --git a/server/api/compliance.go b/server/api/compliance.go new file mode 100644 index 000000000..b5b1600c0 --- /dev/null +++ b/server/api/compliance.go @@ -0,0 +1,76 @@ +package api + +import ( + "net/http" + + "github.com/gorilla/mux" + "github.com/mattermost/focalboard/server/model" + mmModel "github.com/mattermost/mattermost-server/v6/model" +) + +func (a *API) registerComplianceRoutes(r *mux.Router) { + // Compliance APIs + r.HandleFunc("/admin/boards", a.sessionRequired(a.handleGetAllBoards)).Methods("GET") + r.HandleFunc("/admin/boards_history", a.sessionRequired(a.handleGetBoardsHistory)).Methods("POST") + r.HandleFunc("/admin/blocks_history", a.sessionRequired(a.handleGetBlocksHistory)).Methods("GET") +} + +func (a *API) handleGetAllBoards(w http.ResponseWriter, r *http.Request) { + // TODO(@pinjasaur): swagger + + // Valid authorization (`manage_system`)? + userID := getUserID(r) + if !a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { + a.errorResponse(w, r, model.NewErrUnauthorized("access denied Compliance Export getAllBoards")) + return + } + + // Valid license feature (Compliance)? + license := a.app.GetLicense() + if license == nil || !(*license.Features.Compliance) { + a.errorResponse(w, r, model.NewErrNotImplemented("insufficient license Compliance Export getAllBoards")) + return + } + + stringResponse(w, "OK") +} + +func (a *API) handleGetBoardsHistory(w http.ResponseWriter, r *http.Request) { + // TODO(@pinjasaur): swagger + + // Valid authorization (`manage_system`)? + userID := getUserID(r) + if !a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { + a.errorResponse(w, r, model.NewErrUnauthorized("access denied Compliance Export getBoardsHistory")) + return + } + + // Valid license feature (Compliance)? + license := a.app.GetLicense() + if license == nil || !(*license.Features.Compliance) { + a.errorResponse(w, r, model.NewErrNotImplemented("insufficient license Compliance Export getBoardsHistory")) + return + } + + stringResponse(w, "OK") +} + +func (a *API) handleGetBlocksHistory(w http.ResponseWriter, r *http.Request) { + // TODO(@pinjasaur): swagger + + // Valid authorization (`manage_system`)? + userID := getUserID(r) + if !a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { + a.errorResponse(w, r, model.NewErrUnauthorized("access denied Compliance Export getBlocksHistory")) + return + } + + // Valid license feature (Compliance)? + license := a.app.GetLicense() + if license == nil || !(*license.Features.Compliance) { + a.errorResponse(w, r, model.NewErrNotImplemented("insufficient license Compliance Export getBlocksHistory")) + return + } + + stringResponse(w, "OK") +} diff --git a/server/app/app.go b/server/app/app.go index de6697b6c..c0deeba0a 100644 --- a/server/app/app.go +++ b/server/app/app.go @@ -108,3 +108,7 @@ func (a *App) SetCardLimit(cardLimit int) { defer a.cardLimitMux.Unlock() a.cardLimit = cardLimit } + +func (a *App) GetLicense() *mm_model.License { + return a.store.GetLicense() +} From c4de1b92501f5177822baf33abd472b95a34010f Mon Sep 17 00:00:00 2001 From: Paul Esch-Laurent Date: Fri, 2 Dec 2022 10:40:48 -0600 Subject: [PATCH 03/75] wip --- server/api/compliance.go | 214 +++++++++++++++++- server/app/boards.go | 12 + server/model/compliance.go | 15 ++ .../mattermostauthlayer.go | 99 ++++++++ server/services/store/store.go | 3 + 5 files changed, 339 insertions(+), 4 deletions(-) create mode 100644 server/model/compliance.go diff --git a/server/api/compliance.go b/server/api/compliance.go index b5b1600c0..1819f9c8f 100644 --- a/server/api/compliance.go +++ b/server/api/compliance.go @@ -1,23 +1,37 @@ package api import ( + "encoding/json" + "fmt" "net/http" + "strconv" "github.com/gorilla/mux" "github.com/mattermost/focalboard/server/model" mmModel "github.com/mattermost/mattermost-server/v6/model" + "github.com/mattermost/mattermost-server/v6/shared/mlog" +) + +const ( + complianceDefaultPage = "0" + complianceDefaultPerPage = "60" ) func (a *API) registerComplianceRoutes(r *mux.Router) { // Compliance APIs r.HandleFunc("/admin/boards", a.sessionRequired(a.handleGetAllBoards)).Methods("GET") - r.HandleFunc("/admin/boards_history", a.sessionRequired(a.handleGetBoardsHistory)).Methods("POST") + r.HandleFunc("/admin/boards_history", a.sessionRequired(a.handleGetBoardsHistory)).Methods("GET") r.HandleFunc("/admin/blocks_history", a.sessionRequired(a.handleGetBlocksHistory)).Methods("GET") } func (a *API) handleGetAllBoards(w http.ResponseWriter, r *http.Request) { // TODO(@pinjasaur): swagger + query := r.URL.Query() + teamID := query.Get("team_id") + strPage := query.Get("page") + strPerPage := query.Get("per_page") + // Valid authorization (`manage_system`)? userID := getUserID(r) if !a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { @@ -32,12 +46,78 @@ func (a *API) handleGetAllBoards(w http.ResponseWriter, r *http.Request) { return } - stringResponse(w, "OK") + if strPage == "" { + strPage = complianceDefaultPage + } + if strPerPage == "" { + strPerPage = complianceDefaultPerPage + } + page, err := strconv.Atoi(strPage) + if err != nil { + message := fmt.Sprintf("invalid `page` parameter: %s", err) + a.errorResponse(w, r, model.NewErrBadRequest(message)) + return + } + perPage, err := strconv.Atoi(strPerPage) + if err != nil { + message := fmt.Sprintf("invalid `per_page` parameter: %s", err) + a.errorResponse(w, r, model.NewErrBadRequest(message)) + return + } + + boards, err := a.app.GetBoardsForTeam(teamID, page, perPage) + if err != nil { + a.errorResponse(w, r, err) + return + } + + // N+1; is there more? + // TODO: potentially fragile if len(boards) == 0 or perPage < 0 + hasNext := len(boards) > perPage + if hasNext { + boards = boards[:len(boards)-1] + } + + a.logger.Debug("GetAllBoards", + mlog.String("teamID", teamID), + mlog.Int("boardsCount", len(boards)), + ) + + response := struct { + hasNext bool + results []*model.Board + }{ + hasNext: hasNext, + results: boards, + } + // response := model.ComplianceResponse{ + // HasNext: hasNext, + // Results: boards, + // } + data, err := json.Marshal(response) + if err != nil { + a.errorResponse(w, r, err) + return + } + + jsonBytesResponse(w, http.StatusOK, data) } func (a *API) handleGetBoardsHistory(w http.ResponseWriter, r *http.Request) { // TODO(@pinjasaur): swagger + query := r.URL.Query() + strModifiedSince := query.Get("modified_since") // required, everything else optional + includeDeleted := query.Get("include_deleted") == "true" + teamID := query.Get("team_id") + strPage := query.Get("page") + strPerPage := query.Get("per_page") + + if strModifiedSince == "" { + a.errorResponse(w, r, model.NewErrBadRequest("`modified_since` parameter required")) + return + } + // Valid authorization (`manage_system`)? userID := getUserID(r) if !a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { @@ -52,12 +132,81 @@ func (a *API) handleGetBoardsHistory(w http.ResponseWriter, r *http.Request) { return } - stringResponse(w, "OK") + if strPage == "" { + strPage = complianceDefaultPage + } + if strPerPage == "" { + strPerPage = complianceDefaultPerPage + } + page, err := strconv.Atoi(strPage) + if err != nil { + message := fmt.Sprintf("invalid `page` parameter: %s", err) + a.errorResponse(w, r, model.NewErrBadRequest(message)) + return + } + perPage, err := strconv.Atoi(strPerPage) + if err != nil { + message := fmt.Sprintf("invalid `per_page` parameter: %s", err) + a.errorResponse(w, r, model.NewErrBadRequest(message)) + return + } + modifiedSince, err := strconv.Atoi(strModifiedSince) + if err != nil { + message := fmt.Sprintf("invalid `modified_since` parameter: %s", err) + a.errorResponse(w, r, model.NewErrBadRequest(message)) + return + } + + boards, err := a.app.GetBoardsHistory(modifiedSince, includeDeleted, teamID, page, perPage) + if err != nil { + a.errorResponse(w, r, err) + return + } + + // N+1; is there more? + // TODO: potentially fragile if len(boards) == 0 or perPage < 0 + hasNext := len(boards) > perPage + if hasNext { + boards = boards[:len(boards)-1] + } + + a.logger.Debug("GetBoardsHistory", + mlog.String("teamID", teamID), + mlog.Int("boardsCount", len(boards)), + ) + + response := struct { + hasNext bool + results []*model.Board // ish + }{ + hasNext: hasNext, + results: boards, + } + data, err := json.Marshal(response) + if err != nil { + a.errorResponse(w, r, err) + return + } + + jsonBytesResponse(w, http.StatusOK, data) } func (a *API) handleGetBlocksHistory(w http.ResponseWriter, r *http.Request) { // TODO(@pinjasaur): swagger + query := r.URL.Query() + strModifiedSince := query.Get("modified_since") // required, everything else optional + includeDeleted := query.Get("include_deleted") == "true" + teamID := query.Get("team_id") + boardID := query.Get("board_id") + strPage := query.Get("page") + strPerPage := query.Get("per_page") + + if strModifiedSince == "" { + a.errorResponse(w, r, model.NewErrBadRequest("`modified_since` parameter required")) + return + } + // Valid authorization (`manage_system`)? userID := getUserID(r) if !a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { @@ -72,5 +221,62 @@ func (a *API) handleGetBlocksHistory(w http.ResponseWriter, r *http.Request) { return } - stringResponse(w, "OK") + if strPage == "" { + strPage = complianceDefaultPage + } + if strPerPage == "" { + strPerPage = complianceDefaultPerPage + } + page, err := strconv.Atoi(strPage) + if err != nil { + message := fmt.Sprintf("invalid `page` parameter: %s", err) + a.errorResponse(w, r, model.NewErrBadRequest(message)) + return + } + perPage, err := strconv.Atoi(strPerPage) + if err != nil { + message := fmt.Sprintf("invalid `per_page` parameter: %s", err) + a.errorResponse(w, r, model.NewErrBadRequest(message)) + return + } + modifiedSince, err := strconv.Atoi(strModifiedSince) + if err != nil { + message := fmt.Sprintf("invalid `modified_since` parameter: %s", err) + a.errorResponse(w, r, model.NewErrBadRequest(message)) + return + } + + blocks, err := a.app.GetBlocksHistory(modifiedSince, includeDeleted, teamID, boardID, page, perPage) + if err != nil { + a.errorResponse(w, r, err) + return + } + + // N+1; is there more? + // TODO: potentially fragile if len(blocks) == 0 or perPage < 0 + hasNext := len(blocks) > perPage + if hasNext { + blocks = blocks[:len(blocks)-1] + } + + a.logger.Debug("GetBlocksHistory", + mlog.String("teamID", teamID), + mlog.String("boardID", boardID), + mlog.Int("blocksCount", len(blocks)), + ) + + response := struct { + hasNext bool + results []*model.Block // ish + }{ + hasNext: hasNext, + results: blocks, + } + data, err := json.Marshal(response) + if err != nil { + a.errorResponse(w, r, err) + return + } + + jsonBytesResponse(w, http.StatusOK, data) } diff --git a/server/app/boards.go b/server/app/boards.go index 533c74320..dd8ef40fd 100644 --- a/server/app/boards.go +++ b/server/app/boards.go @@ -256,6 +256,18 @@ func (a *App) DuplicateBoard(boardID, userID, toTeam string, asTemplate bool) (* return bab, members, err } +func (a *App) GetBoardsForTeam(teamID string, page, perPage int) ([]*model.Board, error) { + return a.store.GetBoardsForTeam(teamID, page, perPage) +} + +func (a *App) GetBoardsHistory(modifiedSince int, includeDeleted bool, teamID string, page, perPage int) ([]*model.Board, error) { + return a.store.GetBoardsHistory(modifiedSince, includeDeleted, teamID, page, perPage) +} + +func (a *App) GetBlocksHistory(modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) ([]*model.Block, error) { + return a.store.GetBlocksHistory(modifiedSince, includeDeleted, teamID, boardID, page, perPage) +} + func (a *App) GetBoardsForUserAndTeam(userID, teamID string, includePublicBoards bool) ([]*model.Board, error) { return a.store.GetBoardsForUserAndTeam(userID, teamID, includePublicBoards) } diff --git a/server/model/compliance.go b/server/model/compliance.go new file mode 100644 index 000000000..8e10d899b --- /dev/null +++ b/server/model/compliance.go @@ -0,0 +1,15 @@ +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. +// See LICENSE.txt for license information. +package model + +// ComplianceResponse is the generic response body to a compliance API +// swagger:model +type ComplianceResponse struct { + // Is there a next page for pagination? + // required: true + HasNext bool `json:"hasNext"` + + // The array of results + // required: true + Results []interface{} `json:"results"` +} diff --git a/server/services/store/mattermostauthlayer/mattermostauthlayer.go b/server/services/store/mattermostauthlayer/mattermostauthlayer.go index e4f37ed48..128c049ee 100644 --- a/server/services/store/mattermostauthlayer/mattermostauthlayer.go +++ b/server/services/store/mattermostauthlayer/mattermostauthlayer.go @@ -1041,6 +1041,105 @@ func (s *MattermostAuthLayer) GetMembersForBoard(boardID string) ([]*model.Board return members, nil } +func (s *MattermostAuthLayer) GetBoardsForTeam(teamID string, page, perPage int) ([]*model.Board, error) { + query := s.getQueryBuilder(). + Select(boardFields("b.")...). + From(s.tablePrefix + "boards as b") + + if teamID != "" { + query = query.Where(sq.Eq{"b.team_id": teamID}) + } + + if page != 0 { + query = query.Offset(uint64(page * perPage)) + } + + if perPage > 0 { + // N+1 to check if there's a next page for pagination + query = query.Limit(uint64(perPage) + 1) + } + + rows, err := query.Query() + if err != nil { + s.logger.Error(`GetBoardsForTeam ERROR`, mlog.Err(err)) + return nil, err + } + defer s.CloseRows(rows) + + return s.boardsFromRows(rows, true) +} + +func (s *MattermostAuthLayer) GetBoardsHistory(modifiedSince int, includeDeleted bool, teamID string, page, perPage int) ([]*model.Board, error) { + query := s.getQueryBuilder(). + Select("*"). // TODO: specify + From(s.tablePrefix + "boards_history as bh"). + Where(sq.Gt{"bh.update_at": modifiedSince}) + + if !includeDeleted { + query = query.Where(sq.Eq{"bh.delete_at": 0}) + } + + if teamID != "" { + query = query.Where(sq.Eq{"bh.team_id": teamID}) + } + + if page != 0 { + query = query.Offset(uint64(page * perPage)) + } + + if perPage > 0 { + // N+1 to check if there's a next page for pagination + query = query.Limit(uint64(perPage) + 1) + } + + rows, err := query.Query() + if err != nil { + s.logger.Error(`GetBoardsHistory ERROR`, mlog.Err(err)) + return nil, err + } + defer s.CloseRows(rows) + + return s.boardsFromRows(rows, true) +} + +func (s *MattermostAuthLayer) GetBlocksHistory(modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) ([]*model.Block, error) { + query := s.getQueryBuilder(). + Select("*"). // TODO: specify + From(s.tablePrefix + "blocks_history as bh"). + Where(sq.Gt{"bh.update_at": modifiedSince}) + + if !includeDeleted { + query = query.Where(sq.Eq{"bh.delete_at": 0}) + } + + if teamID != "" { + query = query.Where(sq.Eq{"bh.team_id": teamID}) + } + + if boardID != "" { + query = query.Where(sq.Eq{"bh.board_id": boardID}) + } + + if page != 0 { + query = query.Offset(uint64(page * perPage)) + } + + if perPage > 0 { + // N+1 to check if there's a next page for pagination + query = query.Limit(uint64(perPage) + 1) + } + + rows, err := query.Query() + if err != nil { + s.logger.Error(`GetBoardsHistory ERROR`, mlog.Err(err)) + return nil, err + } + defer s.CloseRows(rows) + + // TODO: copy implementation from SQLStore? + return s.blocksFromRows(rows) +} + func (s *MattermostAuthLayer) GetBoardsForUserAndTeam(userID, teamID string, includePublicBoards bool) ([]*model.Board, error) { if includePublicBoards { boards, err := s.SearchBoardsForUserInTeam(teamID, "", userID) diff --git a/server/services/store/store.go b/server/services/store/store.go index 4a8ae7948..655c8e7be 100644 --- a/server/services/store/store.go +++ b/server/services/store/store.go @@ -92,6 +92,9 @@ type Store interface { // @withTransaction PatchBoard(boardID string, boardPatch *model.BoardPatch, userID string) (*model.Board, error) GetBoard(id string) (*model.Board, error) + GetBoardsForTeam(teamID string, page, perPage int) ([]*model.Board, error) + GetBoardsHistory(modifiedSince int, includeDeleted bool, teamID string, page, perPage int) ([]*model.Board, error) + GetBlocksHistory(modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) ([]*model.Block, error) GetBoardsForUserAndTeam(userID, teamID string, includePublicBoards bool) ([]*model.Board, error) GetBoardsInTeamByIds(boardIDs []string, teamID string) ([]*model.Board, error) // @withTransaction From 88abeb89ee27bd8075ac077315c23640d59d53e0 Mon Sep 17 00:00:00 2001 From: Paul Esch-Laurent Date: Fri, 2 Dec 2022 10:56:54 -0600 Subject: [PATCH 04/75] wip: todos --- .../services/store/mattermostauthlayer/mattermostauthlayer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/services/store/mattermostauthlayer/mattermostauthlayer.go b/server/services/store/mattermostauthlayer/mattermostauthlayer.go index 128c049ee..35a2bcdbc 100644 --- a/server/services/store/mattermostauthlayer/mattermostauthlayer.go +++ b/server/services/store/mattermostauthlayer/mattermostauthlayer.go @@ -1074,6 +1074,7 @@ func (s *MattermostAuthLayer) GetBoardsHistory(modifiedSince int, includeDeleted Select("*"). // TODO: specify From(s.tablePrefix + "boards_history as bh"). Where(sq.Gt{"bh.update_at": modifiedSince}) + // TODO: order_by if !includeDeleted { query = query.Where(sq.Eq{"bh.delete_at": 0}) @@ -1107,6 +1108,7 @@ func (s *MattermostAuthLayer) GetBlocksHistory(modifiedSince int, includeDeleted Select("*"). // TODO: specify From(s.tablePrefix + "blocks_history as bh"). Where(sq.Gt{"bh.update_at": modifiedSince}) + // TODO: order_by if !includeDeleted { query = query.Where(sq.Eq{"bh.delete_at": 0}) @@ -1131,7 +1133,7 @@ func (s *MattermostAuthLayer) GetBlocksHistory(modifiedSince int, includeDeleted rows, err := query.Query() if err != nil { - s.logger.Error(`GetBoardsHistory ERROR`, mlog.Err(err)) + s.logger.Error(`GetBlocksHistory ERROR`, mlog.Err(err)) return nil, err } defer s.CloseRows(rows) From dcdc3e20d9c26faa75c4ec9f4aae3a3787051af6 Mon Sep 17 00:00:00 2001 From: Paul Esch-Laurent Date: Mon, 5 Dec 2022 16:10:03 -0600 Subject: [PATCH 05/75] wip: `interface{}` in JSON marshal struct --- server/api/compliance.go | 31 +++++++++---------------------- server/model/compliance.go | 2 +- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/server/api/compliance.go b/server/api/compliance.go index 1819f9c8f..f16aa1a0b 100644 --- a/server/api/compliance.go +++ b/server/api/compliance.go @@ -83,17 +83,10 @@ func (a *API) handleGetAllBoards(w http.ResponseWriter, r *http.Request) { mlog.Int("boardsCount", len(boards)), ) - response := struct { - hasNext bool - results []*model.Board - }{ - hasNext: hasNext, - results: boards, + response := model.ComplianceResponse{ + HasNext: hasNext, + Results: boards, } - // response := model.ComplianceResponse{ - // HasNext: hasNext, - // Results: boards, - // } data, err := json.Marshal(response) if err != nil { a.errorResponse(w, r, err) @@ -175,12 +168,9 @@ func (a *API) handleGetBoardsHistory(w http.ResponseWriter, r *http.Request) { mlog.Int("boardsCount", len(boards)), ) - response := struct { - hasNext bool - results []*model.Board // ish - }{ - hasNext: hasNext, - results: boards, + response := model.ComplianceResponse{ + HasNext: hasNext, + Results: boards, } data, err := json.Marshal(response) if err != nil { @@ -265,12 +255,9 @@ func (a *API) handleGetBlocksHistory(w http.ResponseWriter, r *http.Request) { mlog.Int("blocksCount", len(blocks)), ) - response := struct { - hasNext bool - results []*model.Block // ish - }{ - hasNext: hasNext, - results: blocks, + response := model.ComplianceResponse{ + HasNext: hasNext, + Results: blocks, } data, err := json.Marshal(response) if err != nil { diff --git a/server/model/compliance.go b/server/model/compliance.go index 8e10d899b..69a292368 100644 --- a/server/model/compliance.go +++ b/server/model/compliance.go @@ -11,5 +11,5 @@ type ComplianceResponse struct { // The array of results // required: true - Results []interface{} `json:"results"` + Results interface{} `json:"results"` } From 79184eb9ba377600c1d2abb04e93f361a73af8ea Mon Sep 17 00:00:00 2001 From: Paul Esch-Laurent Date: Mon, 5 Dec 2022 16:33:33 -0600 Subject: [PATCH 06/75] wip: punt order by --- .../mattermostauthlayer/mattermostauthlayer.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/server/services/store/mattermostauthlayer/mattermostauthlayer.go b/server/services/store/mattermostauthlayer/mattermostauthlayer.go index 35a2bcdbc..ac32c9097 100644 --- a/server/services/store/mattermostauthlayer/mattermostauthlayer.go +++ b/server/services/store/mattermostauthlayer/mattermostauthlayer.go @@ -1074,7 +1074,8 @@ func (s *MattermostAuthLayer) GetBoardsHistory(modifiedSince int, includeDeleted Select("*"). // TODO: specify From(s.tablePrefix + "boards_history as bh"). Where(sq.Gt{"bh.update_at": modifiedSince}) - // TODO: order_by + // TODO: order by, do after creating BoardMetadata struct + // maybe could just do a variation of app.GetBoardMetadata() if !includeDeleted { query = query.Where(sq.Eq{"bh.delete_at": 0}) @@ -1103,12 +1104,12 @@ func (s *MattermostAuthLayer) GetBoardsHistory(modifiedSince int, includeDeleted return s.boardsFromRows(rows, true) } -func (s *MattermostAuthLayer) GetBlocksHistory(modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) ([]*model.Block, error) { +func (s *MattermostAuthLayer) GetBlocksHistory(modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) ([]*model.Board, error) { query := s.getQueryBuilder(). Select("*"). // TODO: specify From(s.tablePrefix + "blocks_history as bh"). - Where(sq.Gt{"bh.update_at": modifiedSince}) - // TODO: order_by + Where(sq.Gt{"bh.update_at": modifiedSince}). + OrderBy("bh.update_at DESC") if !includeDeleted { query = query.Where(sq.Eq{"bh.delete_at": 0}) @@ -1138,8 +1139,8 @@ func (s *MattermostAuthLayer) GetBlocksHistory(modifiedSince int, includeDeleted } defer s.CloseRows(rows) - // TODO: copy implementation from SQLStore? - return s.blocksFromRows(rows) + // TODO: blocks, not boards: copy implementation from SQLStore? + return s.boardsFromRows(rows, true) } func (s *MattermostAuthLayer) GetBoardsForUserAndTeam(userID, teamID string, includePublicBoards bool) ([]*model.Board, error) { From 8bce6820c6ed21b0352d6310e2d503f384dae2bf Mon Sep 17 00:00:00 2001 From: Paul Esch-Laurent Date: Mon, 5 Dec 2022 17:03:19 -0600 Subject: [PATCH 07/75] wip: golang client --- server/client/client.go | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/server/client/client.go b/server/client/client.go index 3a7ff2487..d98e5d333 100644 --- a/server/client/client.go +++ b/server/client/client.go @@ -975,3 +975,54 @@ func (c *Client) GetStatistics() (*model.BoardsStatistics, *Response) { return stats, BuildResponse(r) } + +func (c *Client) GetAllBoards(teamID string, page, perPage int) (*model.ComplianceResponse, *Response) { + query := fmt.Sprintf("?team_id=%s&page=%d&per_page=%d", teamID, page, perPage) + r, err := c.DoAPIGet("/admin/boards"+query, "") + if err != nil { + return nil, BuildErrorResponse(r, err) + } + defer closeBody(r) + + var res *model.ComplianceResponse + err = json.NewDecoder(r.Body).Decode(&res) + if err != nil { + return nil, BuildErrorResponse(r, err) + } + + return res, BuildResponse(r) +} + +func (c *Client) GetBoardsHistory(modifiedSince int, includeDeleted bool, teamID string, page, perPage int) (*model.ComplianceResponse, *Response) { + query := fmt.Sprintf("?modified_since=%d&include_deleted=%t&team_id=%s&page=%d&per_page=%d", modifiedSince, includeDeleted, teamID, page, perPage) + r, err := c.DoAPIGet("/admin/boards_history"+query, "") + if err != nil { + return nil, BuildErrorResponse(r, err) + } + defer closeBody(r) + + var res *model.ComplianceResponse + err = json.NewDecoder(r.Body).Decode(&res) + if err != nil { + return nil, BuildErrorResponse(r, err) + } + + return res, BuildResponse(r) +} + +func (c *Client) GetBlocksHistory(modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) (*model.ComplianceResponse, *Response) { + query := fmt.Sprintf("?modified_since=%d&include_deleted=%t&team_id=%s&board_id=%s&page=%d&per_page=%d", modifiedSince, includeDeleted, teamID, boardID, page, perPage) + r, err := c.DoAPIGet("/admin/blocks_history"+query, "") + if err != nil { + return nil, BuildErrorResponse(r, err) + } + defer closeBody(r) + + var res *model.ComplianceResponse + err = json.NewDecoder(r.Body).Decode(&res) + if err != nil { + return nil, BuildErrorResponse(r, err) + } + + return res, BuildResponse(r) +} From 96b790672b6cc843d6b9cbe1c6a3f31a1a00cd28 Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Fri, 23 Dec 2022 23:31:39 -0500 Subject: [PATCH 08/75] wip --- mattermost-plugin/go.mod | 85 +-- mattermost-plugin/go.sum | 535 ++---------------- server/api/compliance.go | 88 +-- server/app/boards.go | 12 - server/app/compliance.go | 15 + server/client/client.go | 21 +- server/go.mod | 1 - server/go.sum | 237 ++------ server/model/compliance.go | 83 ++- .../mattermostauthlayer.go | 102 ---- server/services/store/mockstore/mockstore.go | 48 ++ server/services/store/sqlstore/compliance.go | 230 ++++++++ .../services/store/sqlstore/public_methods.go | 15 + server/services/store/store.go | 8 +- 14 files changed, 524 insertions(+), 956 deletions(-) create mode 100644 server/app/compliance.go create mode 100644 server/services/store/sqlstore/compliance.go diff --git a/mattermost-plugin/go.mod b/mattermost-plugin/go.mod index b36f6db8d..0fd0a395e 100644 --- a/mattermost-plugin/go.mod +++ b/mattermost-plugin/go.mod @@ -12,136 +12,69 @@ require ( ) require ( - code.sajari.com/docconv v1.3.5 // indirect - github.com/JalfResi/justext v0.0.0-20221106200834-be571e3e3052 // indirect - github.com/Masterminds/semver/v3 v3.1.1 // indirect + github.com/BurntSushi/toml v1.2.0 // indirect github.com/Masterminds/squirrel v1.5.2 // indirect - github.com/PuerkitoBio/goquery v1.8.0 // indirect - github.com/RoaringBitmap/roaring v1.2.1 // indirect - github.com/advancedlogic/GoOse v0.0.0-20210820140952-9d5822d4a625 // indirect - github.com/andybalholm/brotli v1.0.4 // indirect - github.com/andybalholm/cascadia v1.3.1 // indirect - github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect - github.com/avct/uasurfer v0.0.0-20191028135549-26b5daa857f1 // indirect - github.com/aws/aws-sdk-go v1.44.138 // indirect - github.com/aymerick/douceur v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bits-and-blooms/bitset v1.3.3 // indirect github.com/blang/semver v3.5.1+incompatible // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/blevesearch/bleve/v2 v2.3.6-0.20221111171245-56dc9b25507e // indirect - github.com/blevesearch/bleve_index_api v1.0.5 // indirect - github.com/blevesearch/go-porterstemmer v1.0.3 // indirect - github.com/blevesearch/gtreap v0.1.1 // indirect - github.com/blevesearch/mmap-go v1.0.4 // indirect - github.com/blevesearch/scorch_segment_api/v2 v2.1.4 // indirect - github.com/blevesearch/segment v0.9.0 // indirect - github.com/blevesearch/snowballstem v0.9.0 // indirect - github.com/blevesearch/upsidedown_store_api v1.0.1 // indirect - github.com/blevesearch/vellum v1.0.9 // indirect - github.com/blevesearch/zapx/v11 v11.3.7 // indirect - github.com/blevesearch/zapx/v12 v12.3.7 // indirect - github.com/blevesearch/zapx/v13 v13.3.7 // indirect - github.com/blevesearch/zapx/v14 v14.3.7 // indirect - github.com/blevesearch/zapx/v15 v15.3.7 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect - github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3 // indirect - github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/disintegration/imaging v1.6.2 // indirect - github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/dyatlov/go-opengraph/opengraph v0.0.0-20220524092352-606d7b1e5f8a // indirect github.com/fatih/color v1.13.0 // indirect - github.com/fatih/set v0.2.1 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.15.0 // indirect - github.com/gigawattio/window v0.0.0-20180317192513-0f5467e35573 // indirect github.com/go-asn1-ber/asn1-ber v1.5.4 // indirect - github.com/go-redis/redis/v8 v8.11.5 // indirect - github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/go-sql-driver/mysql v1.6.0 // indirect github.com/golang-migrate/migrate/v4 v4.15.2 // indirect - github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/gopherjs/gopherjs v1.17.2 // indirect - github.com/gorilla/css v1.0.0 // indirect - github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/graph-gophers/graphql-go v1.4.0 // indirect - github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c // indirect github.com/hashicorp/go-hclog v1.3.1 // indirect github.com/hashicorp/go-plugin v1.4.6 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/jaytaylor/html2text v0.0.0-20211105163654-bc68cce691ba // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmoiron/sqlx v1.3.5 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/klauspost/compress v1.15.12 // indirect github.com/klauspost/cpuid/v2 v2.2.1 // indirect - github.com/klauspost/pgzip v1.2.5 // indirect github.com/krolaw/zipstream v0.0.0-20180621105154-0a2661891f94 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect - github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 // indirect - github.com/levigross/exp-html v0.0.0-20120902181939-8df60c69a8f5 // indirect github.com/lib/pq v1.10.7 // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404 // indirect github.com/mattermost/ldap v0.0.0-20201202150706-ee0e6284187d // indirect github.com/mattermost/logr/v2 v2.0.15 // indirect github.com/mattermost/morph v1.0.5-0.20221115094356-4c18a75b1f5e // indirect - github.com/mattermost/rsc v0.0.0-20160330161541-bbaefb05eaa0 // indirect github.com/mattermost/squirrel v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/mholt/archiver/v3 v3.5.1 // indirect - github.com/microcosm-cc/bluemonday v1.0.21 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/minio-go/v7 v7.0.43 // indirect github.com/minio/sha256-simd v1.0.0 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mschoch/smat v0.2.0 // indirect - github.com/nwaples/rardecode v1.1.3 // indirect github.com/oklog/run v1.1.0 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/oov/psd v0.0.0-20220121172623-5db5eafcecbb // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/otiai10/gosseract/v2 v2.4.0 // indirect github.com/pborman/uuid v1.2.1 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/philhofer/fwd v1.1.1 // indirect - github.com/pierrec/lz4/v4 v4.1.17 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.12.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.33.0 // indirect github.com/prometheus/procfs v0.7.3 // indirect - github.com/reflog/dateconstraints v0.2.1 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect - github.com/richardlehane/mscfb v1.0.4 // indirect - github.com/richardlehane/msoleps v1.0.3 // indirect - github.com/rivo/uniseg v0.4.3 // indirect - github.com/rs/cors v1.8.2 // indirect github.com/rs/xid v1.4.0 // indirect github.com/rudderlabs/analytics-go v3.3.3+incompatible // indirect - github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd // indirect github.com/segmentio/backo-go v1.0.1 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect @@ -150,31 +83,19 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.10.1 // indirect - github.com/splitio/go-client/v6 v6.2.1 // indirect - github.com/splitio/go-split-commons/v3 v3.1.0 // indirect - github.com/splitio/go-toolkit/v4 v4.2.0 // indirect - github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect - github.com/throttled/throttled v2.2.5+incompatible // indirect github.com/tidwall/gjson v1.14.3 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/tinylib/msgp v1.1.6 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - github.com/ulikunitz/xz v0.5.10 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/wiggin77/merror v1.0.4 // indirect github.com/wiggin77/srslog v1.0.1 // indirect - github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect github.com/yuin/goldmark v1.5.3 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - go.uber.org/atomic v1.10.0 // indirect golang.org/x/crypto v0.2.0 // indirect - golang.org/x/image v0.1.0 // indirect golang.org/x/mod v0.7.0 // indirect golang.org/x/net v0.2.0 // indirect golang.org/x/sync v0.1.0 // indirect @@ -184,9 +105,7 @@ require ( google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1 // indirect google.golang.org/grpc v1.50.1 // indirect google.golang.org/protobuf v1.28.1 // indirect - gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/mail.v2 v2.3.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/mattermost-plugin/go.sum b/mattermost-plugin/go.sum index e6f5d07fb..b77eb00dc 100644 --- a/mattermost-plugin/go.sum +++ b/mattermost-plugin/go.sum @@ -33,17 +33,14 @@ cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/errorreporting v0.2.0/go.mod h1:QkYzg92wgpJ0ChLdcO5LhtCEyYwq0tIa+jLrj6Nh5ME= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= @@ -56,9 +53,6 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -code.sajari.com/docconv v1.2.0 h1:4UFgUodoW/hZy8dgghiCSSrcKLJP3Imo6UYFatP0PqI= -code.sajari.com/docconv v1.2.0/go.mod h1:r8yfCP6OKbZ9Xkd87aBa4nfpk6ud/PoyLwex3n6cXSc= -code.sajari.com/docconv v1.3.5/go.mod h1:EDkTrwa2yO2O9EbVpD3dlHXDVcxbfKDWnDNE/8vbbP8= dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= @@ -87,16 +81,11 @@ github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935 github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= +github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= -github.com/HdrHistogram/hdrhistogram-go v0.9.0 h1:dpujRju0R4M/QZzcnR1LH1qm+TVG3UzkWdp5tH1WMcg= -github.com/JalfResi/justext v0.0.0-20170829062021-c0282dea7198 h1:8P+AjBhGByCuCX2zTkAf6UY+dj0JczX+t6cSdCSyvfw= -github.com/JalfResi/justext v0.0.0-20170829062021-c0282dea7198/go.mod h1:0SURuH1rsE8aVWvutuMZghRNrNrYEUzibzJfhEYR8L0= -github.com/JalfResi/justext v0.0.0-20221106200834-be571e3e3052/go.mod h1:0SURuH1rsE8aVWvutuMZghRNrNrYEUzibzJfhEYR8L0= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/squirrel v1.5.2 h1:UiOEi2ZX4RCSkpiNDQN5kro/XIBpSRk9iTqdIRPzUXE= github.com/Masterminds/squirrel v1.5.2/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= @@ -125,21 +114,11 @@ github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:m github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/goquery v1.4.1/go.mod h1:T9ezsOHcCrDCgA8aF1Cqr3sSYbO/xgdy8/R/XiIMAhA= -github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= -github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U= -github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/RoaringBitmap/roaring v0.9.4/go.mod h1:icnadbWcNyfEHlYdr+tDlOTih1Bf/h+rzPpv4sbomAA= -github.com/RoaringBitmap/roaring v1.2.1 h1:58/LJlg/81wfEHd5L9qsHduznOIhyv4qb1yWcSvVq9A= -github.com/RoaringBitmap/roaring v1.2.1/go.mod h1:icnadbWcNyfEHlYdr+tDlOTih1Bf/h+rzPpv4sbomAA= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/advancedlogic/GoOse v0.0.0-20191112112754-e742535969c1/go.mod h1:f3HCSN1fBWjcpGtXyM119MJgeQl838v6so/PQOqvE1w= -github.com/advancedlogic/GoOse v0.0.0-20210820140952-9d5822d4a625 h1:LZIP5Bj5poWWRZ8fcL4ZwCupb4FwcTFK2RCTxkGnCX8= -github.com/advancedlogic/GoOse v0.0.0-20210820140952-9d5822d4a625/go.mod h1:f3HCSN1fBWjcpGtXyM119MJgeQl838v6so/PQOqvE1w= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -148,34 +127,17 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= -github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= -github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= -github.com/andybalholm/cascadia v1.2.0/go.mod h1:YCyR8vOZT9aZ1CHEd8ap0gMVm2aFgxBp0T0eFw1RUQY= -github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= -github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20210818145353-234c94e4ce64/go.mod h1:2qMFB56yOP3KzkB3PbYZ4AlUFg3a88F67TIx5lB/WwY= github.com/apache/arrow/go/arrow v0.0.0-20211013220434-5962184e7a30/go.mod h1:Q7yQnSMnLvcXlZ8RV+jwz/6y1rQTqbX6C82SndT52Zs= -github.com/araddon/dateparse v0.0.0-20180729174819-cfd92a431d0e/go.mod h1:SLqhdZcd+dF3TEVL2RMoob5bBP5R1P1qkox+HtCBgGI= -github.com/araddon/dateparse v0.0.0-20200409225146-d820a6159ab1/go.mod h1:SLqhdZcd+dF3TEVL2RMoob5bBP5R1P1qkox+HtCBgGI= -github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhPwqqXc4/vE0f7GvRjuAsbW+HOIe8KnA= -github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/avct/uasurfer v0.0.0-20191028135549-26b5daa857f1 h1:9h8f71kuF1pqovnn9h7LTHLEjxzyQaj0j1rQq5nsMM4= -github.com/avct/uasurfer v0.0.0-20191028135549-26b5daa857f1/go.mod h1:noBAuukeYOXa0aXGqxr24tADqkwDO2KRD15FsuaZ5a8= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.44.34 h1:+ZtWIbtSGLNB99P8eBrxXfJZgiIouzUbpkf/MNxq2yQ= -github.com/aws/aws-sdk-go v1.44.34/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.138/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v1.8.0/go.mod h1:xEFuWz+3TYdlPRuo+CqATbeDWIWyaT5uAPwPaWtgse0= github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/config v1.6.0/go.mod h1:TNtBVmka80lRPk5+S9ZqVfFszOQAGJJ9KbT3EM3CHNU= @@ -202,8 +164,6 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.6.1/go.mod h1:hLZ/AnkIKHLuPGjEiyghNE github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= github.com/aws/smithy-go v1.7.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= -github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -214,11 +174,6 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bits-and-blooms/bitset v1.2.2 h1:J5gbX05GpMdBjCvQ9MteIg2KKDExr7DrgK+Yc15FvIk= -github.com/bits-and-blooms/bitset v1.2.2/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bits-and-blooms/bitset v1.3.1/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bits-and-blooms/bitset v1.3.3/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bits-and-blooms/bloom/v3 v3.3.1/go.mod h1:bhUUknWd5khVbTe4UgMCSiOOVJzr3tMoijSK3WwvW90= github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= @@ -226,57 +181,6 @@ github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdn github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/blevesearch/bleve/v2 v2.3.2 h1:BJUnMhi2nrkl+vboHmKfW+9l+tJSj39HeWa5c3BN3/Y= -github.com/blevesearch/bleve/v2 v2.3.2/go.mod h1:96+xE5pZUOsr3Y4vHzV1cBC837xZCpwLlX0hrrxnvIg= -github.com/blevesearch/bleve/v2 v2.3.6-0.20221111171245-56dc9b25507e/go.mod h1:mfCWvuwg/XnPVZHEejATm5TyFqyeLmm8p9Y3xDvwz4k= -github.com/blevesearch/bleve_index_api v1.0.1/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= -github.com/blevesearch/bleve_index_api v1.0.2 h1:rO736FwEPMVY1mGi7d4n7CgBB3+tB7uYN7QTjR+Ij+s= -github.com/blevesearch/bleve_index_api v1.0.2/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= -github.com/blevesearch/bleve_index_api v1.0.5/go.mod h1:YXMDwaXFFXwncRS8UobWs7nvo0DmusriM1nztTlj1ms= -github.com/blevesearch/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:9eJDeqxJ3E7WnLebQUlPD7ZjSce7AnDb9vjGmMCbD0A= -github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo= -github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= -github.com/blevesearch/goleveldb v1.0.1/go.mod h1:WrU8ltZbIp0wAoig/MHbrPCXSOLpe79nz5lv5nqfYrQ= -github.com/blevesearch/gtreap v0.1.1 h1:2JWigFrzDMR+42WGIN/V2p0cUvn4UP3C4Q5nmaZGW8Y= -github.com/blevesearch/gtreap v0.1.1/go.mod h1:QaQyDRAT51sotthUWAH4Sj08awFSSWzgYICSZ3w0tYk= -github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= -github.com/blevesearch/mmap-go v1.0.3/go.mod h1:pYvKl/grLQrBxuaRYgoTssa4rVujYYeenDp++2E+yvs= -github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc= -github.com/blevesearch/mmap-go v1.0.4/go.mod h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs= -github.com/blevesearch/scorch_segment_api/v2 v2.1.0 h1:NFwteOpZEvJk5Vg0H6gD0hxupsG3JYocE4DBvsA2GZI= -github.com/blevesearch/scorch_segment_api/v2 v2.1.0/go.mod h1:uch7xyyO/Alxkuxa+CGs79vw0QY8BENSBjg6Mw5L5DE= -github.com/blevesearch/scorch_segment_api/v2 v2.1.4/go.mod h1:PgVnbbg/t1UkgezPDu8EHLi1BHQ17xUwsFdU6NnOYS0= -github.com/blevesearch/segment v0.9.0 h1:5lG7yBCx98or7gK2cHMKPukPZ/31Kag7nONpoBt22Ac= -github.com/blevesearch/segment v0.9.0/go.mod h1:9PfHYUdQCgHktBgvtUOF4x+pc4/l8rdH0u5spnW85UQ= -github.com/blevesearch/snowball v0.6.1/go.mod h1:ZF0IBg5vgpeoUhnMza2v0A/z8m1cWPlwhke08LpNusg= -github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s= -github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs= -github.com/blevesearch/upsidedown_store_api v1.0.1 h1:1SYRwyoFLwG3sj0ed89RLtM15amfX2pXlYbFOnF8zNU= -github.com/blevesearch/upsidedown_store_api v1.0.1/go.mod h1:MQDVGpHZrpe3Uy26zJBf/a8h0FZY6xJbthIMm8myH2Q= -github.com/blevesearch/vellum v1.0.7/go.mod h1:doBZpmRhwTsASB4QdUZANlJvqVAUdUyX0ZK7QJCTeBE= -github.com/blevesearch/vellum v1.0.8 h1:iMGh4lfxza4BnWO/UJTMPlI3HsK9YawjPv+TteVa9ck= -github.com/blevesearch/vellum v1.0.8/go.mod h1:+cpRi/tqq49xUYSQN2P7A5zNSNrS+MscLeeaZ3J46UA= -github.com/blevesearch/vellum v1.0.9/go.mod h1:ul1oT0FhSMDIExNjIxHqJoGpVrBpKCdgDQNxfqgJt7k= -github.com/blevesearch/zapx/v11 v11.3.3/go.mod h1:YzTfUm4kS3e8OmTXDHVV8OzC5MWPO/VPJZQgPNVb4Lc= -github.com/blevesearch/zapx/v11 v11.3.4 h1:MjYFN8fwDajRgeUsKMfW673zI6MI3twy0pCsUH/LXgc= -github.com/blevesearch/zapx/v11 v11.3.4/go.mod h1:HJ7qdfBxdziuymKvXbsBVhCK5pB98tdzQbc8pJV6tJo= -github.com/blevesearch/zapx/v11 v11.3.7/go.mod h1:Xk9Z69AoAWIOvWudNDMlxJDqSYGf90LS0EfnaAIvXCA= -github.com/blevesearch/zapx/v12 v12.3.3/go.mod h1:RMl6lOZqF+sTxKvhQDJ5yK2LT3Mu7E2p/jGdjAaiRxs= -github.com/blevesearch/zapx/v12 v12.3.4 h1:OpPoHQjsjvDImDzwKZXTXubIPJz28EaRynJGJSS6mvU= -github.com/blevesearch/zapx/v12 v12.3.4/go.mod h1:uQrKrK9XjXAAsJfAIE8ViLqIKP/keA2DQhS1XXpjkwA= -github.com/blevesearch/zapx/v12 v12.3.7/go.mod h1:SgEtYIBGvM0mgIBn2/tQE/5SdrPXaJUaT/kVqpAPxm0= -github.com/blevesearch/zapx/v13 v13.3.3/go.mod h1:eppobNM35U4C22yDvTuxV9xPqo10pwfP/jugL4INWG4= -github.com/blevesearch/zapx/v13 v13.3.4 h1:f646k6300VGRIR7eJ6lLtF8UC95NIWmF899j49o7PJA= -github.com/blevesearch/zapx/v13 v13.3.4/go.mod h1:Wl7hO1gT+IDvJb7i06g2iW5Qvw0KzncJPsBx7WGWhLA= -github.com/blevesearch/zapx/v13 v13.3.7/go.mod h1:yyrB4kJ0OT75UPZwT/zS+Ru0/jYKorCOOSY5dBzAy+s= -github.com/blevesearch/zapx/v14 v14.3.3/go.mod h1:zXNcVzukh0AvG57oUtT1T0ndi09H0kELNaNmekEy0jw= -github.com/blevesearch/zapx/v14 v14.3.4 h1:/FVzSGFG5rbVWfPEqlcaJd8lZSJMQpTdmFhz/l2QI7w= -github.com/blevesearch/zapx/v14 v14.3.4/go.mod h1:b1YhRXXhAj9i+9aOwhRKCHUmJyYieK/QbDvPJDLddUk= -github.com/blevesearch/zapx/v14 v14.3.7/go.mod h1:9J/RbOkqZ1KSjmkOes03AkETX7hrXT0sFMpWH4ewC4w= -github.com/blevesearch/zapx/v15 v15.3.3/go.mod h1:C+f/97ZzTzK6vt/7sVlZdzZxKu+5+j4SrGCvr9dJzaY= -github.com/blevesearch/zapx/v15 v15.3.4 h1:/y6AOxRuBiZPFAItqcrKcXPPtlAwuW/jMoOFO7tc7rs= -github.com/blevesearch/zapx/v15 v15.3.4/go.mod h1:TQ/qDC2q7TSSpeC6Vgr9fDN56Ra0u49lZJQ4v30WEx4= -github.com/blevesearch/zapx/v15 v15.3.7/go.mod h1:m7Y6m8soYUvS7MjN9eKlz1xrLCcmqfFadmu7GhWIrLY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= @@ -427,7 +331,6 @@ github.com/containers/ocicrypt v1.1.2/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q= @@ -444,9 +347,6 @@ github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/couchbase/ghistogram v0.1.0/go.mod h1:s1Jhy76zqfEecpNWJfWUiKZookAFaiGOEoyzgHt9i7k= -github.com/couchbase/moss v0.2.0/go.mod h1:9MaHIaRuy9pvLPUJxB8sh8OrLfyDczECVL37grCIubs= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -466,16 +366,9 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3 h1:AqeKSZIG/NIC75MNQlPy/LM3LxfpLwahICJBHwSMFNc= -github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3/go.mod h1:hEfFauPHz7+NnjR/yHJGhrKo1Za+zStgwUETx3yzqgY= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dhui/dktest v0.3.10/go.mod h1:h5Enh0nG3Qbo9WjNFRrwmKUaePEBhXMOygbz3Ww7Sz0= -github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= -github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= @@ -494,9 +387,6 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY= -github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= -github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -515,7 +405,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -524,11 +413,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/set v0.2.1 h1:nn2CaJyknWE/6txyUDGwysr3G5QC6xWB/PtVjPBbeaA= -github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -540,8 +425,7 @@ github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiD github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= @@ -549,20 +433,13 @@ github.com/gabriel-vasile/mimetype v1.3.1/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmx github.com/gabriel-vasile/mimetype v1.4.0/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmxRtOJlERCzSmRvr8= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/getsentry/sentry-go v0.13.0 h1:20dgTiUSfxRB/EhMPtxcL9ZEbM1ZdR+W/7f7NWD+xWo= -github.com/getsentry/sentry-go v0.13.0/go.mod h1:EOsfu5ZdvKPfeHYV6pTVQnsjfp30+XA7//UooKNumH0= -github.com/getsentry/sentry-go v0.15.0/go.mod h1:RZPJKSw+adu8PBNygiri/A98FqVr2HtRckJk9XVxJ9I= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gigawattio/window v0.0.0-20180317192513-0f5467e35573 h1:u8AQ9bPa9oC+8/A/jlWouakhIvkFfuxgIIRjiy8av7I= -github.com/gigawattio/window v0.0.0-20180317192513-0f5467e35573/go.mod h1:eBvb3i++NHDH4Ugo9qCvMw8t0mTSctaEa5blJbWcNxs= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-asn1-ber/asn1-ber v1.3.2-0.20191121212151-29be175fc3a3/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-asn1-ber/asn1-ber v1.5.4 h1:vXT6d/FNDiELJnLb6hGNa309LMsrCoYFvpwHDF0+Y1A= github.com/go-asn1-ber/asn1-ber v1.5.4/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -603,13 +480,6 @@ github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dp github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-redis/redis/v8 v8.0.0/go.mod h1:isLoQT/NFSP7V67lyvM9GmdvLdyZ7pEhsXvvyQtnQTo= -github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= -github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= -github.com/go-resty/resty/v2 v2.0.0/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= -github.com/go-resty/resty/v2 v2.3.0/go.mod h1:UpN9CgLZNsv4e9XG50UU8xdI0F43UQ4HmxLBDwaroHU= -github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= -github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= @@ -663,7 +533,6 @@ github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw github.com/golang-migrate/migrate/v4 v4.15.2 h1:vU+M05vs6jWHKDdmE1Ecwj0BznygFc4QsdRe2E/L7kc= github.com/golang-migrate/migrate/v4 v4.15.2/go.mod h1:f2toGLkYqD3JH+Todi4aZ2ZdbeUNx4sIwiOK96rE9Lw= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -703,13 +572,9 @@ github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= @@ -726,9 +591,9 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-github/v39 v39.2.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE= @@ -753,7 +618,6 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -775,14 +639,8 @@ github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2c github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= -github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= -github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= -github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -804,8 +662,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpg github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c h1:fEE5/5VNnYUoBOj2I9TP8Jc+a7lge3QWn9DKE7NCwfc= -github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c/go.mod h1:ObS/W+h8RYb1Y7fYivughjxojTmIu5iAIjSrSLCLeqE= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -814,8 +670,7 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw= -github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.3.1 h1:vDwF1DFNZhntP4DAjuTpOw3uEgMUpXh1pB5fW9DqHpo= github.com/hashicorp/go-hclog v1.3.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= @@ -823,8 +678,7 @@ github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1: github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.4 h1:NVdrSdFRt3SkZtNckJ6tog7gbpRrcbOjQi/rgF7JYWQ= -github.com/hashicorp/go-plugin v1.4.4/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.4.6 h1:MDV3UrKQBM3du3G7MApDGvOsMYy3JQJ4exhSoKBAeVA= github.com/hashicorp/go-plugin v1.4.6/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -834,16 +688,13 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 h1:xixZ2bWeofWV68J+x6AzmKuVM/JWCQwkWm6GW/MUR6I= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= @@ -901,10 +752,6 @@ github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0f github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk= -github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk= -github.com/jaytaylor/html2text v0.0.0-20211105163654-bc68cce691ba h1:QFQpJdgbON7I0jr2hYW7Bs+XV0qjc3d5tZoDnRFnqTg= -github.com/jaytaylor/html2text v0.0.0-20211105163654-bc68cce691ba/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= @@ -912,9 +759,7 @@ github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jmoiron/sqlx v1.3.1/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= @@ -950,25 +795,18 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= -github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM= github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.13 h1:1XxvOiqXZ8SULZUKim/wncr3wZ38H4yCuVDvKdK9OGs= -github.com/klauspost/cpuid/v2 v2.0.13/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= +github.com/klauspost/cpuid/v2 v2.2.1 h1:U33DW0aiEj633gHYw3LoDNfkDiYnE5Q8M/TKJn2f2jI= github.com/klauspost/cpuid/v2 v2.2.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= -github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -992,18 +830,13 @@ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= -github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 h1:6Yzfa6GP0rIo/kULo2bwGEkFvCePZ3qHDDTC3/J9Swo= -github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= -github.com/levigross/exp-html v0.0.0-20120902181939-8df60c69a8f5 h1:W7p+m/AECTL3s/YR5RpQ4hz5SjNeKzZBl1q36ws12s0= -github.com/levigross/exp-html v0.0.0-20120902181939-8df60c69a8f5/go.mod h1:QMe2wuKJ0o7zIVE8AqiT8rd8epmm6WDIZ2wyuBqYPzM= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= -github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= @@ -1032,18 +865,10 @@ github.com/mattermost/logr/v2 v2.0.15 h1:+WNbGcsc3dBao65eXlceB6dTILNJRIrvubnsTl3 github.com/mattermost/logr/v2 v2.0.15/go.mod h1:mpPp935r5dIkFDo2y9Q87cQWhFR/4xXpNh0k/y8Hmwg= github.com/mattermost/mattermost-plugin-api v0.0.29-0.20220801143717-73008cfda2fb h1:q1qXKVv59rA2gcQ7lVLc5OlWBmfsR3i8mdGD5EZesyk= github.com/mattermost/mattermost-plugin-api v0.0.29-0.20220801143717-73008cfda2fb/go.mod h1:PIeo40t9VTA4Wu1FwjzH7QmcgC3SRyk/ohCwJw4/oSo= -github.com/mattermost/mattermost-server/v6 v6.0.0-20220802151854-f07c31c5d933 h1:h7EibO8cwWeK8dLhC/A5tKGbkYSuJKZ0+2EXW7jDHoA= -github.com/mattermost/mattermost-server/v6 v6.0.0-20220802151854-f07c31c5d933/go.mod h1:otnBnKY9Y0eNkUKeD161de+BUBlESwANTnrkPT/392Y= -github.com/mattermost/mattermost-server/v6 v6.0.0-20221130200243-06e964b86b0d h1:CKJXDUCkRrfy1U9sZHOpvACOtkthV5iWt2boHUK720I= -github.com/mattermost/mattermost-server/v6 v6.0.0-20221130200243-06e964b86b0d/go.mod h1:U3gSM0I15WSMHPpDEU30mmc4JrbSDk+8F1+MFLOHWD0= github.com/mattermost/mattermost-server/v6 v6.0.0-20221214122404-8d90c7042f93 h1:mGN2D6KhjKosQdZ+BHzmWxsA/tRK9FiR+nUd38nSZQY= github.com/mattermost/mattermost-server/v6 v6.0.0-20221214122404-8d90c7042f93/go.mod h1:U3gSM0I15WSMHPpDEU30mmc4JrbSDk+8F1+MFLOHWD0= -github.com/mattermost/morph v0.0.0-20220401091636-39f834798da8 h1:gwliVjCTqAC01mSCNqa5nJ/4MmGq50vrjsottIhQ4d8= -github.com/mattermost/morph v0.0.0-20220401091636-39f834798da8/go.mod h1:jxM3g1bx+k2Thz7jofcHguBS8TZn5Pc+o5MGmORObhw= github.com/mattermost/morph v1.0.5-0.20221115094356-4c18a75b1f5e h1:VfNz+fvJ3DxOlALM22Eea8ONp5jHrybKBCcCtDPVlss= github.com/mattermost/morph v1.0.5-0.20221115094356-4c18a75b1f5e/go.mod h1:xo0ljDknTpPxEdhhrUdwhLCexIsYyDKS6b41HqG8wGU= -github.com/mattermost/rsc v0.0.0-20160330161541-bbaefb05eaa0 h1:G9tL6JXRBMzjuD1kkBtcnd42kUiT6QDwxfFYu7adM6o= -github.com/mattermost/rsc v0.0.0-20160330161541-bbaefb05eaa0/go.mod h1:nV5bfVpT//+B1RPD2JvRnxbkLmJEYXmRaaVl15fsXjs= github.com/mattermost/squirrel v0.2.0 h1:8ZWeyf+MWQ2cL7hu9REZgLtz2IJi51qqZEovI3T3TT8= github.com/mattermost/squirrel v0.2.0/go.mod h1:NPPtk+CdpWre4GxMGoOpzEVFVc0ZoEFyJBZGCtn9nSU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -1052,8 +877,8 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -1063,23 +888,15 @@ github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.10/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= @@ -1088,25 +905,18 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= -github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo= -github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/microcosm-cc/bluemonday v1.0.18 h1:6HcxvXDAi3ARt3slx6nTesbvorIc3QeTzBNRvWktHBo= -github.com/microcosm-cc/bluemonday v1.0.18/go.mod h1:Z0r70sCuXHig8YpBzCc5eGHAap2K7e/u082ZUpDRRqM= -github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.28 h1:VMr3K5qGIEt+/KW3poopRh8mzi5RwuCjmrmstK196Fg= -github.com/minio/minio-go/v7 v7.0.28/go.mod h1:x81+AX5gHSfCSqw7jxRKHvxUXMlE5uKX0Vb75Xk5yYg= +github.com/minio/minio-go/v7 v7.0.43 h1:14Q4lwblqTdlAmba05oq5xL0VBLHi06zS4yLnIkz6hI= github.com/minio/minio-go/v7 v7.0.43/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= @@ -1140,8 +950,6 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= -github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mutecomm/go-sqlcipher/v4 v4.4.0/go.mod h1:PyN04SaWalavxRGH9E8ZftG6Ju7rsPrGmQRjrEaVpiY= @@ -1154,24 +962,15 @@ github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJE github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba/go.mod h1:ncO5VaFWh0Nrt+4KT4mOZboaczBZcLuHrG+/sUeP8gI= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= -github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc= -github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.0-20180506121414-d4647c9c7a84/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -1180,27 +979,16 @@ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0 github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/oov/psd v0.0.0-20220121172623-5db5eafcecbb h1:JF9kOhBBk4WPF7luXFu5yR+WgaFm9L/KiHJHhU9vDwA= -github.com/oov/psd v0.0.0-20220121172623-5db5eafcecbb/go.mod h1:GHI1bnmAcbp96z6LNfBJvtrjxhaXGkbsk967utPlvL8= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1229,21 +1017,8 @@ github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3 github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/gosseract/v2 v2.2.4/go.mod h1:ahOp/kHojnOMGv1RaUnR0jwY5JVa6BYKhYAS8nbMLSo= -github.com/otiai10/gosseract/v2 v2.3.1 h1:BFy9Rru7dzqEYX7/tJuEvjVPkkJck0f+b5fYzzr6/RM= -github.com/otiai10/gosseract/v2 v2.3.1/go.mod h1:2ZOGgdTIXQzCS5f+N1HkcXRgDX6K3ZoYe3Yvo++cpp4= -github.com/otiai10/gosseract/v2 v2.4.0 h1:gYd3mx6FuMtIlxL4sYb9JLCFEDzg09VgNSZRNbqpiGM= -github.com/otiai10/gosseract/v2 v2.4.0/go.mod h1:fhbIDRh29bj13vni6RT3gtWKjKCAeqDYI4C1dxeJuek= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.2 h1:VYWnrP5fXmz1MXvjuUvcBrXSjGE6xjON+axB/UrpO3E= -github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/otiai10/mint v1.3.3 h1:7JgpsBaN0uMkyju4tbYHu0mnM55hNKVYLsXmwr15NQI= -github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= @@ -1259,12 +1034,7 @@ github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE= -github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1321,55 +1091,35 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/reflog/dateconstraints v0.2.1 h1:Hz1n2Q1vEm0Rj5gciDQcCN1iPBwfFjxUJy32NknGP/s= -github.com/reflog/dateconstraints v0.2.1/go.mod h1:Ax8AxTBcJc3E/oVS2hd2j7RDM/5MDtuPwuR7lIHtPLo= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/richardlehane/mscfb v1.0.3/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= -github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM= -github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= -github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= -github.com/richardlehane/msoleps v1.0.3 h1:aznSZzrwYRl3rLKRT3gUk9am7T/mLNSnJINvN0AQoVM= -github.com/richardlehane/msoleps v1.0.3/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= -github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw= -github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= -github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rudderlabs/analytics-go v3.3.2+incompatible h1:bDajEJTYhfHjNYxbQFMA/2dHlOjyeSgxS7GPIdMZ52Q= -github.com/rudderlabs/analytics-go v3.3.2+incompatible/go.mod h1:LF8/ty9kUX4PTY3l5c97K3nZZaX5Hwsvt+NBaRL/f30= +github.com/rudderlabs/analytics-go v3.3.3+incompatible h1:OG0XlKoXfr539e2t1dXtTB+Gr89uFW+OUNQBVhHIIBY= github.com/rudderlabs/analytics-go v3.3.3+incompatible/go.mod h1:LF8/ty9kUX4PTY3l5c97K3nZZaX5Hwsvt+NBaRL/f30= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= -github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc= -github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= -github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4/go.mod h1:C1a7PQSMz9NShzorzCiG2fk9+xuCgLkPeCvMHYR2OWg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3 h1:ZuhckGJ10ulaKkdvJtiAqsLTiPrLaXSdnVgXJKJkTxE= -github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3/go.mod h1:9/Rh6yILuLysoQnZ2oNooD2g7aBnvM7r/fNVxRNWfBc= +github.com/segmentio/backo-go v1.0.1 h1:68RQccglxZeyURy93ASB/2kc9QudzgIDexJ927N++y4= github.com/segmentio/backo-go v1.0.1/go.mod h1:9/Rh6yILuLysoQnZ2oNooD2g7aBnvM7r/fNVxRNWfBc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= @@ -1400,7 +1150,6 @@ github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go. github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -1409,8 +1158,8 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -1432,7 +1181,6 @@ github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -1444,30 +1192,18 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= -github.com/splitio/go-client/v6 v6.1.0 h1:hxDqrMfYlyuJNtfml4chl2LXGL2urxMBfP8WpLS55Zo= -github.com/splitio/go-client/v6 v6.1.0/go.mod h1:CEGAEFT99Fwb32ZIRcnZoXTMXddtB6IIpTmt3RP8mnM= -github.com/splitio/go-client/v6 v6.2.1/go.mod h1:+HnGMevmSUk56va2egs9W2s9mJ7LW9IXiDPB1ExOi+k= -github.com/splitio/go-split-commons/v3 v3.1.0 h1:MDudl8YIjyB7By0/3Rv2wi5WZDbbjak+12NDfQPYy5A= -github.com/splitio/go-split-commons/v3 v3.1.0/go.mod h1:29NCy20oAS4ZMy4qkwTd6277eieVDonx4V/aeDU/wUQ= -github.com/splitio/go-split-commons/v4 v4.2.0/go.mod h1:mzanM00PV8t1FL6IHc2UXepIH2z79d49ArZ2LoJHGrY= -github.com/splitio/go-toolkit/v4 v4.2.0 h1:DnC7zQXR7Be9i9bZzXBuUUpaJ21EYku2oGSsIiG8Wc0= -github.com/splitio/go-toolkit/v4 v4.2.0/go.mod h1:EdIHN0yzB1GTXDYQc0KdKvnjkO/jfUM2YqHVYfhD3Wo= -github.com/splitio/go-toolkit/v5 v5.2.2/go.mod h1:SYi/svhhtEgdMSb5tNcDcMjOSUH/7XVkvjp5dPL+nBE= -github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf h1:pvbZ0lM0XWPBqUKqFU8cmavspvIl9nulOYwdy6IFRRo= -github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02nZ62WenDCkgHFerpIOmW0iT7GKmXM= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -1478,8 +1214,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -1488,16 +1224,13 @@ github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/throttled/throttled v2.2.5+incompatible h1:65UB52X0qNTYiT0Sohp8qLYVFwZQPDw85uSa65OljjQ= -github.com/throttled/throttled v2.2.5+incompatible/go.mod h1:0BjlrEGQmvxps+HuXLsyRdqpSRvJpq0PNIsOtqP9Nos= -github.com/tidwall/gjson v1.14.1 h1:iymTbGkQBhveq21bEvAQ81I0LEBork8BFe1CUZXdyuo= -github.com/tidwall/gjson v1.14.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw= github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tinylib/msgp v1.1.6 h1:i+SbKraHhnrf9M5MYmvQhFnbLhAXSDWF8WWsuyRdocw= github.com/tinylib/msgp v1.1.6/go.mod h1:75BAfg2hauQhs3qedfdDZmWAPcFMAvJE5b9rGOMufyw= @@ -1505,17 +1238,7 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= -github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= -github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= -github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= -github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -1535,8 +1258,7 @@ github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/wiggin77/merror v1.0.2/go.mod h1:uQTcIU0Z6jRK4OwqganPYerzQxSFJ4GSHM3aurxxQpg= -github.com/wiggin77/merror v1.0.3 h1:8+ZHV+aSnJoYghE3EUThl15C6rvF2TYRSvOSBjdmNR8= -github.com/wiggin77/merror v1.0.3/go.mod h1:H2ETSu7/bPE0Ymf4bEwdUoo73OOEkdClnoRisfw0Nm0= +github.com/wiggin77/merror v1.0.4 h1:XxFLEevmQQfgJW2AxhapuMG7C1fQqfbim/XyUmYv/ZM= github.com/wiggin77/merror v1.0.4/go.mod h1:H2ETSu7/bPE0Ymf4bEwdUoo73OOEkdClnoRisfw0Nm0= github.com/wiggin77/srslog v1.0.1 h1:gA2XjSMy3DrRdX9UqLuDtuVAAshb8bE1NhX1YK0Qe+8= github.com/wiggin77/srslog v1.0.1/go.mod h1:fehkyYDq1QfuYn60TDPu9YdY2bB85VUW2mvN1WynEls= @@ -1549,8 +1271,6 @@ github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6 github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= -github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c h1:3lbZUMbMiGUW/LMkfsEABsc5zNT9+b1CvsJx47JzJ8g= @@ -1561,9 +1281,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.12 h1:6hffw6vALvEDqJ19dOJvJKOoAOKe4NDaTqvd2sktGN0= -github.com/yuin/goldmark v1.4.12/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.5.3 h1:3HUJmBFbQW9fhQOzMgseU134xfi6hU+mjWywx5Ty+/M= github.com/yuin/goldmark v1.5.3/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= @@ -1573,7 +1291,6 @@ gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2 go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -1597,7 +1314,6 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= go.opentelemetry.io/otel v1.6.3/go.mod h1:7BgNga5fNlF/iZjG06hM3yofffp0ofKCDwSXx1GC4dI= @@ -1621,9 +1337,7 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1640,7 +1354,6 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -1664,8 +1377,7 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.2.0 h1:BRXPfhNivWL5Yq0BGQ39a2sW6t44aODpfxkWjYdzewE= golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1681,20 +1393,15 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20200908183739-ae8ad444f925/go.mod h1:1phAWC201xIgDyaFpmDeZkgf70Q4Pd/CNqfRtVPtxNw= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20220601225756-64ec528b34cd h1:9NbNcTg//wfC5JskFW4Z3sqwVnjmJKHxLAol1bW2qgw= -golang.org/x/image v0.0.0-20220601225756-64ec528b34cd/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY= -golang.org/x/image v0.1.0/go.mod h1:iyPr49SD/G/TBxYVB/9RRtGUT5eNbo2u4NamWeQcD5c= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -1716,13 +1423,11 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1767,7 +1472,6 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -1790,18 +1494,13 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220614195744-fb05da6f9022 h1:0qjDla5xICC2suMtyRH/QqX3B1btXTfNsIt/i4LFgO0= -golang.org/x/net v0.0.0-20220614195744-fb05da6f9022/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1837,9 +1536,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180224232135-f6cff0780e54/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1850,8 +1547,6 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1956,7 +1651,6 @@ golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210818153620-00dd8d7831e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1966,30 +1660,22 @@ golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220317061510-51cd9980dadf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098 h1:PgOr27OhUx2IRqGJ2RxAWI4dJQ7bi9cSrB82uzFzfUA= -golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1998,8 +1684,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2092,9 +1778,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY= -golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2102,7 +1786,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= @@ -2144,8 +1827,6 @@ google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/appengine v1.0.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2231,13 +1912,9 @@ google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220614165028-45ed7f3ff16e h1:ubR4JUtqN3ffdFjpKylv8scWk/mZstGmzXbgYSkuMl0= -google.golang.org/genproto v0.0.0-20220614165028-45ed7f3ff16e/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1 h1:jCw9YRd2s40X9Vxi4zKsPRvSPlHWNqadVkpbMsCPzPQ= google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -2274,10 +1951,8 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -2293,13 +1968,10 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= -gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2314,19 +1986,14 @@ gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKW gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= -gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mail.v2 v2.3.1 h1:WYFn/oANrAGP2C0dcV6/pbkPzv8yGzqTjPmTeO7qoXk= -gopkg.in/mail.v2 v2.3.1/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= -gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -2408,81 +2075,14 @@ lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/b v1.0.0/go.mod h1:uZWcZfRj1BpYzfN9JTerzlNUnnPsV9O2ZA8JsRcubNg= modernc.org/cc/v3 v3.32.4/go.mod h1:0R6jl1aZlIl2avnYfbfHBS1QB6/f+16mihBObaBC878= -modernc.org/cc/v3 v3.33.6/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.33.9/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.33.11/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.34.0/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.0/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.4/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.5/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.7/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.8/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.10/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.15/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.16/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.17/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.18/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.20/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.22/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.24 h1:vlCqjhVwX15t1uwlMPpOpNRC7JTjMZ9lT9DYHKQTFuA= -modernc.org/cc/v3 v3.35.24/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/cc/v3 v3.36.0 h1:0kmRkTmqNidmu3c7BNDSdVHCxXCkWLmWmCIVX4LUboo= modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= modernc.org/ccgo/v3 v3.9.2/go.mod h1:gnJpy6NIVqkETT+L5zPsQFj7L2kkhfPMzOghRNv/CFo= -modernc.org/ccgo/v3 v3.9.5/go.mod h1:umuo2EP2oDSBnD3ckjaVUXMrmeAw8C8OSICVa0iFf60= -modernc.org/ccgo/v3 v3.10.0/go.mod h1:c0yBmkRFi7uW4J7fwx/JiijwOjeAeR2NoSaRVFPmjMw= -modernc.org/ccgo/v3 v3.11.0/go.mod h1:dGNposbDp9TOZ/1KBxghxtUp/bzErD0/0QW4hhSaBMI= -modernc.org/ccgo/v3 v3.11.1/go.mod h1:lWHxfsn13L3f7hgGsGlU28D9eUOf6y3ZYHKoPaKU0ag= -modernc.org/ccgo/v3 v3.11.3/go.mod h1:0oHunRBMBiXOKdaglfMlRPBALQqsfrCKXgw9okQ3GEw= -modernc.org/ccgo/v3 v3.12.4/go.mod h1:Bk+m6m2tsooJchP/Yk5ji56cClmN6R1cqc9o/YtbgBQ= -modernc.org/ccgo/v3 v3.12.6/go.mod h1:0Ji3ruvpFPpz+yu+1m0wk68pdr/LENABhTrDkMDWH6c= -modernc.org/ccgo/v3 v3.12.8/go.mod h1:Hq9keM4ZfjCDuDXxaHptpv9N24JhgBZmUG5q60iLgUo= -modernc.org/ccgo/v3 v3.12.11/go.mod h1:0jVcmyDwDKDGWbcrzQ+xwJjbhZruHtouiBEvDfoIsdg= -modernc.org/ccgo/v3 v3.12.14/go.mod h1:GhTu1k0YCpJSuWwtRAEHAol5W7g1/RRfS4/9hc9vF5I= -modernc.org/ccgo/v3 v3.12.18/go.mod h1:jvg/xVdWWmZACSgOiAhpWpwHWylbJaSzayCqNOJKIhs= -modernc.org/ccgo/v3 v3.12.20/go.mod h1:aKEdssiu7gVgSy/jjMastnv/q6wWGRbszbheXgWRHc8= -modernc.org/ccgo/v3 v3.12.21/go.mod h1:ydgg2tEprnyMn159ZO/N4pLBqpL7NOkJ88GT5zNU2dE= -modernc.org/ccgo/v3 v3.12.22/go.mod h1:nyDVFMmMWhMsgQw+5JH6B6o4MnZ+UQNw1pp52XYFPRk= -modernc.org/ccgo/v3 v3.12.25/go.mod h1:UaLyWI26TwyIT4+ZFNjkyTbsPsY3plAEB6E7L/vZV3w= -modernc.org/ccgo/v3 v3.12.29/go.mod h1:FXVjG7YLf9FetsS2OOYcwNhcdOLGt8S9bQ48+OP75cE= -modernc.org/ccgo/v3 v3.12.36/go.mod h1:uP3/Fiezp/Ga8onfvMLpREq+KUjUmYMxXPO8tETHtA8= -modernc.org/ccgo/v3 v3.12.38/go.mod h1:93O0G7baRST1vNj4wnZ49b1kLxt0xCW5Hsa2qRaZPqc= -modernc.org/ccgo/v3 v3.12.43/go.mod h1:k+DqGXd3o7W+inNujK15S5ZYuPoWYLpF5PYougCmthU= -modernc.org/ccgo/v3 v3.12.46/go.mod h1:UZe6EvMSqOxaJ4sznY7b23/k13R8XNlyWsO5bAmSgOE= -modernc.org/ccgo/v3 v3.12.47/go.mod h1:m8d6p0zNps187fhBwzY/ii6gxfjob1VxWb919Nk1HUk= -modernc.org/ccgo/v3 v3.12.50/go.mod h1:bu9YIwtg+HXQxBhsRDE+cJjQRuINuT9PUK4orOco/JI= -modernc.org/ccgo/v3 v3.12.51/go.mod h1:gaIIlx4YpmGO2bLye04/yeblmvWEmE4BBBls4aJXFiE= -modernc.org/ccgo/v3 v3.12.53/go.mod h1:8xWGGTFkdFEWBEsUmi+DBjwu/WLy3SSOrqEmKUjMeEg= -modernc.org/ccgo/v3 v3.12.54/go.mod h1:yANKFTm9llTFVX1FqNKHE0aMcQb1fuPJx6p8AcUx+74= -modernc.org/ccgo/v3 v3.12.55/go.mod h1:rsXiIyJi9psOwiBkplOaHye5L4MOOaCjHg1Fxkj7IeU= -modernc.org/ccgo/v3 v3.12.56/go.mod h1:ljeFks3faDseCkr60JMpeDb2GSO3TKAmrzm7q9YOcMU= -modernc.org/ccgo/v3 v3.12.57/go.mod h1:hNSF4DNVgBl8wYHpMvPqQWDQx8luqxDnNGCMM4NFNMc= -modernc.org/ccgo/v3 v3.12.60/go.mod h1:k/Nn0zdO1xHVWjPYVshDeWKqbRWIfif5dtsIOCUVMqM= -modernc.org/ccgo/v3 v3.12.66/go.mod h1:jUuxlCFZTUZLMV08s7B1ekHX5+LIAurKTTaugUr/EhQ= -modernc.org/ccgo/v3 v3.12.67/go.mod h1:Bll3KwKvGROizP2Xj17GEGOTrlvB1XcVaBrC90ORO84= -modernc.org/ccgo/v3 v3.12.73/go.mod h1:hngkB+nUUqzOf3iqsM48Gf1FZhY599qzVg1iX+BT3cQ= -modernc.org/ccgo/v3 v3.12.81/go.mod h1:p2A1duHoBBg1mFtYvnhAnQyI6vL0uw5PGYLSIgF6rYY= -modernc.org/ccgo/v3 v3.12.84/go.mod h1:ApbflUfa5BKadjHynCficldU1ghjen84tuM5jRynB7w= -modernc.org/ccgo/v3 v3.12.86/go.mod h1:dN7S26DLTgVSni1PVA3KxxHTcykyDurf3OgUzNqTSrU= -modernc.org/ccgo/v3 v3.12.88/go.mod h1:0MFzUHIuSIthpVZyMWiFYMwjiFnhrN5MkvBrUwON+ZM= -modernc.org/ccgo/v3 v3.12.90/go.mod h1:obhSc3CdivCRpYZmrvO88TXlW0NvoSVvdh/ccRjJYko= -modernc.org/ccgo/v3 v3.12.92/go.mod h1:5yDdN7ti9KWPi5bRVWPl8UNhpEAtCjuEE7ayQnzzqHA= -modernc.org/ccgo/v3 v3.12.95/go.mod h1:ZcLyvtocXYi8uF+9Ebm3G8EF8HNY5hGomBqthDp4eC8= -modernc.org/ccgo/v3 v3.13.1/go.mod h1:aBYVOUfIlcSnrsRVU8VRS35y2DIfpgkmVkYZ0tpIXi4= -modernc.org/ccgo/v3 v3.15.9/go.mod h1:md59wBwDT2LznX/OTCPoVS6KIsdRgY8xqQwBV+hkTH0= -modernc.org/ccgo/v3 v3.15.10/go.mod h1:wQKxoFn0ynxMuCLfFD09c8XPUCc8obfchoVR9Cn0fI8= -modernc.org/ccgo/v3 v3.15.12/go.mod h1:VFePOWoCd8uDGRJpq/zfJ29D0EVzMSyID8LCMWYbX6I= -modernc.org/ccgo/v3 v3.15.14/go.mod h1:144Sz2iBCKogb9OKwsu7hQEub3EVgOlyI8wMUPGKUXQ= -modernc.org/ccgo/v3 v3.15.15/go.mod h1:z5qltXjU4PJl0pE5nhYQCvA9DhPHiWsl5GWl89+NSYE= -modernc.org/ccgo/v3 v3.15.16/go.mod h1:XbKRMeMWMdq712Tr5ECgATYMrzJ+g9zAZEj2ktzBe24= -modernc.org/ccgo/v3 v3.15.17 h1:svaDk4rfh7XQPBwkqzjKK8bta/vK4VVL3JP6ZLbcr0w= -modernc.org/ccgo/v3 v3.15.17/go.mod h1:bofnFkpRFf5gLY+mBZIyTW6FEcp26xi2lgOFk2Rlvs0= modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= modernc.org/ccgo/v3 v3.16.6 h1:3l18poV+iUemQ98O3X5OMr97LOqlzis+ytivU4NqGhA= modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccorpus v1.11.1/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/db v1.0.0/go.mod h1:kYD/cO29L/29RM0hXYl4i3+Q5VojL31kTUVpVJDw0s8= @@ -2495,57 +2095,6 @@ modernc.org/internal v1.0.0/go.mod h1:VUD/+JAkhCpvkUitlEOnhpVxCgsBI90oTzSCRcqQVS modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= modernc.org/libc v1.7.13-0.20210308123627-12f642a52bb8/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= modernc.org/libc v1.9.5/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= -modernc.org/libc v1.9.8/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= -modernc.org/libc v1.9.11/go.mod h1:NyF3tsA5ArIjJ83XB0JlqhjTabTCHm9aX4XMPHyQn0Q= -modernc.org/libc v1.11.0/go.mod h1:2lOfPmj7cz+g1MrPNmX65QCzVxgNq2C5o0jdLY2gAYg= -modernc.org/libc v1.11.2/go.mod h1:ioIyrl3ETkugDO3SGZ+6EOKvlP3zSOycUETe4XM4n8M= -modernc.org/libc v1.11.5/go.mod h1:k3HDCP95A6U111Q5TmG3nAyUcp3kR5YFZTeDS9v8vSU= -modernc.org/libc v1.11.6/go.mod h1:ddqmzR6p5i4jIGK1d/EiSw97LBcE3dK24QEwCFvgNgE= -modernc.org/libc v1.11.11/go.mod h1:lXEp9QOOk4qAYOtL3BmMve99S5Owz7Qyowzvg6LiZso= -modernc.org/libc v1.11.13/go.mod h1:ZYawJWlXIzXy2Pzghaf7YfM8OKacP3eZQI81PDLFdY8= -modernc.org/libc v1.11.16/go.mod h1:+DJquzYi+DMRUtWI1YNxrlQO6TcA5+dRRiq8HWBWRC8= -modernc.org/libc v1.11.19/go.mod h1:e0dgEame6mkydy19KKaVPBeEnyJB4LGNb0bBH1EtQ3I= -modernc.org/libc v1.11.24/go.mod h1:FOSzE0UwookyT1TtCJrRkvsOrX2k38HoInhw+cSCUGk= -modernc.org/libc v1.11.26/go.mod h1:SFjnYi9OSd2W7f4ct622o/PAYqk7KHv6GS8NZULIjKY= -modernc.org/libc v1.11.27/go.mod h1:zmWm6kcFXt/jpzeCgfvUNswM0qke8qVwxqZrnddlDiE= -modernc.org/libc v1.11.28/go.mod h1:Ii4V0fTFcbq3qrv3CNn+OGHAvzqMBvC7dBNyC4vHZlg= -modernc.org/libc v1.11.31/go.mod h1:FpBncUkEAtopRNJj8aRo29qUiyx5AvAlAxzlx9GNaVM= -modernc.org/libc v1.11.34/go.mod h1:+Tzc4hnb1iaX/SKAutJmfzES6awxfU1BPvrrJO0pYLg= -modernc.org/libc v1.11.37/go.mod h1:dCQebOwoO1046yTrfUE5nX1f3YpGZQKNcITUYWlrAWo= -modernc.org/libc v1.11.39/go.mod h1:mV8lJMo2S5A31uD0k1cMu7vrJbSA3J3waQJxpV4iqx8= -modernc.org/libc v1.11.42/go.mod h1:yzrLDU+sSjLE+D4bIhS7q1L5UwXDOw99PLSX0BlZvSQ= -modernc.org/libc v1.11.44/go.mod h1:KFq33jsma7F5WXiYelU8quMJasCCTnHK0mkri4yPHgA= -modernc.org/libc v1.11.45/go.mod h1:Y192orvfVQQYFzCNsn+Xt0Hxt4DiO4USpLNXBlXg/tM= -modernc.org/libc v1.11.47/go.mod h1:tPkE4PzCTW27E6AIKIR5IwHAQKCAtudEIeAV1/SiyBg= -modernc.org/libc v1.11.49/go.mod h1:9JrJuK5WTtoTWIFQ7QjX2Mb/bagYdZdscI3xrvHbXjE= -modernc.org/libc v1.11.51/go.mod h1:R9I8u9TS+meaWLdbfQhq2kFknTW0O3aw3kEMqDDxMaM= -modernc.org/libc v1.11.53/go.mod h1:5ip5vWYPAoMulkQ5XlSJTy12Sz5U6blOQiYasilVPsU= -modernc.org/libc v1.11.54/go.mod h1:S/FVnskbzVUrjfBqlGFIPA5m7UwB3n9fojHhCNfSsnw= -modernc.org/libc v1.11.55/go.mod h1:j2A5YBRm6HjNkoSs/fzZrSxCuwWqcMYTDPLNx0URn3M= -modernc.org/libc v1.11.56/go.mod h1:pakHkg5JdMLt2OgRadpPOTnyRXm/uzu+Yyg/LSLdi18= -modernc.org/libc v1.11.58/go.mod h1:ns94Rxv0OWyoQrDqMFfWwka2BcaF6/61CqJRK9LP7S8= -modernc.org/libc v1.11.71/go.mod h1:DUOmMYe+IvKi9n6Mycyx3DbjfzSKrdr/0Vgt3j7P5gw= -modernc.org/libc v1.11.75/go.mod h1:dGRVugT6edz361wmD9gk6ax1AbDSe0x5vji0dGJiPT0= -modernc.org/libc v1.11.82/go.mod h1:NF+Ek1BOl2jeC7lw3a7Jj5PWyHPwWD4aq3wVKxqV1fI= -modernc.org/libc v1.11.86/go.mod h1:ePuYgoQLmvxdNT06RpGnaDKJmDNEkV7ZPKI2jnsvZoE= -modernc.org/libc v1.11.87/go.mod h1:Qvd5iXTeLhI5PS0XSyqMY99282y+3euapQFxM7jYnpY= -modernc.org/libc v1.11.88/go.mod h1:h3oIVe8dxmTcchcFuCcJ4nAWaoiwzKCdv82MM0oiIdQ= -modernc.org/libc v1.11.90/go.mod h1:ynK5sbjsU77AP+nn61+k+wxUGRx9rOFcIqWYYMaDZ4c= -modernc.org/libc v1.11.98/go.mod h1:ynK5sbjsU77AP+nn61+k+wxUGRx9rOFcIqWYYMaDZ4c= -modernc.org/libc v1.11.99/go.mod h1:wLLYgEiY2D17NbBOEp+mIJJJBGSiy7fLL4ZrGGZ+8jI= -modernc.org/libc v1.11.101/go.mod h1:wLLYgEiY2D17NbBOEp+mIJJJBGSiy7fLL4ZrGGZ+8jI= -modernc.org/libc v1.11.104/go.mod h1:2MH3DaF/gCU8i/UBiVE1VFRos4o523M7zipmwH8SIgQ= -modernc.org/libc v1.12.0/go.mod h1:2MH3DaF/gCU8i/UBiVE1VFRos4o523M7zipmwH8SIgQ= -modernc.org/libc v1.14.1/go.mod h1:npFeGWjmZTjFeWALQLrvklVmAxv4m80jnG3+xI8FdJk= -modernc.org/libc v1.14.2/go.mod h1:MX1GBLnRLNdvmK9azU9LCxZ5lMyhrbEMK8rG3X/Fe34= -modernc.org/libc v1.14.3/go.mod h1:GPIvQVOVPizzlqyRX3l756/3ppsAgg1QgPxjr5Q4agQ= -modernc.org/libc v1.14.6/go.mod h1:2PJHINagVxO4QW/5OQdRrvMYo+bm5ClpUFfyXCYl9ak= -modernc.org/libc v1.14.7/go.mod h1:f8xfWXW8LW41qb4X5+huVQo5dcfPlq7Cbny2TDheMv0= -modernc.org/libc v1.14.8/go.mod h1:9+JCLb1MWSY23smyOpIPbd5ED+rSS/ieiDWUpdyO3mo= -modernc.org/libc v1.14.10/go.mod h1:y1MtIWhwpJFpLYm6grAThtuXJKEsY6xkdZmXbRngIdo= -modernc.org/libc v1.14.11/go.mod h1:l5/Mz/GrZwOqzwRHA3abgSCnSeJzzTl+Ify0bAwKbAw= -modernc.org/libc v1.14.12 h1:pUBZTYoISfbb4pCf4PECENpbvwDBxeKc+/dS9LyOWFM= -modernc.org/libc v1.14.12/go.mod h1:fJdoe23MHu2ruPQkFPPqCpToDi5cckzsbmkI6Ez0LqQ= modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= modernc.org/libc v1.16.7 h1:qzQtHhsZNpVPpeCu+aMIQldXeV1P0vRhSqCL0nOIJOA= @@ -2554,14 +2103,9 @@ modernc.org/lldb v1.0.0/go.mod h1:jcRvJGWfCGodDZz8BPwiKMJxGJngQ/5DrRapkQnLob8= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/memory v1.0.4/go.mod h1:nV2OApxradM3/OVbs2/0OsP6nPfakXpi50C7dcoHXlc= -modernc.org/memory v1.0.5/go.mod h1:B7OYswTRnfGg+4tDH1t1OeUNnsy2viGTdME4tzd+IjM= -modernc.org/memory v1.0.6/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.0.7 h1:UE3cxTRFa5tfUibAV7Jqq8P7zRY0OlJg+yWVIIaluEE= -modernc.org/memory v1.0.7/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= modernc.org/memory v1.1.1 h1:bDOL0DIDLQv7bWhP3gMvIrnoFw+Eo6F7a2QK9HPDiFU= modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A= @@ -2569,26 +2113,19 @@ modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/ql v1.0.0/go.mod h1:xGVyrLIatPcO2C1JvI/Co8c0sr6y91HKFNy4pt9JXEY= modernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k= modernc.org/sqlite v1.10.6/go.mod h1:Z9FEjUtZP4qFEg6/SiADg9XCER7aYy9a/j7Pg9P7CPs= -modernc.org/sqlite v1.14.3/go.mod h1:xMpicS1i2MJ4C8+Ap0vYBqTwYfpFvdnPE6brbFOtV2Y= -modernc.org/sqlite v1.15.3 h1:3C4AWicF7S5vUUFJuBi7Ws8eWlPjqyo/c4Z1UGYBbyg= -modernc.org/sqlite v1.15.3/go.mod h1:J7GAPbk8Txp0DJnT8TGwpUqJW0Z1cK2YpzjoXaZRU8k= modernc.org/sqlite v1.18.0 h1:ef66qJSgKeyLyrF4kQ2RHw/Ue3V89fyFNbGL073aDjI= modernc.org/sqlite v1.18.0/go.mod h1:B9fRWZacNxJBHoCJZQr1R54zhVn3fjfl0aszflrTSxY= modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs= modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= modernc.org/tcl v1.5.2/go.mod h1:pmJYOLgpiys3oI4AeAafkcUfE+TKKilminxNyU/+Zlo= -modernc.org/tcl v1.9.2/go.mod h1:aw7OnlIoiuJgu1gwbTZtrKnGpDqH9wyH++jZcxdqNsg= -modernc.org/tcl v1.11.2 h1:mXpsx3AZqJt83uDiFu9UYQVBjNjaWKGCF1YDSlpCL6Y= -modernc.org/tcl v1.11.2/go.mod h1:BRzgpajcGdS2qTxniOx9c/dcxjlbA7p12eJNmiriQYo= +modernc.org/tcl v1.13.1 h1:npxzTwFTZYM8ghWicVIX1cRWzj7Nd8i6AqqX2p+IYao= modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.0.1-0.20210308123920-1f282aa71362/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA= modernc.org/z v1.0.1/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA= -modernc.org/z v1.2.20/go.mod h1:zU9FiF4PbHdOTUxw+IF8j7ArBMRPsHgq10uVPt6xTzo= -modernc.org/z v1.3.2 h1:4GWBVMa48UDC7KQ9tnaggN/yTlXg+CdCX9bhgHPQ9AM= -modernc.org/z v1.3.2/go.mod h1:PEU2oK2OEA1CfzDTd+8E908qEXhC9s0MfyKp5LZsd+k= +modernc.org/z v1.5.1 h1:RTNHdsrOpeoSeOF4FbzTo8gBYByaJ5xT7NgZ9ZqRiJM= modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= modernc.org/zappy v1.0.0/go.mod h1:hHe+oGahLVII/aTTyWK/b53VDHMAGCBYYeZ9sn83HC4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/server/api/compliance.go b/server/api/compliance.go index f16aa1a0b..f6d4ed643 100644 --- a/server/api/compliance.go +++ b/server/api/compliance.go @@ -8,6 +8,7 @@ import ( "github.com/gorilla/mux" "github.com/mattermost/focalboard/server/model" + mmModel "github.com/mattermost/mattermost-server/v6/model" "github.com/mattermost/mattermost-server/v6/shared/mlog" ) @@ -19,12 +20,12 @@ const ( func (a *API) registerComplianceRoutes(r *mux.Router) { // Compliance APIs - r.HandleFunc("/admin/boards", a.sessionRequired(a.handleGetAllBoards)).Methods("GET") - r.HandleFunc("/admin/boards_history", a.sessionRequired(a.handleGetBoardsHistory)).Methods("GET") - r.HandleFunc("/admin/blocks_history", a.sessionRequired(a.handleGetBlocksHistory)).Methods("GET") + r.HandleFunc("/admin/boards", a.sessionRequired(a.handleGetBoardsForCompliance)).Methods("GET") + r.HandleFunc("/admin/boards_history", a.sessionRequired(a.handleGetBoardsComplianceHistory)).Methods("GET") + r.HandleFunc("/admin/blocks_history", a.sessionRequired(a.handleGetBlocksComplianceHistory)).Methods("GET") } -func (a *API) handleGetAllBoards(w http.ResponseWriter, r *http.Request) { +func (a *API) handleGetBoardsForCompliance(w http.ResponseWriter, r *http.Request) { // TODO(@pinjasaur): swagger query := r.URL.Query() @@ -65,26 +66,26 @@ func (a *API) handleGetAllBoards(w http.ResponseWriter, r *http.Request) { return } - boards, err := a.app.GetBoardsForTeam(teamID, page, perPage) + opts := model.QueryBoardsForComplianceOptions{ + TeamID: teamID, + Page: page, + PerPage: perPage, + } + + boards, more, err := a.app.GetBoardsForCompliance(opts) if err != nil { a.errorResponse(w, r, err) return } - // N+1; is there more? - // TODO: potentially fragile if len(boards) == 0 or perPage < 0 - hasNext := len(boards) > perPage - if hasNext { - boards = boards[:len(boards)-1] - } - - a.logger.Debug("GetAllBoards", + a.logger.Debug("GetBoardsForCompliance", mlog.String("teamID", teamID), mlog.Int("boardsCount", len(boards)), + mlog.Bool("hasNext", more), ) - response := model.ComplianceResponse{ - HasNext: hasNext, + response := model.BoardsComplianceResponse{ + HasNext: more, Results: boards, } data, err := json.Marshal(response) @@ -96,7 +97,7 @@ func (a *API) handleGetAllBoards(w http.ResponseWriter, r *http.Request) { jsonBytesResponse(w, http.StatusOK, data) } -func (a *API) handleGetBoardsHistory(w http.ResponseWriter, r *http.Request) { +func (a *API) handleGetBoardsComplianceHistory(w http.ResponseWriter, r *http.Request) { // TODO(@pinjasaur): swagger query := r.URL.Query() @@ -143,33 +144,35 @@ func (a *API) handleGetBoardsHistory(w http.ResponseWriter, r *http.Request) { a.errorResponse(w, r, model.NewErrBadRequest(message)) return } - modifiedSince, err := strconv.Atoi(strModifiedSince) + modifiedSince, err := strconv.ParseInt(strModifiedSince, 10, 64) if err != nil { message := fmt.Sprintf("invalid `modified_since` parameter: %s", err) a.errorResponse(w, r, model.NewErrBadRequest(message)) return } - boards, err := a.app.GetBoardsHistory(modifiedSince, includeDeleted, teamID, page, perPage) + opts := model.QueryBoardsComplianceHistoryOptions{ + ModifiedSince: modifiedSince, + IncludeDeleted: includeDeleted, + TeamID: teamID, + Page: page, + PerPage: perPage, + } + + boards, more, err := a.app.GetBoardsComplianceHistory(opts) if err != nil { a.errorResponse(w, r, err) return } - // N+1; is there more? - // TODO: potentially fragile if len(boards) == 0 or perPage < 0 - hasNext := len(boards) > perPage - if hasNext { - boards = boards[:len(boards)-1] - } - - a.logger.Debug("GetBoardsHistory", + a.logger.Debug("GetBoardsComplianceHistory", mlog.String("teamID", teamID), mlog.Int("boardsCount", len(boards)), + mlog.Bool("hasNext", more), ) - response := model.ComplianceResponse{ - HasNext: hasNext, + response := model.BoardsComplianceHistoryResponse{ + HasNext: more, Results: boards, } data, err := json.Marshal(response) @@ -181,7 +184,7 @@ func (a *API) handleGetBoardsHistory(w http.ResponseWriter, r *http.Request) { jsonBytesResponse(w, http.StatusOK, data) } -func (a *API) handleGetBlocksHistory(w http.ResponseWriter, r *http.Request) { +func (a *API) handleGetBlocksComplianceHistory(w http.ResponseWriter, r *http.Request) { // TODO(@pinjasaur): swagger query := r.URL.Query() @@ -229,34 +232,37 @@ func (a *API) handleGetBlocksHistory(w http.ResponseWriter, r *http.Request) { a.errorResponse(w, r, model.NewErrBadRequest(message)) return } - modifiedSince, err := strconv.Atoi(strModifiedSince) + modifiedSince, err := strconv.ParseInt(strModifiedSince, 10, 64) if err != nil { message := fmt.Sprintf("invalid `modified_since` parameter: %s", err) a.errorResponse(w, r, model.NewErrBadRequest(message)) return } - blocks, err := a.app.GetBlocksHistory(modifiedSince, includeDeleted, teamID, boardID, page, perPage) + opts := model.QueryBlocksComplianceHistoryOptions{ + ModifiedSince: modifiedSince, + IncludeDeleted: includeDeleted, + TeamID: teamID, + BoardID: boardID, + Page: page, + PerPage: perPage, + } + + blocks, more, err := a.app.GetBlocksComplianceHistory(opts) if err != nil { a.errorResponse(w, r, err) return } - // N+1; is there more? - // TODO: potentially fragile if len(blocks) == 0 or perPage < 0 - hasNext := len(blocks) > perPage - if hasNext { - blocks = blocks[:len(blocks)-1] - } - - a.logger.Debug("GetBlocksHistory", + a.logger.Debug("GetBlocksComplianceHistory", mlog.String("teamID", teamID), mlog.String("boardID", boardID), mlog.Int("blocksCount", len(blocks)), + mlog.Bool("hasNext", more), ) - response := model.ComplianceResponse{ - HasNext: hasNext, + response := model.BlocksComplianceHistoryResponse{ + HasNext: more, Results: blocks, } data, err := json.Marshal(response) diff --git a/server/app/boards.go b/server/app/boards.go index 82b3197c2..f9ea5085a 100644 --- a/server/app/boards.go +++ b/server/app/boards.go @@ -258,18 +258,6 @@ func (a *App) DuplicateBoard(boardID, userID, toTeam string, asTemplate bool) (* return bab, members, err } -func (a *App) GetBoardsForTeam(teamID string, page, perPage int) ([]*model.Board, error) { - return a.store.GetBoardsForTeam(teamID, page, perPage) -} - -func (a *App) GetBoardsHistory(modifiedSince int, includeDeleted bool, teamID string, page, perPage int) ([]*model.Board, error) { - return a.store.GetBoardsHistory(modifiedSince, includeDeleted, teamID, page, perPage) -} - -func (a *App) GetBlocksHistory(modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) ([]*model.Block, error) { - return a.store.GetBlocksHistory(modifiedSince, includeDeleted, teamID, boardID, page, perPage) -} - func (a *App) GetBoardsForUserAndTeam(userID, teamID string, includePublicBoards bool) ([]*model.Board, error) { return a.store.GetBoardsForUserAndTeam(userID, teamID, includePublicBoards) } diff --git a/server/app/compliance.go b/server/app/compliance.go new file mode 100644 index 000000000..d1a656679 --- /dev/null +++ b/server/app/compliance.go @@ -0,0 +1,15 @@ +package app + +import "github.com/mattermost/focalboard/server/model" + +func (a *App) GetBoardsForCompliance(opts model.QueryBoardsForComplianceOptions) ([]*model.Board, bool, error) { + return a.store.GetBoardsForCompliance(opts) +} + +func (a *App) GetBoardsComplianceHistory(opts model.QueryBoardsComplianceHistoryOptions) ([]model.BoardHistory, bool, error) { + return a.store.GetBoardsComplianceHistory(opts) +} + +func (a *App) GetBlocksComplianceHistory(opts model.QueryBlocksComplianceHistoryOptions) ([]model.BlockHistory, bool, error) { + return a.store.GetBlocksComplianceHistory(opts) +} diff --git a/server/client/client.go b/server/client/client.go index f9abfec57..30101af43 100644 --- a/server/client/client.go +++ b/server/client/client.go @@ -11,6 +11,7 @@ import ( "github.com/mattermost/focalboard/server/api" "github.com/mattermost/focalboard/server/model" + mmModel "github.com/mattermost/mattermost-server/v6/model" ) @@ -987,7 +988,7 @@ func (c *Client) GetStatistics() (*model.BoardsStatistics, *Response) { return stats, BuildResponse(r) } -func (c *Client) GetAllBoards(teamID string, page, perPage int) (*model.ComplianceResponse, *Response) { +func (c *Client) GetBoardsForCompliance(teamID string, page, perPage int) (*model.BoardsComplianceResponse, *Response) { query := fmt.Sprintf("?team_id=%s&page=%d&per_page=%d", teamID, page, perPage) r, err := c.DoAPIGet("/admin/boards"+query, "") if err != nil { @@ -995,7 +996,7 @@ func (c *Client) GetAllBoards(teamID string, page, perPage int) (*model.Complian } defer closeBody(r) - var res *model.ComplianceResponse + var res *model.BoardsComplianceResponse err = json.NewDecoder(r.Body).Decode(&res) if err != nil { return nil, BuildErrorResponse(r, err) @@ -1004,15 +1005,17 @@ func (c *Client) GetAllBoards(teamID string, page, perPage int) (*model.Complian return res, BuildResponse(r) } -func (c *Client) GetBoardsHistory(modifiedSince int, includeDeleted bool, teamID string, page, perPage int) (*model.ComplianceResponse, *Response) { - query := fmt.Sprintf("?modified_since=%d&include_deleted=%t&team_id=%s&page=%d&per_page=%d", modifiedSince, includeDeleted, teamID, page, perPage) +func (c *Client) GetBoardsComplianceHistory( + modifiedSince int, includeDeleted bool, teamID string, page, perPage int) (*model.BoardsComplianceHistoryResponse, *Response) { + query := fmt.Sprintf("?modified_since=%d&include_deleted=%t&team_id=%s&page=%d&per_page=%d", + modifiedSince, includeDeleted, teamID, page, perPage) r, err := c.DoAPIGet("/admin/boards_history"+query, "") if err != nil { return nil, BuildErrorResponse(r, err) } defer closeBody(r) - var res *model.ComplianceResponse + var res *model.BoardsComplianceHistoryResponse err = json.NewDecoder(r.Body).Decode(&res) if err != nil { return nil, BuildErrorResponse(r, err) @@ -1021,15 +1024,17 @@ func (c *Client) GetBoardsHistory(modifiedSince int, includeDeleted bool, teamID return res, BuildResponse(r) } -func (c *Client) GetBlocksHistory(modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) (*model.ComplianceResponse, *Response) { - query := fmt.Sprintf("?modified_since=%d&include_deleted=%t&team_id=%s&board_id=%s&page=%d&per_page=%d", modifiedSince, includeDeleted, teamID, boardID, page, perPage) +func (c *Client) GetBlocksComplianceHistory( + modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) (*model.BlocksComplianceHistoryResponse, *Response) { + query := fmt.Sprintf("?modified_since=%d&include_deleted=%t&team_id=%s&board_id=%s&page=%d&per_page=%d", + modifiedSince, includeDeleted, teamID, boardID, page, perPage) r, err := c.DoAPIGet("/admin/blocks_history"+query, "") if err != nil { return nil, BuildErrorResponse(r, err) } defer closeBody(r) - var res *model.ComplianceResponse + var res *model.BlocksComplianceHistoryResponse err = json.NewDecoder(r.Body).Decode(&res) if err != nil { return nil, BuildErrorResponse(r, err) diff --git a/server/go.mod b/server/go.mod index 6d34056ef..734b58471 100644 --- a/server/go.mod +++ b/server/go.mod @@ -65,7 +65,6 @@ require ( github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/minio-go/v7 v7.0.43 // indirect github.com/minio/sha256-simd v1.0.0 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect diff --git a/server/go.sum b/server/go.sum index 804c77180..aac7efd2c 100644 --- a/server/go.sum +++ b/server/go.sum @@ -85,8 +85,6 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= -github.com/Masterminds/squirrel v1.5.2 h1:UiOEi2ZX4RCSkpiNDQN5kro/XIBpSRk9iTqdIRPzUXE= -github.com/Masterminds/squirrel v1.5.2/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Masterminds/squirrel v1.5.3 h1:YPpoceAcxuzIljlr5iWpNKaql7hLeG1KLSrhvdHpkZc= github.com/Masterminds/squirrel v1.5.3/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= @@ -406,7 +404,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -427,8 +424,7 @@ github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiD github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= @@ -672,8 +668,7 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw= -github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.3.1 h1:vDwF1DFNZhntP4DAjuTpOw3uEgMUpXh1pB5fW9DqHpo= github.com/hashicorp/go-hclog v1.3.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= @@ -681,8 +676,7 @@ github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1: github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.4 h1:NVdrSdFRt3SkZtNckJ6tog7gbpRrcbOjQi/rgF7JYWQ= -github.com/hashicorp/go-plugin v1.4.4/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.4.6 h1:MDV3UrKQBM3du3G7MApDGvOsMYy3JQJ4exhSoKBAeVA= github.com/hashicorp/go-plugin v1.4.6/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -698,8 +692,7 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 h1:xixZ2bWeofWV68J+x6AzmKuVM/JWCQwkWm6GW/MUR6I= -github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= @@ -806,13 +799,11 @@ github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdY github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= -github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM= github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.13 h1:1XxvOiqXZ8SULZUKim/wncr3wZ38H4yCuVDvKdK9OGs= -github.com/klauspost/cpuid/v2 v2.0.13/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= +github.com/klauspost/cpuid/v2 v2.2.1 h1:U33DW0aiEj633gHYw3LoDNfkDiYnE5Q8M/TKJn2f2jI= github.com/klauspost/cpuid/v2 v2.2.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -843,8 +834,7 @@ github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= -github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= @@ -871,14 +861,8 @@ github.com/mattermost/logr/v2 v2.0.15 h1:+WNbGcsc3dBao65eXlceB6dTILNJRIrvubnsTl3 github.com/mattermost/logr/v2 v2.0.15/go.mod h1:mpPp935r5dIkFDo2y9Q87cQWhFR/4xXpNh0k/y8Hmwg= github.com/mattermost/mattermost-plugin-api v0.0.29-0.20220801143717-73008cfda2fb h1:q1qXKVv59rA2gcQ7lVLc5OlWBmfsR3i8mdGD5EZesyk= github.com/mattermost/mattermost-plugin-api v0.0.29-0.20220801143717-73008cfda2fb/go.mod h1:PIeo40t9VTA4Wu1FwjzH7QmcgC3SRyk/ohCwJw4/oSo= -github.com/mattermost/mattermost-server/v6 v6.0.0-20220802151854-f07c31c5d933 h1:h7EibO8cwWeK8dLhC/A5tKGbkYSuJKZ0+2EXW7jDHoA= -github.com/mattermost/mattermost-server/v6 v6.0.0-20220802151854-f07c31c5d933/go.mod h1:otnBnKY9Y0eNkUKeD161de+BUBlESwANTnrkPT/392Y= -github.com/mattermost/mattermost-server/v6 v6.0.0-20221130200243-06e964b86b0d h1:CKJXDUCkRrfy1U9sZHOpvACOtkthV5iWt2boHUK720I= -github.com/mattermost/mattermost-server/v6 v6.0.0-20221130200243-06e964b86b0d/go.mod h1:U3gSM0I15WSMHPpDEU30mmc4JrbSDk+8F1+MFLOHWD0= github.com/mattermost/mattermost-server/v6 v6.0.0-20221214122404-8d90c7042f93 h1:mGN2D6KhjKosQdZ+BHzmWxsA/tRK9FiR+nUd38nSZQY= github.com/mattermost/mattermost-server/v6 v6.0.0-20221214122404-8d90c7042f93/go.mod h1:U3gSM0I15WSMHPpDEU30mmc4JrbSDk+8F1+MFLOHWD0= -github.com/mattermost/morph v0.0.0-20220401091636-39f834798da8 h1:gwliVjCTqAC01mSCNqa5nJ/4MmGq50vrjsottIhQ4d8= -github.com/mattermost/morph v0.0.0-20220401091636-39f834798da8/go.mod h1:jxM3g1bx+k2Thz7jofcHguBS8TZn5Pc+o5MGmORObhw= github.com/mattermost/morph v1.0.5-0.20221115094356-4c18a75b1f5e h1:VfNz+fvJ3DxOlALM22Eea8ONp5jHrybKBCcCtDPVlss= github.com/mattermost/morph v1.0.5-0.20221115094356-4c18a75b1f5e/go.mod h1:xo0ljDknTpPxEdhhrUdwhLCexIsYyDKS6b41HqG8wGU= github.com/mattermost/squirrel v0.2.0 h1:8ZWeyf+MWQ2cL7hu9REZgLtz2IJi51qqZEovI3T3TT8= @@ -889,8 +873,8 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -900,8 +884,8 @@ github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= @@ -909,7 +893,6 @@ github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vq github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.10/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= @@ -925,15 +908,13 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.28 h1:VMr3K5qGIEt+/KW3poopRh8mzi5RwuCjmrmstK196Fg= -github.com/minio/minio-go/v7 v7.0.28/go.mod h1:x81+AX5gHSfCSqw7jxRKHvxUXMlE5uKX0Vb75Xk5yYg= +github.com/minio/minio-go/v7 v7.0.43 h1:14Q4lwblqTdlAmba05oq5xL0VBLHi06zS4yLnIkz6hI= github.com/minio/minio-go/v7 v7.0.43/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= @@ -1111,8 +1092,7 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -1125,8 +1105,7 @@ github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rudderlabs/analytics-go v3.3.2+incompatible h1:bDajEJTYhfHjNYxbQFMA/2dHlOjyeSgxS7GPIdMZ52Q= -github.com/rudderlabs/analytics-go v3.3.2+incompatible/go.mod h1:LF8/ty9kUX4PTY3l5c97K3nZZaX5Hwsvt+NBaRL/f30= +github.com/rudderlabs/analytics-go v3.3.3+incompatible h1:OG0XlKoXfr539e2t1dXtTB+Gr89uFW+OUNQBVhHIIBY= github.com/rudderlabs/analytics-go v3.3.3+incompatible/go.mod h1:LF8/ty9kUX4PTY3l5c97K3nZZaX5Hwsvt+NBaRL/f30= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1140,8 +1119,7 @@ github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24 github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3 h1:ZuhckGJ10ulaKkdvJtiAqsLTiPrLaXSdnVgXJKJkTxE= -github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3/go.mod h1:9/Rh6yILuLysoQnZ2oNooD2g7aBnvM7r/fNVxRNWfBc= +github.com/segmentio/backo-go v1.0.1 h1:68RQccglxZeyURy93ASB/2kc9QudzgIDexJ927N++y4= github.com/segmentio/backo-go v1.0.1/go.mod h1:9/Rh6yILuLysoQnZ2oNooD2g7aBnvM7r/fNVxRNWfBc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= @@ -1180,8 +1158,8 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -1224,8 +1202,8 @@ github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -1236,8 +1214,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -1246,14 +1224,13 @@ github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/tidwall/gjson v1.14.1 h1:iymTbGkQBhveq21bEvAQ81I0LEBork8BFe1CUZXdyuo= -github.com/tidwall/gjson v1.14.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw= github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tinylib/msgp v1.1.6 h1:i+SbKraHhnrf9M5MYmvQhFnbLhAXSDWF8WWsuyRdocw= github.com/tinylib/msgp v1.1.6/go.mod h1:75BAfg2hauQhs3qedfdDZmWAPcFMAvJE5b9rGOMufyw= @@ -1281,8 +1258,7 @@ github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/wiggin77/merror v1.0.2/go.mod h1:uQTcIU0Z6jRK4OwqganPYerzQxSFJ4GSHM3aurxxQpg= -github.com/wiggin77/merror v1.0.3 h1:8+ZHV+aSnJoYghE3EUThl15C6rvF2TYRSvOSBjdmNR8= -github.com/wiggin77/merror v1.0.3/go.mod h1:H2ETSu7/bPE0Ymf4bEwdUoo73OOEkdClnoRisfw0Nm0= +github.com/wiggin77/merror v1.0.4 h1:XxFLEevmQQfgJW2AxhapuMG7C1fQqfbim/XyUmYv/ZM= github.com/wiggin77/merror v1.0.4/go.mod h1:H2ETSu7/bPE0Ymf4bEwdUoo73OOEkdClnoRisfw0Nm0= github.com/wiggin77/srslog v1.0.1 h1:gA2XjSMy3DrRdX9UqLuDtuVAAshb8bE1NhX1YK0Qe+8= github.com/wiggin77/srslog v1.0.1/go.mod h1:fehkyYDq1QfuYn60TDPu9YdY2bB85VUW2mvN1WynEls= @@ -1305,8 +1281,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.12 h1:6hffw6vALvEDqJ19dOJvJKOoAOKe4NDaTqvd2sktGN0= -github.com/yuin/goldmark v1.4.12/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.5.3 h1:3HUJmBFbQW9fhQOzMgseU134xfi6hU+mjWywx5Ty+/M= github.com/yuin/goldmark v1.5.3/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= @@ -1362,7 +1337,7 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1402,8 +1377,7 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.2.0 h1:BRXPfhNivWL5Yq0BGQ39a2sW6t44aODpfxkWjYdzewE= golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1453,8 +1427,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1527,8 +1500,7 @@ golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220614195744-fb05da6f9022 h1:0qjDla5xICC2suMtyRH/QqX3B1btXTfNsIt/i4LFgO0= -golang.org/x/net v0.0.0-20220614195744-fb05da6f9022/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1564,8 +1536,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180224232135-f6cff0780e54/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1680,7 +1651,6 @@ golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210818153620-00dd8d7831e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1694,14 +1664,12 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220317061510-51cd9980dadf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098 h1:PgOr27OhUx2IRqGJ2RxAWI4dJQ7bi9cSrB82uzFzfUA= -golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1716,8 +1684,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1810,16 +1778,15 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY= -golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= +golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= @@ -1948,8 +1915,7 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220614165028-45ed7f3ff16e h1:ubR4JUtqN3ffdFjpKylv8scWk/mZstGmzXbgYSkuMl0= -google.golang.org/genproto v0.0.0-20220614165028-45ed7f3ff16e/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1 h1:jCw9YRd2s40X9Vxi4zKsPRvSPlHWNqadVkpbMsCPzPQ= google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -1987,8 +1953,7 @@ google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -2004,8 +1969,7 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -2023,8 +1987,7 @@ gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKW gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= -gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= @@ -2113,81 +2076,14 @@ lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/b v1.0.0/go.mod h1:uZWcZfRj1BpYzfN9JTerzlNUnnPsV9O2ZA8JsRcubNg= modernc.org/cc/v3 v3.32.4/go.mod h1:0R6jl1aZlIl2avnYfbfHBS1QB6/f+16mihBObaBC878= -modernc.org/cc/v3 v3.33.6/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.33.9/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.33.11/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.34.0/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.0/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.4/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.5/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.7/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.8/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.10/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.15/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.16/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.17/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.18/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.20/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.22/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= -modernc.org/cc/v3 v3.35.24 h1:vlCqjhVwX15t1uwlMPpOpNRC7JTjMZ9lT9DYHKQTFuA= -modernc.org/cc/v3 v3.35.24/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/cc/v3 v3.36.0 h1:0kmRkTmqNidmu3c7BNDSdVHCxXCkWLmWmCIVX4LUboo= modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= modernc.org/ccgo/v3 v3.9.2/go.mod h1:gnJpy6NIVqkETT+L5zPsQFj7L2kkhfPMzOghRNv/CFo= -modernc.org/ccgo/v3 v3.9.5/go.mod h1:umuo2EP2oDSBnD3ckjaVUXMrmeAw8C8OSICVa0iFf60= -modernc.org/ccgo/v3 v3.10.0/go.mod h1:c0yBmkRFi7uW4J7fwx/JiijwOjeAeR2NoSaRVFPmjMw= -modernc.org/ccgo/v3 v3.11.0/go.mod h1:dGNposbDp9TOZ/1KBxghxtUp/bzErD0/0QW4hhSaBMI= -modernc.org/ccgo/v3 v3.11.1/go.mod h1:lWHxfsn13L3f7hgGsGlU28D9eUOf6y3ZYHKoPaKU0ag= -modernc.org/ccgo/v3 v3.11.3/go.mod h1:0oHunRBMBiXOKdaglfMlRPBALQqsfrCKXgw9okQ3GEw= -modernc.org/ccgo/v3 v3.12.4/go.mod h1:Bk+m6m2tsooJchP/Yk5ji56cClmN6R1cqc9o/YtbgBQ= -modernc.org/ccgo/v3 v3.12.6/go.mod h1:0Ji3ruvpFPpz+yu+1m0wk68pdr/LENABhTrDkMDWH6c= -modernc.org/ccgo/v3 v3.12.8/go.mod h1:Hq9keM4ZfjCDuDXxaHptpv9N24JhgBZmUG5q60iLgUo= -modernc.org/ccgo/v3 v3.12.11/go.mod h1:0jVcmyDwDKDGWbcrzQ+xwJjbhZruHtouiBEvDfoIsdg= -modernc.org/ccgo/v3 v3.12.14/go.mod h1:GhTu1k0YCpJSuWwtRAEHAol5W7g1/RRfS4/9hc9vF5I= -modernc.org/ccgo/v3 v3.12.18/go.mod h1:jvg/xVdWWmZACSgOiAhpWpwHWylbJaSzayCqNOJKIhs= -modernc.org/ccgo/v3 v3.12.20/go.mod h1:aKEdssiu7gVgSy/jjMastnv/q6wWGRbszbheXgWRHc8= -modernc.org/ccgo/v3 v3.12.21/go.mod h1:ydgg2tEprnyMn159ZO/N4pLBqpL7NOkJ88GT5zNU2dE= -modernc.org/ccgo/v3 v3.12.22/go.mod h1:nyDVFMmMWhMsgQw+5JH6B6o4MnZ+UQNw1pp52XYFPRk= -modernc.org/ccgo/v3 v3.12.25/go.mod h1:UaLyWI26TwyIT4+ZFNjkyTbsPsY3plAEB6E7L/vZV3w= -modernc.org/ccgo/v3 v3.12.29/go.mod h1:FXVjG7YLf9FetsS2OOYcwNhcdOLGt8S9bQ48+OP75cE= -modernc.org/ccgo/v3 v3.12.36/go.mod h1:uP3/Fiezp/Ga8onfvMLpREq+KUjUmYMxXPO8tETHtA8= -modernc.org/ccgo/v3 v3.12.38/go.mod h1:93O0G7baRST1vNj4wnZ49b1kLxt0xCW5Hsa2qRaZPqc= -modernc.org/ccgo/v3 v3.12.43/go.mod h1:k+DqGXd3o7W+inNujK15S5ZYuPoWYLpF5PYougCmthU= -modernc.org/ccgo/v3 v3.12.46/go.mod h1:UZe6EvMSqOxaJ4sznY7b23/k13R8XNlyWsO5bAmSgOE= -modernc.org/ccgo/v3 v3.12.47/go.mod h1:m8d6p0zNps187fhBwzY/ii6gxfjob1VxWb919Nk1HUk= -modernc.org/ccgo/v3 v3.12.50/go.mod h1:bu9YIwtg+HXQxBhsRDE+cJjQRuINuT9PUK4orOco/JI= -modernc.org/ccgo/v3 v3.12.51/go.mod h1:gaIIlx4YpmGO2bLye04/yeblmvWEmE4BBBls4aJXFiE= -modernc.org/ccgo/v3 v3.12.53/go.mod h1:8xWGGTFkdFEWBEsUmi+DBjwu/WLy3SSOrqEmKUjMeEg= -modernc.org/ccgo/v3 v3.12.54/go.mod h1:yANKFTm9llTFVX1FqNKHE0aMcQb1fuPJx6p8AcUx+74= -modernc.org/ccgo/v3 v3.12.55/go.mod h1:rsXiIyJi9psOwiBkplOaHye5L4MOOaCjHg1Fxkj7IeU= -modernc.org/ccgo/v3 v3.12.56/go.mod h1:ljeFks3faDseCkr60JMpeDb2GSO3TKAmrzm7q9YOcMU= -modernc.org/ccgo/v3 v3.12.57/go.mod h1:hNSF4DNVgBl8wYHpMvPqQWDQx8luqxDnNGCMM4NFNMc= -modernc.org/ccgo/v3 v3.12.60/go.mod h1:k/Nn0zdO1xHVWjPYVshDeWKqbRWIfif5dtsIOCUVMqM= -modernc.org/ccgo/v3 v3.12.66/go.mod h1:jUuxlCFZTUZLMV08s7B1ekHX5+LIAurKTTaugUr/EhQ= -modernc.org/ccgo/v3 v3.12.67/go.mod h1:Bll3KwKvGROizP2Xj17GEGOTrlvB1XcVaBrC90ORO84= -modernc.org/ccgo/v3 v3.12.73/go.mod h1:hngkB+nUUqzOf3iqsM48Gf1FZhY599qzVg1iX+BT3cQ= -modernc.org/ccgo/v3 v3.12.81/go.mod h1:p2A1duHoBBg1mFtYvnhAnQyI6vL0uw5PGYLSIgF6rYY= -modernc.org/ccgo/v3 v3.12.84/go.mod h1:ApbflUfa5BKadjHynCficldU1ghjen84tuM5jRynB7w= -modernc.org/ccgo/v3 v3.12.86/go.mod h1:dN7S26DLTgVSni1PVA3KxxHTcykyDurf3OgUzNqTSrU= -modernc.org/ccgo/v3 v3.12.88/go.mod h1:0MFzUHIuSIthpVZyMWiFYMwjiFnhrN5MkvBrUwON+ZM= -modernc.org/ccgo/v3 v3.12.90/go.mod h1:obhSc3CdivCRpYZmrvO88TXlW0NvoSVvdh/ccRjJYko= -modernc.org/ccgo/v3 v3.12.92/go.mod h1:5yDdN7ti9KWPi5bRVWPl8UNhpEAtCjuEE7ayQnzzqHA= -modernc.org/ccgo/v3 v3.12.95/go.mod h1:ZcLyvtocXYi8uF+9Ebm3G8EF8HNY5hGomBqthDp4eC8= -modernc.org/ccgo/v3 v3.13.1/go.mod h1:aBYVOUfIlcSnrsRVU8VRS35y2DIfpgkmVkYZ0tpIXi4= -modernc.org/ccgo/v3 v3.15.9/go.mod h1:md59wBwDT2LznX/OTCPoVS6KIsdRgY8xqQwBV+hkTH0= -modernc.org/ccgo/v3 v3.15.10/go.mod h1:wQKxoFn0ynxMuCLfFD09c8XPUCc8obfchoVR9Cn0fI8= -modernc.org/ccgo/v3 v3.15.12/go.mod h1:VFePOWoCd8uDGRJpq/zfJ29D0EVzMSyID8LCMWYbX6I= -modernc.org/ccgo/v3 v3.15.14/go.mod h1:144Sz2iBCKogb9OKwsu7hQEub3EVgOlyI8wMUPGKUXQ= -modernc.org/ccgo/v3 v3.15.15/go.mod h1:z5qltXjU4PJl0pE5nhYQCvA9DhPHiWsl5GWl89+NSYE= -modernc.org/ccgo/v3 v3.15.16/go.mod h1:XbKRMeMWMdq712Tr5ECgATYMrzJ+g9zAZEj2ktzBe24= -modernc.org/ccgo/v3 v3.15.17 h1:svaDk4rfh7XQPBwkqzjKK8bta/vK4VVL3JP6ZLbcr0w= -modernc.org/ccgo/v3 v3.15.17/go.mod h1:bofnFkpRFf5gLY+mBZIyTW6FEcp26xi2lgOFk2Rlvs0= modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= modernc.org/ccgo/v3 v3.16.6 h1:3l18poV+iUemQ98O3X5OMr97LOqlzis+ytivU4NqGhA= modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccorpus v1.11.1/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/db v1.0.0/go.mod h1:kYD/cO29L/29RM0hXYl4i3+Q5VojL31kTUVpVJDw0s8= @@ -2200,57 +2096,6 @@ modernc.org/internal v1.0.0/go.mod h1:VUD/+JAkhCpvkUitlEOnhpVxCgsBI90oTzSCRcqQVS modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= modernc.org/libc v1.7.13-0.20210308123627-12f642a52bb8/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= modernc.org/libc v1.9.5/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= -modernc.org/libc v1.9.8/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= -modernc.org/libc v1.9.11/go.mod h1:NyF3tsA5ArIjJ83XB0JlqhjTabTCHm9aX4XMPHyQn0Q= -modernc.org/libc v1.11.0/go.mod h1:2lOfPmj7cz+g1MrPNmX65QCzVxgNq2C5o0jdLY2gAYg= -modernc.org/libc v1.11.2/go.mod h1:ioIyrl3ETkugDO3SGZ+6EOKvlP3zSOycUETe4XM4n8M= -modernc.org/libc v1.11.5/go.mod h1:k3HDCP95A6U111Q5TmG3nAyUcp3kR5YFZTeDS9v8vSU= -modernc.org/libc v1.11.6/go.mod h1:ddqmzR6p5i4jIGK1d/EiSw97LBcE3dK24QEwCFvgNgE= -modernc.org/libc v1.11.11/go.mod h1:lXEp9QOOk4qAYOtL3BmMve99S5Owz7Qyowzvg6LiZso= -modernc.org/libc v1.11.13/go.mod h1:ZYawJWlXIzXy2Pzghaf7YfM8OKacP3eZQI81PDLFdY8= -modernc.org/libc v1.11.16/go.mod h1:+DJquzYi+DMRUtWI1YNxrlQO6TcA5+dRRiq8HWBWRC8= -modernc.org/libc v1.11.19/go.mod h1:e0dgEame6mkydy19KKaVPBeEnyJB4LGNb0bBH1EtQ3I= -modernc.org/libc v1.11.24/go.mod h1:FOSzE0UwookyT1TtCJrRkvsOrX2k38HoInhw+cSCUGk= -modernc.org/libc v1.11.26/go.mod h1:SFjnYi9OSd2W7f4ct622o/PAYqk7KHv6GS8NZULIjKY= -modernc.org/libc v1.11.27/go.mod h1:zmWm6kcFXt/jpzeCgfvUNswM0qke8qVwxqZrnddlDiE= -modernc.org/libc v1.11.28/go.mod h1:Ii4V0fTFcbq3qrv3CNn+OGHAvzqMBvC7dBNyC4vHZlg= -modernc.org/libc v1.11.31/go.mod h1:FpBncUkEAtopRNJj8aRo29qUiyx5AvAlAxzlx9GNaVM= -modernc.org/libc v1.11.34/go.mod h1:+Tzc4hnb1iaX/SKAutJmfzES6awxfU1BPvrrJO0pYLg= -modernc.org/libc v1.11.37/go.mod h1:dCQebOwoO1046yTrfUE5nX1f3YpGZQKNcITUYWlrAWo= -modernc.org/libc v1.11.39/go.mod h1:mV8lJMo2S5A31uD0k1cMu7vrJbSA3J3waQJxpV4iqx8= -modernc.org/libc v1.11.42/go.mod h1:yzrLDU+sSjLE+D4bIhS7q1L5UwXDOw99PLSX0BlZvSQ= -modernc.org/libc v1.11.44/go.mod h1:KFq33jsma7F5WXiYelU8quMJasCCTnHK0mkri4yPHgA= -modernc.org/libc v1.11.45/go.mod h1:Y192orvfVQQYFzCNsn+Xt0Hxt4DiO4USpLNXBlXg/tM= -modernc.org/libc v1.11.47/go.mod h1:tPkE4PzCTW27E6AIKIR5IwHAQKCAtudEIeAV1/SiyBg= -modernc.org/libc v1.11.49/go.mod h1:9JrJuK5WTtoTWIFQ7QjX2Mb/bagYdZdscI3xrvHbXjE= -modernc.org/libc v1.11.51/go.mod h1:R9I8u9TS+meaWLdbfQhq2kFknTW0O3aw3kEMqDDxMaM= -modernc.org/libc v1.11.53/go.mod h1:5ip5vWYPAoMulkQ5XlSJTy12Sz5U6blOQiYasilVPsU= -modernc.org/libc v1.11.54/go.mod h1:S/FVnskbzVUrjfBqlGFIPA5m7UwB3n9fojHhCNfSsnw= -modernc.org/libc v1.11.55/go.mod h1:j2A5YBRm6HjNkoSs/fzZrSxCuwWqcMYTDPLNx0URn3M= -modernc.org/libc v1.11.56/go.mod h1:pakHkg5JdMLt2OgRadpPOTnyRXm/uzu+Yyg/LSLdi18= -modernc.org/libc v1.11.58/go.mod h1:ns94Rxv0OWyoQrDqMFfWwka2BcaF6/61CqJRK9LP7S8= -modernc.org/libc v1.11.71/go.mod h1:DUOmMYe+IvKi9n6Mycyx3DbjfzSKrdr/0Vgt3j7P5gw= -modernc.org/libc v1.11.75/go.mod h1:dGRVugT6edz361wmD9gk6ax1AbDSe0x5vji0dGJiPT0= -modernc.org/libc v1.11.82/go.mod h1:NF+Ek1BOl2jeC7lw3a7Jj5PWyHPwWD4aq3wVKxqV1fI= -modernc.org/libc v1.11.86/go.mod h1:ePuYgoQLmvxdNT06RpGnaDKJmDNEkV7ZPKI2jnsvZoE= -modernc.org/libc v1.11.87/go.mod h1:Qvd5iXTeLhI5PS0XSyqMY99282y+3euapQFxM7jYnpY= -modernc.org/libc v1.11.88/go.mod h1:h3oIVe8dxmTcchcFuCcJ4nAWaoiwzKCdv82MM0oiIdQ= -modernc.org/libc v1.11.90/go.mod h1:ynK5sbjsU77AP+nn61+k+wxUGRx9rOFcIqWYYMaDZ4c= -modernc.org/libc v1.11.98/go.mod h1:ynK5sbjsU77AP+nn61+k+wxUGRx9rOFcIqWYYMaDZ4c= -modernc.org/libc v1.11.99/go.mod h1:wLLYgEiY2D17NbBOEp+mIJJJBGSiy7fLL4ZrGGZ+8jI= -modernc.org/libc v1.11.101/go.mod h1:wLLYgEiY2D17NbBOEp+mIJJJBGSiy7fLL4ZrGGZ+8jI= -modernc.org/libc v1.11.104/go.mod h1:2MH3DaF/gCU8i/UBiVE1VFRos4o523M7zipmwH8SIgQ= -modernc.org/libc v1.12.0/go.mod h1:2MH3DaF/gCU8i/UBiVE1VFRos4o523M7zipmwH8SIgQ= -modernc.org/libc v1.14.1/go.mod h1:npFeGWjmZTjFeWALQLrvklVmAxv4m80jnG3+xI8FdJk= -modernc.org/libc v1.14.2/go.mod h1:MX1GBLnRLNdvmK9azU9LCxZ5lMyhrbEMK8rG3X/Fe34= -modernc.org/libc v1.14.3/go.mod h1:GPIvQVOVPizzlqyRX3l756/3ppsAgg1QgPxjr5Q4agQ= -modernc.org/libc v1.14.6/go.mod h1:2PJHINagVxO4QW/5OQdRrvMYo+bm5ClpUFfyXCYl9ak= -modernc.org/libc v1.14.7/go.mod h1:f8xfWXW8LW41qb4X5+huVQo5dcfPlq7Cbny2TDheMv0= -modernc.org/libc v1.14.8/go.mod h1:9+JCLb1MWSY23smyOpIPbd5ED+rSS/ieiDWUpdyO3mo= -modernc.org/libc v1.14.10/go.mod h1:y1MtIWhwpJFpLYm6grAThtuXJKEsY6xkdZmXbRngIdo= -modernc.org/libc v1.14.11/go.mod h1:l5/Mz/GrZwOqzwRHA3abgSCnSeJzzTl+Ify0bAwKbAw= -modernc.org/libc v1.14.12 h1:pUBZTYoISfbb4pCf4PECENpbvwDBxeKc+/dS9LyOWFM= -modernc.org/libc v1.14.12/go.mod h1:fJdoe23MHu2ruPQkFPPqCpToDi5cckzsbmkI6Ez0LqQ= modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= modernc.org/libc v1.16.7 h1:qzQtHhsZNpVPpeCu+aMIQldXeV1P0vRhSqCL0nOIJOA= @@ -2259,14 +2104,9 @@ modernc.org/lldb v1.0.0/go.mod h1:jcRvJGWfCGodDZz8BPwiKMJxGJngQ/5DrRapkQnLob8= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/memory v1.0.4/go.mod h1:nV2OApxradM3/OVbs2/0OsP6nPfakXpi50C7dcoHXlc= -modernc.org/memory v1.0.5/go.mod h1:B7OYswTRnfGg+4tDH1t1OeUNnsy2viGTdME4tzd+IjM= -modernc.org/memory v1.0.6/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.0.7 h1:UE3cxTRFa5tfUibAV7Jqq8P7zRY0OlJg+yWVIIaluEE= -modernc.org/memory v1.0.7/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= modernc.org/memory v1.1.1 h1:bDOL0DIDLQv7bWhP3gMvIrnoFw+Eo6F7a2QK9HPDiFU= modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A= @@ -2274,26 +2114,19 @@ modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/ql v1.0.0/go.mod h1:xGVyrLIatPcO2C1JvI/Co8c0sr6y91HKFNy4pt9JXEY= modernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k= modernc.org/sqlite v1.10.6/go.mod h1:Z9FEjUtZP4qFEg6/SiADg9XCER7aYy9a/j7Pg9P7CPs= -modernc.org/sqlite v1.14.3/go.mod h1:xMpicS1i2MJ4C8+Ap0vYBqTwYfpFvdnPE6brbFOtV2Y= -modernc.org/sqlite v1.15.3 h1:3C4AWicF7S5vUUFJuBi7Ws8eWlPjqyo/c4Z1UGYBbyg= -modernc.org/sqlite v1.15.3/go.mod h1:J7GAPbk8Txp0DJnT8TGwpUqJW0Z1cK2YpzjoXaZRU8k= modernc.org/sqlite v1.18.0 h1:ef66qJSgKeyLyrF4kQ2RHw/Ue3V89fyFNbGL073aDjI= modernc.org/sqlite v1.18.0/go.mod h1:B9fRWZacNxJBHoCJZQr1R54zhVn3fjfl0aszflrTSxY= modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs= modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= modernc.org/tcl v1.5.2/go.mod h1:pmJYOLgpiys3oI4AeAafkcUfE+TKKilminxNyU/+Zlo= -modernc.org/tcl v1.9.2/go.mod h1:aw7OnlIoiuJgu1gwbTZtrKnGpDqH9wyH++jZcxdqNsg= -modernc.org/tcl v1.11.2 h1:mXpsx3AZqJt83uDiFu9UYQVBjNjaWKGCF1YDSlpCL6Y= -modernc.org/tcl v1.11.2/go.mod h1:BRzgpajcGdS2qTxniOx9c/dcxjlbA7p12eJNmiriQYo= +modernc.org/tcl v1.13.1 h1:npxzTwFTZYM8ghWicVIX1cRWzj7Nd8i6AqqX2p+IYao= modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.0.1-0.20210308123920-1f282aa71362/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA= modernc.org/z v1.0.1/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA= -modernc.org/z v1.2.20/go.mod h1:zU9FiF4PbHdOTUxw+IF8j7ArBMRPsHgq10uVPt6xTzo= -modernc.org/z v1.3.2 h1:4GWBVMa48UDC7KQ9tnaggN/yTlXg+CdCX9bhgHPQ9AM= -modernc.org/z v1.3.2/go.mod h1:PEU2oK2OEA1CfzDTd+8E908qEXhC9s0MfyKp5LZsd+k= +modernc.org/z v1.5.1 h1:RTNHdsrOpeoSeOF4FbzTo8gBYByaJ5xT7NgZ9ZqRiJM= modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= modernc.org/zappy v1.0.0/go.mod h1:hHe+oGahLVII/aTTyWK/b53VDHMAGCBYYeZ9sn83HC4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/server/model/compliance.go b/server/model/compliance.go index 69a292368..6aa6a855b 100644 --- a/server/model/compliance.go +++ b/server/model/compliance.go @@ -2,14 +2,87 @@ // See LICENSE.txt for license information. package model -// ComplianceResponse is the generic response body to a compliance API +// BaordsComplianceResponse is the response body to a request for boards. // swagger:model -type ComplianceResponse struct { - // Is there a next page for pagination? +type BoardsComplianceResponse struct { + // True if there is a next page for pagination // required: true HasNext bool `json:"hasNext"` - // The array of results + // The array of board records. // required: true - Results interface{} `json:"results"` + Results []*Board `json:"results"` +} + +// BoardsComplianceHistoryResponse is the response body to a request for boards history. +// swagger:model +type BoardsComplianceHistoryResponse struct { + // True if there is a next page for pagination + // required: true + HasNext bool `json:"hasNext"` + + // The array of BoardHistory records. + // required: true + Results []BoardHistory `json:"results"` +} + +// BlocksComplianceHistoryResponse is the response body to a request for blocks history. +// swagger:model +type BlocksComplianceHistoryResponse struct { + // True if there is a next page for pagination + // required: true + HasNext bool `json:"hasNext"` + + // The array of BlockHistory records. + // required: true + Results []BlockHistory `json:"results"` +} + +// BoardHistory provides information about the history of a board. +// swagger:model +type BoardHistory struct { + ID string `json:"id"` + TeamID string `json:"teamId"` + IsDeleted bool `json:"isDeleted"` + DescendantLastUpdateAt int64 `json:"descendantLastUpdateAt"` + DescendantFirstUpdateAt int64 `json:"descendantFirstUpdateAt"` + CreatedBy string `json:"createdBy"` + LastModifiedBy string `json:"lastModifiedBy"` +} + +// BlockHistory provides information about the history of a block. +// swagger:model +type BlockHistory struct { + ID string `json:"id"` + TeamID string `json:"teamId"` + BoardID string `json:"boardId"` + Type string `json:"type"` + IsDeleted bool `json:"isDeleted"` + LastUpdateAt int64 `json:"lastUpdateAt"` + FirstUpdateAt int64 `json:"firstUpdateAt"` + CreatedBy string `json:"createdBy"` + LastModifiedBy string `json:"lastModifiedBy"` +} + +type QueryBoardsForComplianceOptions struct { + TeamID string // if not empty then filter for specific team, otherwise all teams are included + Page int // page number to select when paginating + PerPage int // number of blocks per page (default=60) +} + +type QueryBoardsComplianceHistoryOptions struct { + ModifiedSince int64 // if non-zero then filter for records with update_at greater than ModifiedSince + IncludeDeleted bool // if true then deleted blocks are included + TeamID string // if not empty then filter for specific team, otherwise all teams are included + Page int // page number to select when paginating + PerPage int // number of blocks per page (default=60) +} + +type QueryBlocksComplianceHistoryOptions struct { + ModifiedSince int64 // if non-zero then filter for records with update_at greater than ModifiedSince + IncludeDeleted bool // if true then deleted blocks are included + TeamID string // if not empty then filter for specific team, otherwise all teams are included + BoardID string // if not empty then filter for specific board, otherwise all boards are included + Page int // page number to select when paginating + PerPage int // number of blocks per page (default=60) } diff --git a/server/services/store/mattermostauthlayer/mattermostauthlayer.go b/server/services/store/mattermostauthlayer/mattermostauthlayer.go index 53d521e1f..f7dda8185 100644 --- a/server/services/store/mattermostauthlayer/mattermostauthlayer.go +++ b/server/services/store/mattermostauthlayer/mattermostauthlayer.go @@ -1145,108 +1145,6 @@ func (s *MattermostAuthLayer) GetMembersForBoard(boardID string) ([]*model.Board return members, nil } -func (s *MattermostAuthLayer) GetBoardsForTeam(teamID string, page, perPage int) ([]*model.Board, error) { - query := s.getQueryBuilder(). - Select(boardFields("b.")...). - From(s.tablePrefix + "boards as b") - - if teamID != "" { - query = query.Where(sq.Eq{"b.team_id": teamID}) - } - - if page != 0 { - query = query.Offset(uint64(page * perPage)) - } - - if perPage > 0 { - // N+1 to check if there's a next page for pagination - query = query.Limit(uint64(perPage) + 1) - } - - rows, err := query.Query() - if err != nil { - s.logger.Error(`GetBoardsForTeam ERROR`, mlog.Err(err)) - return nil, err - } - defer s.CloseRows(rows) - - return s.boardsFromRows(rows, true) -} - -func (s *MattermostAuthLayer) GetBoardsHistory(modifiedSince int, includeDeleted bool, teamID string, page, perPage int) ([]*model.Board, error) { - query := s.getQueryBuilder(). - Select("*"). // TODO: specify - From(s.tablePrefix + "boards_history as bh"). - Where(sq.Gt{"bh.update_at": modifiedSince}) - // TODO: order by, do after creating BoardMetadata struct - // maybe could just do a variation of app.GetBoardMetadata() - - if !includeDeleted { - query = query.Where(sq.Eq{"bh.delete_at": 0}) - } - - if teamID != "" { - query = query.Where(sq.Eq{"bh.team_id": teamID}) - } - - if page != 0 { - query = query.Offset(uint64(page * perPage)) - } - - if perPage > 0 { - // N+1 to check if there's a next page for pagination - query = query.Limit(uint64(perPage) + 1) - } - - rows, err := query.Query() - if err != nil { - s.logger.Error(`GetBoardsHistory ERROR`, mlog.Err(err)) - return nil, err - } - defer s.CloseRows(rows) - - return s.boardsFromRows(rows, true) -} - -func (s *MattermostAuthLayer) GetBlocksHistory(modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) ([]*model.Board, error) { - query := s.getQueryBuilder(). - Select("*"). // TODO: specify - From(s.tablePrefix + "blocks_history as bh"). - Where(sq.Gt{"bh.update_at": modifiedSince}). - OrderBy("bh.update_at DESC") - - if !includeDeleted { - query = query.Where(sq.Eq{"bh.delete_at": 0}) - } - - if teamID != "" { - query = query.Where(sq.Eq{"bh.team_id": teamID}) - } - - if boardID != "" { - query = query.Where(sq.Eq{"bh.board_id": boardID}) - } - - if page != 0 { - query = query.Offset(uint64(page * perPage)) - } - - if perPage > 0 { - // N+1 to check if there's a next page for pagination - query = query.Limit(uint64(perPage) + 1) - } - - rows, err := query.Query() - if err != nil { - s.logger.Error(`GetBlocksHistory ERROR`, mlog.Err(err)) - return nil, err - } - defer s.CloseRows(rows) - - // TODO: blocks, not boards: copy implementation from SQLStore? - return s.boardsFromRows(rows, true) -} - func (s *MattermostAuthLayer) GetBoardsForUserAndTeam(userID, teamID string, includePublicBoards bool) ([]*model.Board, error) { if includePublicBoards { boards, err := s.SearchBoardsForUserInTeam(teamID, "", userID) diff --git a/server/services/store/mockstore/mockstore.go b/server/services/store/mockstore/mockstore.go index 63813e7a7..5e3b90340 100644 --- a/server/services/store/mockstore/mockstore.go +++ b/server/services/store/mockstore/mockstore.go @@ -487,6 +487,22 @@ func (mr *MockStoreMockRecorder) GetBlocksByIDs(arg0 interface{}) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocksByIDs", reflect.TypeOf((*MockStore)(nil).GetBlocksByIDs), arg0) } +// GetBlocksComplianceHistory mocks base method. +func (m *MockStore) GetBlocksComplianceHistory(arg0 model.QueryBlocksComplianceHistoryOptions) ([]model.BlockHistory, bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetBlocksComplianceHistory", arg0) + ret0, _ := ret[0].([]model.BlockHistory) + ret1, _ := ret[1].(bool) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// GetBlocksComplianceHistory indicates an expected call of GetBlocksComplianceHistory. +func (mr *MockStoreMockRecorder) GetBlocksComplianceHistory(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocksComplianceHistory", reflect.TypeOf((*MockStore)(nil).GetBlocksComplianceHistory), arg0) +} + // GetBlocksForBoard mocks base method. func (m *MockStore) GetBlocksForBoard(arg0 string) ([]*model.Block, error) { m.ctrl.T.Helper() @@ -639,6 +655,38 @@ func (mr *MockStoreMockRecorder) GetBoardMemberHistory(arg0, arg1, arg2 interfac return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBoardMemberHistory", reflect.TypeOf((*MockStore)(nil).GetBoardMemberHistory), arg0, arg1, arg2) } +// GetBoardsComplianceHistory mocks base method. +func (m *MockStore) GetBoardsComplianceHistory(arg0 model.QueryBoardsComplianceHistoryOptions) ([]model.BoardHistory, bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetBoardsComplianceHistory", arg0) + ret0, _ := ret[0].([]model.BoardHistory) + ret1, _ := ret[1].(bool) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// GetBoardsComplianceHistory indicates an expected call of GetBoardsComplianceHistory. +func (mr *MockStoreMockRecorder) GetBoardsComplianceHistory(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBoardsComplianceHistory", reflect.TypeOf((*MockStore)(nil).GetBoardsComplianceHistory), arg0) +} + +// GetBoardsForCompliance mocks base method. +func (m *MockStore) GetBoardsForCompliance(arg0 model.QueryBoardsForComplianceOptions) ([]*model.Board, bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetBoardsForCompliance", arg0) + ret0, _ := ret[0].([]*model.Board) + ret1, _ := ret[1].(bool) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// GetBoardsForCompliance indicates an expected call of GetBoardsForCompliance. +func (mr *MockStoreMockRecorder) GetBoardsForCompliance(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBoardsForCompliance", reflect.TypeOf((*MockStore)(nil).GetBoardsForCompliance), arg0) +} + // GetBoardsForUserAndTeam mocks base method. func (m *MockStore) GetBoardsForUserAndTeam(arg0, arg1 string, arg2 bool) ([]*model.Board, error) { m.ctrl.T.Helper() diff --git a/server/services/store/sqlstore/compliance.go b/server/services/store/sqlstore/compliance.go new file mode 100644 index 000000000..9211856f1 --- /dev/null +++ b/server/services/store/sqlstore/compliance.go @@ -0,0 +1,230 @@ +package sqlstore + +import ( + "database/sql" + + sq "github.com/Masterminds/squirrel" + "github.com/mattermost/focalboard/server/model" + + "github.com/mattermost/mattermost-server/v6/shared/mlog" +) + +func (s *SQLStore) getBoardsForCompliance(db sq.BaseRunner, opts model.QueryBoardsForComplianceOptions) ([]*model.Board, bool, error) { + query := s.getQueryBuilder(db). + Select(boardFields("b.")...). + From(s.tablePrefix + "boards as b") + + if opts.TeamID != "" { + query = query.Where(sq.Eq{"b.team_id": opts.TeamID}) + } + + if opts.Page != 0 { + query = query.Offset(uint64(opts.Page * opts.PerPage)) + } + + if opts.PerPage > 0 { + // N+1 to check if there's a next page for pagination + query = query.Limit(uint64(opts.PerPage) + 1) + } + + rows, err := query.Query() + if err != nil { + s.logger.Error(`GetBoardsForCompliance ERROR`, mlog.Err(err)) + return nil, false, err + } + defer s.CloseRows(rows) + + boards, err := s.boardsFromRows(rows) + if err != nil { + return nil, false, err + } + + var hasMore bool + if opts.PerPage > 0 && len(boards) > opts.PerPage { + boards = boards[0:opts.PerPage] + hasMore = true + } + return boards, hasMore, nil +} + +func (s *SQLStore) getBoardsComplianceHistory(db sq.BaseRunner, opts model.QueryBoardsComplianceHistoryOptions) ([]model.BoardHistory, bool, error) { + queryDescendentLastUpdate := s.getQueryBuilder(db). + Select("MAX(blk1.update_at)"). + From(s.tablePrefix + "blocks_history as blk1"). + Where(sq.Eq{"blk1.board_id": "bh.id"}) + + if !opts.IncludeDeleted { + queryDescendentLastUpdate.Where(sq.Eq{"blk1.delete_at": 0}) + } + + sqlDescendentLastUpdate, _, _ := queryDescendentLastUpdate.ToSql() + + queryDescendentFirstUpdate := s.getQueryBuilder(db). + Select("MIN(blk2.update_at)"). + From(s.tablePrefix + "blocks_history as blk2"). + Where(sq.Eq{"blk2.board_id": "bh.id"}) + + if !opts.IncludeDeleted { + queryDescendentFirstUpdate.Where(sq.Eq{"blk2.delete_at": 0}) + } + + sqlDescendentFirstUpdate, _, _ := queryDescendentFirstUpdate.ToSql() + + query := s.getQueryBuilder(db). + Select( + "bh.id", + "bh.team_id", + "CASE WHEN bh.delete_at=0 THEN false ELSE true END AS isDeleted", + "("+sqlDescendentLastUpdate+") as decendentLastUpdateAt", + "("+sqlDescendentFirstUpdate+") as decendentFirstUpdateAt", + "bh.created_by", + "bh.modified_by", + ). + From(s.tablePrefix+"boards_history as bh"). + Where(sq.Gt{"bh.update_at": opts.ModifiedSince}). + GroupBy("bh.id", "bh.team_id", "bh.delete_at", "bh.created_by", "bh.modified_by"). + OrderBy("decendentLastUpdateAt desc") + + if !opts.IncludeDeleted { + query = query.Where(sq.Eq{"bh.delete_at": 0}) + } + + if opts.TeamID != "" { + query = query.Where(sq.Eq{"bh.team_id": opts.TeamID}) + } + + if opts.Page != 0 { + query = query.Offset(uint64(opts.Page * opts.PerPage)) + } + + if opts.PerPage > 0 { + // N+1 to check if there's a next page for pagination + query = query.Limit(uint64(opts.PerPage) + 1) + } + + rows, err := query.Query() + if err != nil { + s.logger.Error(`GetBoardsComplianceHistory ERROR`, mlog.Err(err)) + return nil, false, err + } + defer s.CloseRows(rows) + + history, err := s.boardsHistoryFromRows(rows) + + var hasMore bool + if opts.PerPage > 0 && len(history) > opts.PerPage { + history = history[0:opts.PerPage] + hasMore = true + } + return history, hasMore, nil +} + +func (s *SQLStore) getBlocksComplianceHistory(db sq.BaseRunner, opts model.QueryBlocksComplianceHistoryOptions) ([]model.BlockHistory, bool, error) { + query := s.getQueryBuilder(db). + Select( + "bh.id", + "brd.team_id", + "bh.board_id", + "bh.type", + "CASE WHEN bh.delete_at=0 THEN false ELSE true END AS isDeleted", + "max(bh.update_at) as lastUpdateAt", + "min(bh.update_at) as firstUpdateAt", + "bh.created_by", + "bh.modified_by", + ). + From(s.tablePrefix+"blocks_history as bh"). + Join(s.tablePrefix+"boards as brd on brd.id=bh.board_id"). + Where(sq.Gt{"bh.update_at": opts.ModifiedSince}). + GroupBy("bh.id", "bh.team_id", "bh.board_id", "bh.type", "bh.delete_at", "bh.created_by", "bh.modified_by"). + OrderBy("lastUpdateAt desc") + + if !opts.IncludeDeleted { + query = query.Where(sq.Eq{"bh.delete_at": 0}) + } + + if opts.TeamID != "" { + query = query.Where(sq.Eq{"bh.team_id": opts.TeamID}) + } + + if opts.BoardID != "" { + query = query.Where(sq.Eq{"bh.board_id": opts.BoardID}) + } + + if opts.Page != 0 { + query = query.Offset(uint64(opts.Page * opts.PerPage)) + } + + if opts.PerPage > 0 { + // N+1 to check if there's a next page for pagination + query = query.Limit(uint64(opts.PerPage) + 1) + } + + rows, err := query.Query() + if err != nil { + s.logger.Error(`GetBlocksComplianceHistory ERROR`, mlog.Err(err)) + return nil, false, err + } + defer s.CloseRows(rows) + + history, err := s.blocksHistoryFromRows(rows) + + var hasMore bool + if opts.PerPage > 0 && len(history) > opts.PerPage { + history = history[0:opts.PerPage] + hasMore = true + } + return history, hasMore, nil +} + +func (s *SQLStore) boardsHistoryFromRows(rows *sql.Rows) ([]model.BoardHistory, error) { + history := []model.BoardHistory{} + + for rows.Next() { + var boardHistory model.BoardHistory + + err := rows.Scan( + &boardHistory.ID, + &boardHistory.TeamID, + &boardHistory.IsDeleted, + &boardHistory.CreatedBy, + &boardHistory.DescendantLastUpdateAt, + &boardHistory.DescendantFirstUpdateAt, + &boardHistory.CreatedBy, + &boardHistory.LastModifiedBy, + ) + if err != nil { + s.logger.Error("boardsHistoryFromRows scan error", mlog.Err(err)) + return nil, err + } + + history = append(history, boardHistory) + } + return history, nil +} + +func (s *SQLStore) blocksHistoryFromRows(rows *sql.Rows) ([]model.BlockHistory, error) { + history := []model.BlockHistory{} + + for rows.Next() { + var blockHistory model.BlockHistory + + err := rows.Scan( + &blockHistory.ID, + &blockHistory.TeamID, + &blockHistory.BoardID, + &blockHistory.Type, + &blockHistory.IsDeleted, + &blockHistory.LastUpdateAt, + &blockHistory.FirstUpdateAt, + &blockHistory.CreatedBy, + &blockHistory.LastModifiedBy, + ) + if err != nil { + s.logger.Error("blocksHistoryFromRows scan error", mlog.Err(err)) + return nil, err + } + + history = append(history, blockHistory) + } + return history, nil +} diff --git a/server/services/store/sqlstore/public_methods.go b/server/services/store/sqlstore/public_methods.go index e3acf4955..6222642d3 100644 --- a/server/services/store/sqlstore/public_methods.go +++ b/server/services/store/sqlstore/public_methods.go @@ -343,6 +343,11 @@ func (s *SQLStore) GetBlocksByIDs(ids []string) ([]*model.Block, error) { } +func (s *SQLStore) GetBlocksComplianceHistory(opts model.QueryBlocksComplianceHistoryOptions) ([]model.BlockHistory, bool, error) { + return s.getBlocksComplianceHistory(s.db, opts) + +} + func (s *SQLStore) GetBlocksForBoard(boardID string) ([]*model.Block, error) { return s.getBlocksForBoard(s.db, boardID) @@ -393,6 +398,16 @@ func (s *SQLStore) GetBoardMemberHistory(boardID string, userID string, limit ui } +func (s *SQLStore) GetBoardsComplianceHistory(opts model.QueryBoardsComplianceHistoryOptions) ([]model.BoardHistory, bool, error) { + return s.getBoardsComplianceHistory(s.db, opts) + +} + +func (s *SQLStore) GetBoardsForCompliance(opts model.QueryBoardsForComplianceOptions) ([]*model.Board, bool, error) { + return s.getBoardsForCompliance(s.db, opts) + +} + func (s *SQLStore) GetBoardsForUserAndTeam(userID string, teamID string, includePublicBoards bool) ([]*model.Board, error) { return s.getBoardsForUserAndTeam(s.db, userID, teamID, includePublicBoards) diff --git a/server/services/store/store.go b/server/services/store/store.go index dccedce3b..4e3051c18 100644 --- a/server/services/store/store.go +++ b/server/services/store/store.go @@ -92,9 +92,6 @@ type Store interface { // @withTransaction PatchBoard(boardID string, boardPatch *model.BoardPatch, userID string) (*model.Board, error) GetBoard(id string) (*model.Board, error) - GetBoardsForTeam(teamID string, page, perPage int) ([]*model.Board, error) - GetBoardsHistory(modifiedSince int, includeDeleted bool, teamID string, page, perPage int) ([]*model.Board, error) - GetBlocksHistory(modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) ([]*model.Block, error) GetBoardsForUserAndTeam(userID, teamID string, includePublicBoards bool) ([]*model.Board, error) GetBoardsInTeamByIds(boardIDs []string, teamID string) ([]*model.Board, error) // @withTransaction @@ -175,6 +172,11 @@ type Store interface { GetUserBoardsInsights(teamID string, userID string, since int64, offset int, limit int, boardIDs []string) (*model.BoardInsightsList, error) GetUserTimezone(userID string) (string, error) + // Compliance + GetBoardsForCompliance(opts model.QueryBoardsForComplianceOptions) ([]*model.Board, bool, error) + GetBoardsComplianceHistory(opts model.QueryBoardsComplianceHistoryOptions) ([]model.BoardHistory, bool, error) + GetBlocksComplianceHistory(opts model.QueryBlocksComplianceHistoryOptions) ([]model.BlockHistory, bool, error) + // For unit testing only DeleteBoardRecord(boardID, modifiedBy string) error DeleteBlockRecord(blockID, modifiedBy string) error From dd1e64958f97bb95384f2c5b0c9e09fd7366ce43 Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Sat, 31 Dec 2022 15:16:22 -0500 Subject: [PATCH 09/75] integration tests for GetBoardsForCompliance --- server/api/compliance.go | 15 ++- server/integrationtests/clienttestlib.go | 10 ++ server/integrationtests/compliance_test.go | 116 +++++++++++++++++++++ server/integrationtests/pluginteststore.go | 28 ++++- 4 files changed, 164 insertions(+), 5 deletions(-) create mode 100644 server/integrationtests/compliance_test.go diff --git a/server/api/compliance.go b/server/api/compliance.go index f6d4ed643..33545baaf 100644 --- a/server/api/compliance.go +++ b/server/api/compliance.go @@ -9,7 +9,7 @@ import ( "github.com/gorilla/mux" "github.com/mattermost/focalboard/server/model" - mmModel "github.com/mattermost/mattermost-server/v6/model" + mm_model "github.com/mattermost/mattermost-server/v6/model" "github.com/mattermost/mattermost-server/v6/shared/mlog" ) @@ -35,7 +35,7 @@ func (a *API) handleGetBoardsForCompliance(w http.ResponseWriter, r *http.Reques // Valid authorization (`manage_system`)? userID := getUserID(r) - if !a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { + if !a.permissions.HasPermissionTo(userID, mm_model.PermissionManageSystem) { a.errorResponse(w, r, model.NewErrUnauthorized("access denied Compliance Export getAllBoards")) return } @@ -47,6 +47,13 @@ func (a *API) handleGetBoardsForCompliance(w http.ResponseWriter, r *http.Reques return } + // check for valid team + _, err := a.app.GetTeam(teamID) + if err != nil { + a.errorResponse(w, r, model.NewErrBadRequest("invalid team id: "+teamID)) + return + } + if strPage == "" { strPage = complianceDefaultPage } @@ -114,7 +121,7 @@ func (a *API) handleGetBoardsComplianceHistory(w http.ResponseWriter, r *http.Re // Valid authorization (`manage_system`)? userID := getUserID(r) - if !a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { + if !a.permissions.HasPermissionTo(userID, mm_model.PermissionManageSystem) { a.errorResponse(w, r, model.NewErrUnauthorized("access denied Compliance Export getBoardsHistory")) return } @@ -202,7 +209,7 @@ func (a *API) handleGetBlocksComplianceHistory(w http.ResponseWriter, r *http.Re // Valid authorization (`manage_system`)? userID := getUserID(r) - if !a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { + if !a.permissions.HasPermissionTo(userID, mm_model.PermissionManageSystem) { a.errorResponse(w, r, model.NewErrUnauthorized("access denied Compliance Export getBlocksHistory")) return } diff --git a/server/integrationtests/clienttestlib.go b/server/integrationtests/clienttestlib.go index 46607e38c..6718df218 100644 --- a/server/integrationtests/clienttestlib.go +++ b/server/integrationtests/clienttestlib.go @@ -457,6 +457,16 @@ func (th *TestHelper) CreateBoard(teamID string, boardType model.BoardType) *mod return board } +func (th *TestHelper) CreateBoards(teamID string, boardType model.BoardType, count int) []*model.Board { + boards := make([]*model.Board, 0, count) + + for i := 0; i < count; i++ { + board := th.CreateBoard(teamID, boardType) + boards = append(boards, board) + } + return boards +} + func (th *TestHelper) CreateCategory(category model.Category) *model.Category { cat, resp := th.Client.CreateCategory(category) th.CheckOK(resp) diff --git a/server/integrationtests/compliance_test.go b/server/integrationtests/compliance_test.go new file mode 100644 index 000000000..7c6bf35a9 --- /dev/null +++ b/server/integrationtests/compliance_test.go @@ -0,0 +1,116 @@ +package integrationtests + +import ( + "math" + "os" + "strconv" + "testing" + + "github.com/mattermost/focalboard/server/model" + "github.com/mattermost/focalboard/server/utils" + "github.com/stretchr/testify/require" +) + +const ( + testAdmin = "test-admin" +) + +func setupTestHelperForCompliance(t *testing.T, complianceLicense bool) (*TestHelper, Clients) { + os.Setenv("FOCALBOARD_UNIT_TESTING_COMPLIANCE", strconv.FormatBool(complianceLicense)) + + th := SetupTestHelperPluginMode(t) + clients := setupClients(th) + + th.Client = clients.TeamMember + th.Client2 = clients.TeamMember + + return th, clients +} + +func TestGetBoardsForCompliance(t *testing.T) { + t.Run("missing Features.Compliance license should fail", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, false) + defer th.TearDown() + + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, 2) + + bcr, resp := clients.Admin.GetBoardsForCompliance(testTeamID, 0, 0) + + th.CheckNotImplemented(resp) + require.Nil(t, bcr) + }) + + t.Run("a non authenticated user should be rejected", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, 2) + th.Logout(th.Client) + + boards, resp := clients.Anon.GetBoardsForCompliance(testTeamID, 0, 0) + + th.CheckUnauthorized(resp) + require.Nil(t, boards) + }) + + t.Run("a user without manage_system permission should be rejected", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, 2) + + bcr, resp := clients.TeamMember.GetBoardsForCompliance(testTeamID, 0, 0) + + th.CheckUnauthorized(resp) + require.Nil(t, bcr) + }) + + t.Run("good call", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + const count = 10 + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, count) + + bcr, resp := clients.Admin.GetBoardsForCompliance(testTeamID, 0, 0) // admin.GetBoardsForCompliance(testTeamID, 0, 0) + th.CheckOK(resp) + require.False(t, bcr.HasNext) + require.Len(t, bcr.Results, count) + }) + + t.Run("pagination", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + const count = 20 + const perPage = 3 + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, count) + + boards := make([]*model.Board, 0, count) + page := 0 + for { + bcr, resp := clients.Admin.GetBoardsForCompliance(testTeamID, page, perPage) + page++ + th.CheckOK(resp) + boards = append(boards, bcr.Results...) + if !bcr.HasNext { + break + } + } + require.Len(t, boards, count) + require.Equal(t, int(math.Floor((count/perPage)+1)), page) + }) + + t.Run("invalid teamID", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, 2) + + bcr, resp := clients.Admin.GetBoardsForCompliance(utils.NewID(utils.IDTypeTeam), 0, 0) + + th.CheckBadRequest(resp) + require.Nil(t, bcr) + }) + +} diff --git a/server/integrationtests/pluginteststore.go b/server/integrationtests/pluginteststore.go index 7e0ec42d9..ef7470802 100644 --- a/server/integrationtests/pluginteststore.go +++ b/server/integrationtests/pluginteststore.go @@ -2,6 +2,8 @@ package integrationtests import ( "errors" + "os" + "strconv" "strings" "github.com/mattermost/focalboard/server/model" @@ -89,7 +91,7 @@ func (s *PluginTestStore) GetTeam(id string) (*model.Team, error) { return s.baseTeam, nil case "other-team": return s.otherTeam, nil - case "test-team": + case "test-team", "team-id": return s.testTeam, nil case "empty-team": return s.emptyTeam, nil @@ -293,3 +295,27 @@ func (s *PluginTestStore) SearchBoardsForUser(term string, field model.BoardSear } return resultBoards, nil } + +func (s *PluginTestStore) GetLicense() *mmModel.License { + license := s.Store.GetLicense() + + if license == nil { + license = &mmModel.License{ + Id: mmModel.NewId(), + StartsAt: mmModel.GetMillis() - 2629746000, // 1 month + ExpiresAt: mmModel.GetMillis() + 2629746000, // + IssuedAt: mmModel.GetMillis() - 2629746000, + Features: &mmModel.Features{}, + } + license.Features.SetDefaults() + } + + complianceLicense := os.Getenv("FOCALBOARD_UNIT_TESTING_COMPLIANCE") + if complianceLicense != "" { + if val, err := strconv.ParseBool(complianceLicense); err == nil { + license.Features.Compliance = mmModel.NewBool(val) + } + } + + return license +} From 4272e2eac0ea6d8778004ffc7f98f9896f842116 Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Sat, 31 Dec 2022 16:33:05 -0500 Subject: [PATCH 10/75] integration tests for GetBoardsComplianceHistory --- server/api/compliance.go | 14 +++ server/client/client.go | 4 +- server/integrationtests/compliance_test.go | 100 ++++++++++++++++++- server/services/store/sqlstore/compliance.go | 5 +- 4 files changed, 115 insertions(+), 8 deletions(-) diff --git a/server/api/compliance.go b/server/api/compliance.go index 33545baaf..218a9e2ac 100644 --- a/server/api/compliance.go +++ b/server/api/compliance.go @@ -133,6 +133,13 @@ func (a *API) handleGetBoardsComplianceHistory(w http.ResponseWriter, r *http.Re return } + // check for valid team + _, err := a.app.GetTeam(teamID) + if err != nil { + a.errorResponse(w, r, model.NewErrBadRequest("invalid team id: "+teamID)) + return + } + if strPage == "" { strPage = complianceDefaultPage } @@ -221,6 +228,13 @@ func (a *API) handleGetBlocksComplianceHistory(w http.ResponseWriter, r *http.Re return } + // check for valid team + _, err := a.app.GetTeam(teamID) + if err != nil { + a.errorResponse(w, r, model.NewErrBadRequest("invalid team id: "+teamID)) + return + } + if strPage == "" { strPage = complianceDefaultPage } diff --git a/server/client/client.go b/server/client/client.go index 30101af43..a90948b65 100644 --- a/server/client/client.go +++ b/server/client/client.go @@ -1006,7 +1006,7 @@ func (c *Client) GetBoardsForCompliance(teamID string, page, perPage int) (*mode } func (c *Client) GetBoardsComplianceHistory( - modifiedSince int, includeDeleted bool, teamID string, page, perPage int) (*model.BoardsComplianceHistoryResponse, *Response) { + modifiedSince int64, includeDeleted bool, teamID string, page, perPage int) (*model.BoardsComplianceHistoryResponse, *Response) { query := fmt.Sprintf("?modified_since=%d&include_deleted=%t&team_id=%s&page=%d&per_page=%d", modifiedSince, includeDeleted, teamID, page, perPage) r, err := c.DoAPIGet("/admin/boards_history"+query, "") @@ -1025,7 +1025,7 @@ func (c *Client) GetBoardsComplianceHistory( } func (c *Client) GetBlocksComplianceHistory( - modifiedSince int, includeDeleted bool, teamID, boardID string, page, perPage int) (*model.BlocksComplianceHistoryResponse, *Response) { + modifiedSince int64, includeDeleted bool, teamID, boardID string, page, perPage int) (*model.BlocksComplianceHistoryResponse, *Response) { query := fmt.Sprintf("?modified_since=%d&include_deleted=%t&team_id=%s&board_id=%s&page=%d&per_page=%d", modifiedSince, includeDeleted, teamID, boardID, page, perPage) r, err := c.DoAPIGet("/admin/blocks_history"+query, "") diff --git a/server/integrationtests/compliance_test.go b/server/integrationtests/compliance_test.go index 7c6bf35a9..dc4a449f7 100644 --- a/server/integrationtests/compliance_test.go +++ b/server/integrationtests/compliance_test.go @@ -15,6 +15,12 @@ const ( testAdmin = "test-admin" ) +var ( + OneHour int64 = 360000 + OneDay int64 = OneHour * 24 + OneYear int64 = OneDay * 365 +) + func setupTestHelperForCompliance(t *testing.T, complianceLicense bool) (*TestHelper, Clients) { os.Setenv("FOCALBOARD_UNIT_TESTING_COMPLIANCE", strconv.FormatBool(complianceLicense)) @@ -47,10 +53,10 @@ func TestGetBoardsForCompliance(t *testing.T) { _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, 2) th.Logout(th.Client) - boards, resp := clients.Anon.GetBoardsForCompliance(testTeamID, 0, 0) + bcr, resp := clients.Anon.GetBoardsForCompliance(testTeamID, 0, 0) th.CheckUnauthorized(resp) - require.Nil(t, boards) + require.Nil(t, bcr) }) t.Run("a user without manage_system permission should be rejected", func(t *testing.T) { @@ -72,7 +78,7 @@ func TestGetBoardsForCompliance(t *testing.T) { const count = 10 _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, count) - bcr, resp := clients.Admin.GetBoardsForCompliance(testTeamID, 0, 0) // admin.GetBoardsForCompliance(testTeamID, 0, 0) + bcr, resp := clients.Admin.GetBoardsForCompliance(testTeamID, 0, 0) th.CheckOK(resp) require.False(t, bcr.HasNext) require.Len(t, bcr.Results, count) @@ -114,3 +120,91 @@ func TestGetBoardsForCompliance(t *testing.T) { }) } + +func TestGetBoardsComplianceHistory(t *testing.T) { + t.Run("missing Features.Compliance license should fail", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, false) + defer th.TearDown() + + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, 2) + + bchr, resp := clients.Admin.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, 0, 0) + + th.CheckNotImplemented(resp) + require.Nil(t, bchr) + }) + + t.Run("a non authenticated user should be rejected", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, 2) + th.Logout(th.Client) + + bchr, resp := clients.Anon.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, 0, 0) + + th.CheckUnauthorized(resp) + require.Nil(t, bchr) + }) + + t.Run("a user without manage_system permission should be rejected", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, 2) + + bcr, resp := clients.TeamMember.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, 0, 0) + + th.CheckUnauthorized(resp) + require.Nil(t, bcr) + }) + + t.Run("good call", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + const count = 10 + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, count) + + bchr, resp := clients.Admin.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, 0, 0) + th.CheckOK(resp) + require.False(t, bchr.HasNext) + require.Len(t, bchr.Results, count) + }) + + t.Run("pagination", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + const count = 20 + const perPage = 3 + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, count) + + boardHistory := make([]model.BoardHistory, 0, count) + page := 0 + for { + bchr, resp := clients.Admin.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, page, perPage) + page++ + th.CheckOK(resp) + boardHistory = append(boardHistory, bchr.Results...) + if !bchr.HasNext { + break + } + } + require.Len(t, boardHistory, count) + require.Equal(t, int(math.Floor((count/perPage)+1)), page) + }) + + t.Run("invalid teamID", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, 2) + + bchr, resp := clients.Admin.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, true, utils.NewID(utils.IDTypeTeam), 0, 0) + + th.CheckBadRequest(resp) + require.Nil(t, bchr) + }) + +} diff --git a/server/services/store/sqlstore/compliance.go b/server/services/store/sqlstore/compliance.go index 9211856f1..3b4cb9111 100644 --- a/server/services/store/sqlstore/compliance.go +++ b/server/services/store/sqlstore/compliance.go @@ -75,8 +75,8 @@ func (s *SQLStore) getBoardsComplianceHistory(db sq.BaseRunner, opts model.Query "bh.id", "bh.team_id", "CASE WHEN bh.delete_at=0 THEN false ELSE true END AS isDeleted", - "("+sqlDescendentLastUpdate+") as decendentLastUpdateAt", - "("+sqlDescendentFirstUpdate+") as decendentFirstUpdateAt", + "COALESCE(("+sqlDescendentLastUpdate+"),0) as decendentLastUpdateAt", + "COALESCE(("+sqlDescendentFirstUpdate+"),0) as decendentFirstUpdateAt", "bh.created_by", "bh.modified_by", ). @@ -186,7 +186,6 @@ func (s *SQLStore) boardsHistoryFromRows(rows *sql.Rows) ([]model.BoardHistory, &boardHistory.ID, &boardHistory.TeamID, &boardHistory.IsDeleted, - &boardHistory.CreatedBy, &boardHistory.DescendantLastUpdateAt, &boardHistory.DescendantFirstUpdateAt, &boardHistory.CreatedBy, From 866d23529e146f080139bea8ad96e9808ff16add Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Sun, 1 Jan 2023 14:16:46 -0500 Subject: [PATCH 11/75] integration tests for GetBlocksComplianceHistory --- server/api/compliance.go | 7 + server/integrationtests/compliance_test.go | 167 ++++++++++++++++++- server/services/store/sqlstore/compliance.go | 4 +- 3 files changed, 171 insertions(+), 7 deletions(-) diff --git a/server/api/compliance.go b/server/api/compliance.go index 218a9e2ac..3402e3440 100644 --- a/server/api/compliance.go +++ b/server/api/compliance.go @@ -235,6 +235,13 @@ func (a *API) handleGetBlocksComplianceHistory(w http.ResponseWriter, r *http.Re return } + // check for valid team + _, err = a.app.GetBoard(boardID) + if err != nil { + a.errorResponse(w, r, model.NewErrBadRequest("invalid board id: "+boardID)) + return + } + if strPage == "" { strPage = complianceDefaultPage } diff --git a/server/integrationtests/compliance_test.go b/server/integrationtests/compliance_test.go index dc4a449f7..c22929fcf 100644 --- a/server/integrationtests/compliance_test.go +++ b/server/integrationtests/compliance_test.go @@ -153,23 +153,52 @@ func TestGetBoardsComplianceHistory(t *testing.T) { _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, 2) - bcr, resp := clients.TeamMember.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, 0, 0) + bchr, resp := clients.TeamMember.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, 0, 0) th.CheckUnauthorized(resp) - require.Nil(t, bcr) + require.Nil(t, bchr) }) - t.Run("good call", func(t *testing.T) { + t.Run("good call, no deleted", func(t *testing.T) { th, clients := setupTestHelperForCompliance(t, true) defer th.TearDown() const count = 10 - _ = th.CreateBoards(testTeamID, model.BoardTypeOpen, count) + boards := th.CreateBoards(testTeamID, model.BoardTypeOpen, count) + + deleted, resp := th.Client.DeleteBoard(boards[0].ID) + th.CheckOK(resp) + require.True(t, deleted) + + deleted, resp = th.Client.DeleteBoard(boards[1].ID) + th.CheckOK(resp) + require.True(t, deleted) + + bchr, resp := clients.Admin.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, false, testTeamID, 0, 0) + th.CheckOK(resp) + require.False(t, bchr.HasNext) + require.Len(t, bchr.Results, count) // both deleted boards have one non-deleted record each + }) + + t.Run("good call, include deleted", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + const count = 10 + boards := th.CreateBoards(testTeamID, model.BoardTypeOpen, count) + + deleted, resp := th.Client.DeleteBoard(boards[0].ID) + th.CheckOK(resp) + require.True(t, deleted) + + deleted, resp = th.Client.DeleteBoard(boards[1].ID) + th.CheckOK(resp) + require.True(t, deleted) bchr, resp := clients.Admin.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, 0, 0) th.CheckOK(resp) require.False(t, bchr.HasNext) - require.Len(t, bchr.Results, count) + require.Len(t, bchr.Results, count+2) // both deleted boards have 2 history records each }) t.Run("pagination", func(t *testing.T) { @@ -208,3 +237,131 @@ func TestGetBoardsComplianceHistory(t *testing.T) { }) } + +func TestGetBlocksComplianceHistory(t *testing.T) { + t.Run("missing Features.Compliance license should fail", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, false) + defer th.TearDown() + + board, _ := th.CreateBoardAndCards(testTeamID, model.BoardTypeOpen, 2) + + bchr, resp := clients.Admin.GetBlocksComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, board.ID, 0, 0) + + th.CheckNotImplemented(resp) + require.Nil(t, bchr) + }) + + t.Run("a non authenticated user should be rejected", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + board, _ := th.CreateBoardAndCards(testTeamID, model.BoardTypeOpen, 2) + + bchr, resp := clients.Anon.GetBlocksComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, board.ID, 0, 0) + + th.CheckUnauthorized(resp) + require.Nil(t, bchr) + }) + + t.Run("a user without manage_system permission should be rejected", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + board, _ := th.CreateBoardAndCards(testTeamID, model.BoardTypeOpen, 2) + + bchr, resp := clients.TeamMember.GetBlocksComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, board.ID, 0, 0) + + th.CheckUnauthorized(resp) + require.Nil(t, bchr) + }) + + t.Run("good call, no deleted", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + const count = 10 + board, cards := th.CreateBoardAndCards(testTeamID, model.BoardTypeOpen, count) + + deleted, resp := th.Client.DeleteBlock(board.ID, cards[0].ID, true) + th.CheckOK(resp) + require.True(t, deleted) + + deleted, resp = th.Client.DeleteBlock(board.ID, cards[1].ID, true) + th.CheckOK(resp) + require.True(t, deleted) + + bchr, resp := clients.Admin.GetBlocksComplianceHistory(utils.GetMillis()-OneDay, false, testTeamID, board.ID, 0, 0) + th.CheckOK(resp) + require.False(t, bchr.HasNext) + require.Len(t, bchr.Results, count) // both deleted cards have one non-deleted record each + }) + + t.Run("good call, include deleted", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + const count = 10 + board, cards := th.CreateBoardAndCards(testTeamID, model.BoardTypeOpen, count) + + deleted, resp := th.Client.DeleteBlock(board.ID, cards[0].ID, true) + th.CheckOK(resp) + require.True(t, deleted) + + deleted, resp = th.Client.DeleteBlock(board.ID, cards[1].ID, true) + th.CheckOK(resp) + require.True(t, deleted) + + bchr, resp := clients.Admin.GetBlocksComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, board.ID, 0, 0) + th.CheckOK(resp) + require.False(t, bchr.HasNext) + require.Len(t, bchr.Results, count+2) // both deleted boards have 2 history records each + }) + + t.Run("pagination", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + const count = 20 + const perPage = 3 + board, _ := th.CreateBoardAndCards(testTeamID, model.BoardTypeOpen, count) + + blockHistory := make([]model.BlockHistory, 0, count) + page := 0 + for { + bchr, resp := clients.Admin.GetBlocksComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, board.ID, page, perPage) + page++ + th.CheckOK(resp) + blockHistory = append(blockHistory, bchr.Results...) + if !bchr.HasNext { + break + } + } + require.Len(t, blockHistory, count) + require.Equal(t, int(math.Floor((count/perPage)+1)), page) + }) + + t.Run("invalid teamID", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + board, _ := th.CreateBoardAndCards(testTeamID, model.BoardTypeOpen, 2) + + bchr, resp := clients.Admin.GetBlocksComplianceHistory(utils.GetMillis()-OneDay, true, utils.NewID(utils.IDTypeTeam), board.ID, 0, 0) + + th.CheckBadRequest(resp) + require.Nil(t, bchr) + }) + + t.Run("invalid boardID", func(t *testing.T) { + th, clients := setupTestHelperForCompliance(t, true) + defer th.TearDown() + + _, _ = th.CreateBoardAndCards(testTeamID, model.BoardTypeOpen, 2) + + bchr, resp := clients.Admin.GetBlocksComplianceHistory(utils.GetMillis()-OneDay, true, testTeamID, utils.NewID(utils.IDTypeBoard), 0, 0) + + th.CheckBadRequest(resp) + require.Nil(t, bchr) + }) + +} diff --git a/server/services/store/sqlstore/compliance.go b/server/services/store/sqlstore/compliance.go index 3b4cb9111..2ea8990d4 100644 --- a/server/services/store/sqlstore/compliance.go +++ b/server/services/store/sqlstore/compliance.go @@ -135,7 +135,7 @@ func (s *SQLStore) getBlocksComplianceHistory(db sq.BaseRunner, opts model.Query From(s.tablePrefix+"blocks_history as bh"). Join(s.tablePrefix+"boards as brd on brd.id=bh.board_id"). Where(sq.Gt{"bh.update_at": opts.ModifiedSince}). - GroupBy("bh.id", "bh.team_id", "bh.board_id", "bh.type", "bh.delete_at", "bh.created_by", "bh.modified_by"). + GroupBy("bh.id", "brd.team_id", "bh.board_id", "bh.type", "bh.delete_at", "bh.created_by", "bh.modified_by"). OrderBy("lastUpdateAt desc") if !opts.IncludeDeleted { @@ -143,7 +143,7 @@ func (s *SQLStore) getBlocksComplianceHistory(db sq.BaseRunner, opts model.Query } if opts.TeamID != "" { - query = query.Where(sq.Eq{"bh.team_id": opts.TeamID}) + query = query.Where(sq.Eq{"brd.team_id": opts.TeamID}) } if opts.BoardID != "" { From 23c3bda9712ba5911bee1455d9d6dd3678c2d2ed Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Sun, 1 Jan 2023 19:10:37 -0500 Subject: [PATCH 12/75] fix linter errors --- server/integrationtests/board_test.go | 4 ---- server/integrationtests/clienttestlib.go | 1 + server/integrationtests/compliance_test.go | 4 ---- server/integrationtests/pluginteststore.go | 2 +- server/services/store/sqlstore/compliance.go | 6 ++++++ 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/server/integrationtests/board_test.go b/server/integrationtests/board_test.go index b1cf9928e..232deb58e 100644 --- a/server/integrationtests/board_test.go +++ b/server/integrationtests/board_test.go @@ -13,10 +13,6 @@ import ( "github.com/stretchr/testify/require" ) -const ( - testTeamID = "team-id" -) - func TestGetBoards(t *testing.T) { t.Run("a non authenticated client should be rejected", func(t *testing.T) { th := SetupTestHelper(t).InitBasic() diff --git a/server/integrationtests/clienttestlib.go b/server/integrationtests/clienttestlib.go index 6718df218..5cbe18bb9 100644 --- a/server/integrationtests/clienttestlib.go +++ b/server/integrationtests/clienttestlib.go @@ -29,6 +29,7 @@ const ( user1Username = "user1" user2Username = "user2" password = "Pa$$word" + testTeamID = "team-id" ) const ( diff --git a/server/integrationtests/compliance_test.go b/server/integrationtests/compliance_test.go index c22929fcf..e3557d8a6 100644 --- a/server/integrationtests/compliance_test.go +++ b/server/integrationtests/compliance_test.go @@ -11,10 +11,6 @@ import ( "github.com/stretchr/testify/require" ) -const ( - testAdmin = "test-admin" -) - var ( OneHour int64 = 360000 OneDay int64 = OneHour * 24 diff --git a/server/integrationtests/pluginteststore.go b/server/integrationtests/pluginteststore.go index ef7470802..dce822099 100644 --- a/server/integrationtests/pluginteststore.go +++ b/server/integrationtests/pluginteststore.go @@ -91,7 +91,7 @@ func (s *PluginTestStore) GetTeam(id string) (*model.Team, error) { return s.baseTeam, nil case "other-team": return s.otherTeam, nil - case "test-team", "team-id": + case "test-team", testTeamID: return s.testTeam, nil case "empty-team": return s.emptyTeam, nil diff --git a/server/services/store/sqlstore/compliance.go b/server/services/store/sqlstore/compliance.go index 2ea8990d4..8270bb4df 100644 --- a/server/services/store/sqlstore/compliance.go +++ b/server/services/store/sqlstore/compliance.go @@ -110,6 +110,9 @@ func (s *SQLStore) getBoardsComplianceHistory(db sq.BaseRunner, opts model.Query defer s.CloseRows(rows) history, err := s.boardsHistoryFromRows(rows) + if err != nil { + return nil, false, err + } var hasMore bool if opts.PerPage > 0 && len(history) > opts.PerPage { @@ -167,6 +170,9 @@ func (s *SQLStore) getBlocksComplianceHistory(db sq.BaseRunner, opts model.Query defer s.CloseRows(rows) history, err := s.blocksHistoryFromRows(rows) + if err != nil { + return nil, false, err + } var hasMore bool if opts.PerPage > 0 && len(history) > opts.PerPage { From c6a5926b89166fd09317f71c96abca6e4a2feb79 Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Sun, 1 Jan 2023 19:19:21 -0500 Subject: [PATCH 13/75] fixed pedantic linter nonsense --- server/integrationtests/compliance_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/server/integrationtests/compliance_test.go b/server/integrationtests/compliance_test.go index e3557d8a6..7e5ae2e29 100644 --- a/server/integrationtests/compliance_test.go +++ b/server/integrationtests/compliance_test.go @@ -114,7 +114,6 @@ func TestGetBoardsForCompliance(t *testing.T) { th.CheckBadRequest(resp) require.Nil(t, bcr) }) - } func TestGetBoardsComplianceHistory(t *testing.T) { @@ -231,7 +230,6 @@ func TestGetBoardsComplianceHistory(t *testing.T) { th.CheckBadRequest(resp) require.Nil(t, bchr) }) - } func TestGetBlocksComplianceHistory(t *testing.T) { @@ -359,5 +357,4 @@ func TestGetBlocksComplianceHistory(t *testing.T) { th.CheckBadRequest(resp) require.Nil(t, bchr) }) - } From a8baf0c4b94d1465b6770931aebac01ea2933cf7 Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Mon, 2 Jan 2023 16:41:40 -0500 Subject: [PATCH 14/75] fix sql for mysql --- server/services/store/sqlstore/compliance.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/services/store/sqlstore/compliance.go b/server/services/store/sqlstore/compliance.go index 8270bb4df..956b07c7c 100644 --- a/server/services/store/sqlstore/compliance.go +++ b/server/services/store/sqlstore/compliance.go @@ -51,7 +51,7 @@ func (s *SQLStore) getBoardsComplianceHistory(db sq.BaseRunner, opts model.Query queryDescendentLastUpdate := s.getQueryBuilder(db). Select("MAX(blk1.update_at)"). From(s.tablePrefix + "blocks_history as blk1"). - Where(sq.Eq{"blk1.board_id": "bh.id"}) + Where("blk1.board_id=bh.id") if !opts.IncludeDeleted { queryDescendentLastUpdate.Where(sq.Eq{"blk1.delete_at": 0}) @@ -62,7 +62,7 @@ func (s *SQLStore) getBoardsComplianceHistory(db sq.BaseRunner, opts model.Query queryDescendentFirstUpdate := s.getQueryBuilder(db). Select("MIN(blk2.update_at)"). From(s.tablePrefix + "blocks_history as blk2"). - Where(sq.Eq{"blk2.board_id": "bh.id"}) + Where("blk2.board_id=bh.id") if !opts.IncludeDeleted { queryDescendentFirstUpdate.Where(sq.Eq{"blk2.delete_at": 0}) From f4d5c39d7dcfbd69280cdab9218f2b820ebf519b Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Tue, 3 Jan 2023 16:53:57 -0500 Subject: [PATCH 15/75] swagger for new APIs --- server/api/archive.go | 24 +++--- server/api/compliance.go | 160 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 157 insertions(+), 27 deletions(-) diff --git a/server/api/archive.go b/server/api/archive.go index 396835858..5a54e949b 100644 --- a/server/api/archive.go +++ b/server/api/archive.go @@ -55,27 +55,21 @@ func (a *API) handleArchiveExportBoard(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) boardID := vars["boardID"] userID := getUserID(r) - isSysAdmin := false + isSysAdmin := a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) - // Valid authorization (`manage_system`)? - if a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) { - isSysAdmin = true - } - - // Don't need to check permission for a board if it's a sysadmin w/ `manage_system` + // Don't need to check permission for a board if user has `manage_system` permissions if !isSysAdmin { if !a.permissions.HasPermissionToBoard(userID, boardID, model.PermissionViewBoard) { a.errorResponse(w, r, model.NewErrPermission("access denied to board")) return } - // ... but do need to check the license - } else { - // Valid license feature (Compliance)? - license := a.app.GetLicense() - if license == nil || !(*license.Features.Compliance) { - a.errorResponse(w, r, model.NewErrNotImplemented("insufficient license")) - return - } + } + + // Check for valid license feature: compliance + license := a.app.GetLicense() + if license == nil || !(*license.Features.Compliance) { + a.errorResponse(w, r, model.NewErrNotImplemented("insufficient license")) + return } auditRec := a.makeAuditRecord(r, "archiveExportBoard", audit.Fail) diff --git a/server/api/compliance.go b/server/api/compliance.go index 3402e3440..9ebb420d6 100644 --- a/server/api/compliance.go +++ b/server/api/compliance.go @@ -26,21 +26,58 @@ func (a *API) registerComplianceRoutes(r *mux.Router) { } func (a *API) handleGetBoardsForCompliance(w http.ResponseWriter, r *http.Request) { - // TODO(@pinjasaur): swagger + // swagger:operation GET /admin/boards getBoardsForCompliance + // + // Returns boards for a specific team, or all teams. + // + // Requires a license that includes Compliance feature. Caller must have `manage_system` permissions. + // + // --- + // produces: + // - application/json + // parameters: + // - name: team_id + // in: query + // description: Team ID. If empty then boards across all teams are included. + // required: false + // type: string + // - name: page + // in: query + // description: The page to select (default=0) + // required: false + // type: integer + // - name: per_page + // in: query + // description: Number of boards to return per page(default=60) + // required: false + // type: integer + // security: + // - BearerAuth: [] + // responses: + // '200': + // description: success + // schema: + // type: object + // items: + // "$ref": "#/definitions/BoardsComplianceResponse" + // default: + // description: internal error + // schema: + // "$ref": "#/definitions/ErrorResponse" query := r.URL.Query() teamID := query.Get("team_id") strPage := query.Get("page") strPerPage := query.Get("per_page") - // Valid authorization (`manage_system`)? + // check for permission `manage_system` userID := getUserID(r) if !a.permissions.HasPermissionTo(userID, mm_model.PermissionManageSystem) { a.errorResponse(w, r, model.NewErrUnauthorized("access denied Compliance Export getAllBoards")) return } - // Valid license feature (Compliance)? + // check for valid license feature: compliance license := a.app.GetLicense() if license == nil || !(*license.Features.Compliance) { a.errorResponse(w, r, model.NewErrNotImplemented("insufficient license Compliance Export getAllBoards")) @@ -105,28 +142,75 @@ func (a *API) handleGetBoardsForCompliance(w http.ResponseWriter, r *http.Reques } func (a *API) handleGetBoardsComplianceHistory(w http.ResponseWriter, r *http.Request) { - // TODO(@pinjasaur): swagger + // swagger:operation GET /admin/boards_history getBoardsComplianceHistory + // + // Returns boards histories for a specific team, or all teams. + // + // Requires a license that includes Compliance feature. Caller must have `manage_system` permissions. + // + // --- + // produces: + // - application/json + // parameters: + // - name: modified_since + // in: query + // description: Filters for boards modified since timestamp; Unix time in milliseconds + // required: true + // type: integer + // - name: include_deleted + // in: query + // description: When true then deleted boards are included. Default=false + // required: false + // type: boolean + // - name: team_id + // in: query + // description: Team ID. If empty then board histories across all teams are included + // required: false + // type: string + // - name: page + // in: query + // description: The page to select (default=0) + // required: false + // type: integer + // - name: per_page + // in: query + // description: Number of board histories to return per page (default=60) + // required: false + // type: integer + // security: + // - BearerAuth: [] + // responses: + // '200': + // description: success + // schema: + // type: object + // items: + // "$ref": "#/definitions/BoardsComplianceHistoryResponse" + // default: + // description: internal error + // schema: + // "$ref": "#/definitions/ErrorResponse" query := r.URL.Query() strModifiedSince := query.Get("modified_since") // required, everything else optional includeDeleted := query.Get("include_deleted") == "true" - teamID := query.Get("team_id") strPage := query.Get("page") strPerPage := query.Get("per_page") + teamID := query.Get("team_id") if strModifiedSince == "" { a.errorResponse(w, r, model.NewErrBadRequest("`modified_since` parameter required")) return } - // Valid authorization (`manage_system`)? + // check for permission `manage_system` userID := getUserID(r) if !a.permissions.HasPermissionTo(userID, mm_model.PermissionManageSystem) { a.errorResponse(w, r, model.NewErrUnauthorized("access denied Compliance Export getBoardsHistory")) return } - // Valid license feature (Compliance)? + // check for valid license feature: compliance license := a.app.GetLicense() if license == nil || !(*license.Features.Compliance) { a.errorResponse(w, r, model.NewErrNotImplemented("insufficient license Compliance Export getBoardsHistory")) @@ -199,29 +283,81 @@ func (a *API) handleGetBoardsComplianceHistory(w http.ResponseWriter, r *http.Re } func (a *API) handleGetBlocksComplianceHistory(w http.ResponseWriter, r *http.Request) { - // TODO(@pinjasaur): swagger + // swagger:operation GET /admin/blocks_history getBlocksComplianceHistory + // + // Returns block histories for a specific team, specific board, or all teams and boards. + // + // Requires a license that includes Compliance feature. Caller must have `manage_system` permissions. + // + // --- + // produces: + // - application/json + // parameters: + // - name: modified_since + // in: query + // description: Filters for boards modified since timestamp; Unix time in milliseconds + // required: true + // type: integer + // - name: include_deleted + // in: query + // description: When true then deleted boards are included. Default=false + // required: false + // type: boolean + // - name: team_id + // in: query + // description: Team ID. If empty then block histories across all teams are included + // required: false + // type: string + // - name: board_id + // in: query + // description: Board ID. If empty then block histories for all boards are included + // required: false + // type: string + // - name: page + // in: query + // description: The page to select (default=0) + // required: false + // type: integer + // - name: per_page + // in: query + // description: Number of block histories to return per page (default=60) + // required: false + // type: integer + // security: + // - BearerAuth: [] + // responses: + // '200': + // description: success + // schema: + // type: object + // items: + // "$ref": "#/definitions/BlocksComplianceHistoryResponse" + // default: + // description: internal error + // schema: + // "$ref": "#/definitions/ErrorResponse" query := r.URL.Query() strModifiedSince := query.Get("modified_since") // required, everything else optional includeDeleted := query.Get("include_deleted") == "true" - teamID := query.Get("team_id") - boardID := query.Get("board_id") strPage := query.Get("page") strPerPage := query.Get("per_page") + teamID := query.Get("team_id") + boardID := query.Get("board_id") if strModifiedSince == "" { a.errorResponse(w, r, model.NewErrBadRequest("`modified_since` parameter required")) return } - // Valid authorization (`manage_system`)? + // check for permission `manage_system` userID := getUserID(r) if !a.permissions.HasPermissionTo(userID, mm_model.PermissionManageSystem) { a.errorResponse(w, r, model.NewErrUnauthorized("access denied Compliance Export getBlocksHistory")) return } - // Valid license feature (Compliance)? + // check for valid license feature: compliance license := a.app.GetLicense() if license == nil || !(*license.Features.Compliance) { a.errorResponse(w, r, model.NewErrNotImplemented("insufficient license Compliance Export getBlocksHistory")) From abbd5f46a151e6f579bbdb386e6210848dc316ee Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Tue, 3 Jan 2023 17:47:20 -0500 Subject: [PATCH 16/75] fix export board permission --- server/api/archive.go | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/server/api/archive.go b/server/api/archive.go index 5a54e949b..c1856c7d8 100644 --- a/server/api/archive.go +++ b/server/api/archive.go @@ -55,23 +55,18 @@ func (a *API) handleArchiveExportBoard(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) boardID := vars["boardID"] userID := getUserID(r) - isSysAdmin := a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) - // Don't need to check permission for a board if user has `manage_system` permissions - if !isSysAdmin { - if !a.permissions.HasPermissionToBoard(userID, boardID, model.PermissionViewBoard) { + // check user has permission to board + if !a.permissions.HasPermissionToBoard(userID, boardID, model.PermissionViewBoard) { + // if this user has `manage_system` permission and there is a license with the compliance + // feature enabled, then we will allow the export. + license := a.app.GetLicense() + if !a.permissions.HasPermissionTo(userID, mmModel.PermissionManageSystem) || license == nil || !(*license.Features.Compliance) { a.errorResponse(w, r, model.NewErrPermission("access denied to board")) return } } - // Check for valid license feature: compliance - license := a.app.GetLicense() - if license == nil || !(*license.Features.Compliance) { - a.errorResponse(w, r, model.NewErrNotImplemented("insufficient license")) - return - } - auditRec := a.makeAuditRecord(r, "archiveExportBoard", audit.Fail) defer a.audit.LogRecord(audit.LevelRead, auditRec) auditRec.AddMeta("BoardID", boardID) From 50d6b1a4bf4e3992f2faae9aa0bd098d2538e2cf Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Thu, 5 Jan 2023 10:15:57 -0500 Subject: [PATCH 17/75] store unit tests --- .../services/store/sqlstore/sqlstore_test.go | 1 + server/services/store/storetests/blocks.go | 2 +- .../services/store/storetests/compliance.go | 91 +++++++++++++++++++ server/services/store/storetests/util.go | 24 ++++- 4 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 server/services/store/storetests/compliance.go diff --git a/server/services/store/sqlstore/sqlstore_test.go b/server/services/store/sqlstore/sqlstore_test.go index e802655c7..b2bf8b958 100644 --- a/server/services/store/sqlstore/sqlstore_test.go +++ b/server/services/store/sqlstore/sqlstore_test.go @@ -29,6 +29,7 @@ func TestSQLStore(t *testing.T) { t.Run("StoreTestCategoryStore", func(t *testing.T) { storetests.StoreTestCategoryStore(t, SetupTests) }) t.Run("StoreTestCategoryBoardsStore", func(t *testing.T) { storetests.StoreTestCategoryBoardsStore(t, SetupTests) }) t.Run("BoardsInsightsStore", func(t *testing.T) { storetests.StoreTestBoardsInsightsStore(t, SetupTests) }) + t.Run("ComplianceHistoryStore", func(t *testing.T) { storetests.StoreTestComplianceHistoryStore(t, SetupTests) }) } // tests for utility functions inside sqlstore.go diff --git a/server/services/store/storetests/blocks.go b/server/services/store/storetests/blocks.go index 6a7f65e1a..6da1ffbee 100644 --- a/server/services/store/storetests/blocks.go +++ b/server/services/store/storetests/blocks.go @@ -1066,7 +1066,7 @@ func testGetBlockMetadata(t *testing.T, store store.Store) { } func testUndeleteBlockChildren(t *testing.T, store store.Store) { - boards := createTestBoards(t, store, testUserID, 2) + boards := createTestBoards(t, store, testTeamID, testUserID, 2) boardDelete := boards[0] boardKeep := boards[1] diff --git a/server/services/store/storetests/compliance.go b/server/services/store/storetests/compliance.go new file mode 100644 index 000000000..bee627575 --- /dev/null +++ b/server/services/store/storetests/compliance.go @@ -0,0 +1,91 @@ +package storetests + +import ( + "testing" + + "github.com/mattermost/focalboard/server/model" + "github.com/mattermost/focalboard/server/services/store" + "github.com/mattermost/focalboard/server/utils" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func StoreTestComplianceHistoryStore(t *testing.T, setup func(t *testing.T) (store.Store, func())) { + t.Run("GetBoardsForCompliance", func(t *testing.T) { + store, tearDown := setup(t) + defer tearDown() + testGetBoardsForCompliance(t, store) + }) +} + +func testGetBoardsForCompliance(t *testing.T, store store.Store) { + team1 := testTeamID + team2 := utils.NewID(utils.IDTypeTeam) + + boardsAdded1 := createTestBoards(t, store, team1, testUserID, 10) + boardsAdded2 := createTestBoards(t, store, team2, testUserID, 7) + + deleteTestBoard(t, store, boardsAdded1[0].ID, testUserID) + deleteTestBoard(t, store, boardsAdded1[1].ID, testUserID) + //boardsDeleted := boardsAdded1[0:2] + boardsAdded1 = boardsAdded1[2:] + + t.Run("Invalid teamID", func(t *testing.T) { + opts := model.QueryBoardsForComplianceOptions{ + TeamID: utils.NewID(utils.IDTypeTeam), + } + + boards, hasMore, err := store.GetBoardsForCompliance(opts) + + assert.Empty(t, boards) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("All teams", func(t *testing.T) { + opts := model.QueryBoardsForComplianceOptions{} + + boards, hasMore, err := store.GetBoardsForCompliance(opts) + + assert.ElementsMatch(t, extractBoardIDs(boards, nil), extractBoardIDs(boardsAdded1, boardsAdded2)) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("Specific team", func(t *testing.T) { + opts := model.QueryBoardsForComplianceOptions{ + TeamID: team1, + } + + boards, hasMore, err := store.GetBoardsForCompliance(opts) + + assert.ElementsMatch(t, extractBoardIDs(boards, nil), extractBoardIDs(boardsAdded1, nil)) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("Pagination", func(t *testing.T) { + opts := model.QueryBoardsForComplianceOptions{ + Page: 0, + PerPage: 3, + } + + reps := 0 + allBoards := make([]*model.Board, 0, 20) + + for { + boards, hasMore, err := store.GetBoardsForCompliance(opts) + require.NoError(t, err) + require.NotEmpty(t, boards) + allBoards = append(allBoards, boards...) + + if !hasMore { + break + } + opts.Page++ + reps++ + } + + assert.ElementsMatch(t, extractBoardIDs(allBoards, nil), extractBoardIDs(boardsAdded1, boardsAdded2)) + }) +} diff --git a/server/services/store/storetests/util.go b/server/services/store/storetests/util.go index 24d99eead..f63625e50 100644 --- a/server/services/store/storetests/util.go +++ b/server/services/store/storetests/util.go @@ -90,12 +90,12 @@ func createTestCards(t *testing.T, store store.Store, userID string, boardID str return blocks } -func createTestBoards(t *testing.T, store store.Store, userID string, num int) []*model.Board { +func createTestBoards(t *testing.T, store store.Store, teamID string, userID string, num int) []*model.Board { var boards []*model.Board for i := 0; i < num; i++ { board := &model.Board{ ID: utils.NewID(utils.IDTypeBoard), - TeamID: testTeamID, + TeamID: teamID, Type: "O", CreatedBy: userID, Title: fmt.Sprintf("board %d", i), @@ -107,3 +107,23 @@ func createTestBoards(t *testing.T, store store.Store, userID string, num int) [ } return boards } + +func deleteTestBoard(t *testing.T, store store.Store, boardID string, userID string) { + err := store.DeleteBoard(boardID, userID) + require.NoError(t, err) +} + +func extractBoardIDs(boards1, boards2 []*model.Board) []string { + ids := make([]string, 0, len(boards1)+len(boards2)) + for _, b := range boards1 { + if b != nil { + ids = append(ids, b.ID) + } + } + for _, b := range boards2 { + if b != nil { + ids = append(ids, b.ID) + } + } + return ids +} From e2b06f5f5513c148e8b39fce83368b0ad688674c Mon Sep 17 00:00:00 2001 From: Pablo Velez Vidal Date: Wed, 28 Dec 2022 13:51:38 +0100 Subject: [PATCH 18/75] MM48320 - refactor create channel with board from webapp to pluggable --- .../webapp/loaders/globalScssClassLoader.js | 3 +- mattermost-plugin/webapp/package-lock.json | 537 ++++++++++++++++-- mattermost-plugin/webapp/package.json | 3 +- .../components/createBoardFromTemplate.scss | 78 +++ .../components/createBoardFromTemplate.tsx | 240 ++++++++ mattermost-plugin/webapp/src/index.tsx | 17 + .../src/types/mattermost-webapp/index.d.ts | 2 + webapp/src/hooks/useGetAllTemplates.ts | 31 + webapp/src/mutator.ts | 6 +- 9 files changed, 877 insertions(+), 40 deletions(-) create mode 100644 mattermost-plugin/webapp/src/components/createBoardFromTemplate.scss create mode 100644 mattermost-plugin/webapp/src/components/createBoardFromTemplate.tsx create mode 100644 webapp/src/hooks/useGetAllTemplates.ts diff --git a/mattermost-plugin/webapp/loaders/globalScssClassLoader.js b/mattermost-plugin/webapp/loaders/globalScssClassLoader.js index 3bccdbf98..80b58e7ad 100644 --- a/mattermost-plugin/webapp/loaders/globalScssClassLoader.js +++ b/mattermost-plugin/webapp/loaders/globalScssClassLoader.js @@ -6,7 +6,8 @@ function blockList(line) { line.startsWith('.GlobalHeaderComponent') || line.startsWith('.boards-rhs-icon') || line.startsWith('.focalboard-plugin-root') || - line.startsWith('.FocalboardUnfurl'); + line.startsWith('.FocalboardUnfurl') || + line.startsWith('.CreateBoardFromTemplate'); } module.exports = function loader(source) { diff --git a/mattermost-plugin/webapp/package-lock.json b/mattermost-plugin/webapp/package-lock.json index abfb81bb5..75837a4ce 100644 --- a/mattermost-plugin/webapp/package-lock.json +++ b/mattermost-plugin/webapp/package-lock.json @@ -14,6 +14,7 @@ "react-intl": "^5.20.0", "react-redux": "^7.2.0", "react-router-dom": "^5.2.0", + "react-select": "^5.2.2", "trim-newlines": "4.0.2" }, "devDependencies": { @@ -2038,6 +2039,150 @@ "node": ">=10.0.0" } }, + "node_modules/@emotion/babel-plugin": { + "version": "11.10.5", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.10.5.tgz", + "integrity": "sha512-xE7/hyLHJac7D2Ve9dKroBBZqBT7WuPQmWcq7HSGb84sUuP4mlOWoB8dvVfD9yk5DHkU1m6RW7xSoDtnQHNQeA==", + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/plugin-syntax-jsx": "^7.17.12", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.0", + "@emotion/memoize": "^0.8.0", + "@emotion/serialize": "^1.1.1", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.1.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/@babel/runtime": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", + "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", + "dependencies": { + "regenerator-runtime": "^0.13.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@emotion/cache": { + "version": "11.10.5", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.10.5.tgz", + "integrity": "sha512-dGYHWyzTdmK+f2+EnIGBpkz1lKc4Zbj2KHd4cX3Wi8/OWr5pKslNjc3yABKH4adRGCvSX4VDC0i04mrrq0aiRA==", + "dependencies": { + "@emotion/memoize": "^0.8.0", + "@emotion/sheet": "^1.2.1", + "@emotion/utils": "^1.2.0", + "@emotion/weak-memoize": "^0.3.0", + "stylis": "4.1.3" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.0.tgz", + "integrity": "sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ==" + }, + "node_modules/@emotion/memoize": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz", + "integrity": "sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==" + }, + "node_modules/@emotion/react": { + "version": "11.10.5", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.10.5.tgz", + "integrity": "sha512-TZs6235tCJ/7iF6/rvTaOH4oxQg2gMAcdHemjwLKIjKz4rRuYe1HJ2TQJKnAcRAfOUDdU8XoDadCe1rl72iv8A==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.10.5", + "@emotion/cache": "^11.10.5", + "@emotion/serialize": "^1.1.1", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0", + "@emotion/utils": "^1.2.0", + "@emotion/weak-memoize": "^0.3.0", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/react/node_modules/@babel/runtime": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", + "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", + "dependencies": { + "regenerator-runtime": "^0.13.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emotion/serialize": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.1.tgz", + "integrity": "sha512-Zl/0LFggN7+L1liljxXdsVSVlg6E/Z/olVWpfxUTxOAmi8NU7YoeWeLfi1RmnB2TATHoaWwIBRoL+FvAJiTUQA==", + "dependencies": { + "@emotion/hash": "^0.9.0", + "@emotion/memoize": "^0.8.0", + "@emotion/unitless": "^0.8.0", + "@emotion/utils": "^1.2.0", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.1.tgz", + "integrity": "sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA==" + }, + "node_modules/@emotion/unitless": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz", + "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==" + }, + "node_modules/@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz", + "integrity": "sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A==", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@emotion/utils": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.0.tgz", + "integrity": "sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw==" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz", + "integrity": "sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==" + }, "node_modules/@eslint/eslintrc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", @@ -2103,6 +2248,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@floating-ui/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.1.0.tgz", + "integrity": "sha512-zbsLwtnHo84w1Kc8rScAo5GMk1GdecSlrflIbfnEBJwvTSj1SL6kkOYV+nHraMCPEy+RNZZUaZyL8JosDGCtGQ==" + }, + "node_modules/@floating-ui/dom": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.1.0.tgz", + "integrity": "sha512-TSogMPVxbRe77QCj1dt8NmRiJasPvuc+eT5jnJ6YpLqgOD2zXc5UA3S1qwybN+GVCDNdKfpKy1oj8RpzLJvh6A==", + "dependencies": { + "@floating-ui/core": "^1.0.5" + } + }, "node_modules/@formatjs/ecma402-abstract": { "version": "1.11.3", "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.3.tgz", @@ -4615,6 +4773,11 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==" }, + "node_modules/@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + }, "node_modules/@types/prettier": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", @@ -4703,7 +4866,6 @@ "version": "4.4.4", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz", "integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==", - "dev": true, "dependencies": { "@types/react": "*" } @@ -5922,6 +6084,35 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/babel-plugin-macros": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + } + }, + "node_modules/babel-plugin-macros/node_modules/cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", @@ -6895,7 +7086,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, "engines": { "node": ">=6" } @@ -8203,6 +8393,15 @@ "integrity": "sha512-NMt+m9zFMPZe0JcY9gN224Qvk6qLIdqex29clBvc/y75ZBX9YA9wNK3frsYvu2DI1xcCIwxwnX+TlsJ2DSOADg==", "dev": true }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", @@ -10199,8 +10398,7 @@ "node_modules/find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" }, "node_modules/find-up": { "version": "4.1.0", @@ -11689,7 +11887,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -11705,7 +11902,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, "engines": { "node": ">=4" } @@ -14736,8 +14932,7 @@ "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -14865,8 +15060,7 @@ "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "node_modules/linked-list": { "version": "0.1.0", @@ -17247,7 +17441,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -17259,7 +17452,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -17338,7 +17530,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, "engines": { "node": ">=8" } @@ -18067,6 +18258,31 @@ "react": ">=15" } }, + "node_modules/react-select": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/react-select/-/react-select-5.7.0.tgz", + "integrity": "sha512-lJGiMxCa3cqnUr2Jjtg9YHsaytiZqeNOKeibv6WF5zbK/fPegZ1hg3y/9P1RZVLhqBTs0PfqQLKuAACednYGhQ==", + "dependencies": { + "@babel/runtime": "^7.12.0", + "@emotion/cache": "^11.4.0", + "@emotion/react": "^11.8.1", + "@floating-ui/dom": "^1.0.1", + "@types/react-transition-group": "^4.4.0", + "memoize-one": "^6.0.0", + "prop-types": "^15.6.0", + "react-transition-group": "^4.3.0", + "use-isomorphic-layout-effect": "^1.1.2" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-select/node_modules/memoize-one": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", + "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==" + }, "node_modules/react-shallow-renderer": { "version": "16.14.1", "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz", @@ -18080,6 +18296,21 @@ "react": "^16.0.0 || ^17.0.0" } }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, "node_modules/readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -18518,9 +18749,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/regenerator-transform": { "version": "0.15.0", @@ -20116,6 +20347,11 @@ "webpack": "^5.0.0" } }, + "node_modules/stylis": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.1.3.tgz", + "integrity": "sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==" + }, "node_modules/sudo-prompt": { "version": "9.2.1", "resolved": "https://registry.npmjs.org/sudo-prompt/-/sudo-prompt-9.2.1.tgz", @@ -21113,6 +21349,19 @@ "node": ">=0.10.0" } }, + "node_modules/use-isomorphic-layout-effect": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz", + "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", @@ -21915,6 +22164,14 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -23275,6 +23532,125 @@ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, + "@emotion/babel-plugin": { + "version": "11.10.5", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.10.5.tgz", + "integrity": "sha512-xE7/hyLHJac7D2Ve9dKroBBZqBT7WuPQmWcq7HSGb84sUuP4mlOWoB8dvVfD9yk5DHkU1m6RW7xSoDtnQHNQeA==", + "requires": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/plugin-syntax-jsx": "^7.17.12", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.0", + "@emotion/memoize": "^0.8.0", + "@emotion/serialize": "^1.1.1", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.1.3" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", + "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", + "requires": { + "regenerator-runtime": "^0.13.11" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + } + } + }, + "@emotion/cache": { + "version": "11.10.5", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.10.5.tgz", + "integrity": "sha512-dGYHWyzTdmK+f2+EnIGBpkz1lKc4Zbj2KHd4cX3Wi8/OWr5pKslNjc3yABKH4adRGCvSX4VDC0i04mrrq0aiRA==", + "requires": { + "@emotion/memoize": "^0.8.0", + "@emotion/sheet": "^1.2.1", + "@emotion/utils": "^1.2.0", + "@emotion/weak-memoize": "^0.3.0", + "stylis": "4.1.3" + } + }, + "@emotion/hash": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.0.tgz", + "integrity": "sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ==" + }, + "@emotion/memoize": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.0.tgz", + "integrity": "sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==" + }, + "@emotion/react": { + "version": "11.10.5", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.10.5.tgz", + "integrity": "sha512-TZs6235tCJ/7iF6/rvTaOH4oxQg2gMAcdHemjwLKIjKz4rRuYe1HJ2TQJKnAcRAfOUDdU8XoDadCe1rl72iv8A==", + "requires": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.10.5", + "@emotion/cache": "^11.10.5", + "@emotion/serialize": "^1.1.1", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.0", + "@emotion/utils": "^1.2.0", + "@emotion/weak-memoize": "^0.3.0", + "hoist-non-react-statics": "^3.3.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", + "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", + "requires": { + "regenerator-runtime": "^0.13.11" + } + } + } + }, + "@emotion/serialize": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.1.tgz", + "integrity": "sha512-Zl/0LFggN7+L1liljxXdsVSVlg6E/Z/olVWpfxUTxOAmi8NU7YoeWeLfi1RmnB2TATHoaWwIBRoL+FvAJiTUQA==", + "requires": { + "@emotion/hash": "^0.9.0", + "@emotion/memoize": "^0.8.0", + "@emotion/unitless": "^0.8.0", + "@emotion/utils": "^1.2.0", + "csstype": "^3.0.2" + } + }, + "@emotion/sheet": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.1.tgz", + "integrity": "sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA==" + }, + "@emotion/unitless": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.0.tgz", + "integrity": "sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==" + }, + "@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz", + "integrity": "sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A==", + "requires": {} + }, + "@emotion/utils": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.0.tgz", + "integrity": "sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw==" + }, + "@emotion/weak-memoize": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz", + "integrity": "sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==" + }, "@eslint/eslintrc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", @@ -23324,6 +23700,19 @@ } } }, + "@floating-ui/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.1.0.tgz", + "integrity": "sha512-zbsLwtnHo84w1Kc8rScAo5GMk1GdecSlrflIbfnEBJwvTSj1SL6kkOYV+nHraMCPEy+RNZZUaZyL8JosDGCtGQ==" + }, + "@floating-ui/dom": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.1.0.tgz", + "integrity": "sha512-TSogMPVxbRe77QCj1dt8NmRiJasPvuc+eT5jnJ6YpLqgOD2zXc5UA3S1qwybN+GVCDNdKfpKy1oj8RpzLJvh6A==", + "requires": { + "@floating-ui/core": "^1.0.5" + } + }, "@formatjs/ecma402-abstract": { "version": "1.11.3", "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.3.tgz", @@ -25370,6 +25759,11 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==" }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + }, "@types/prettier": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", @@ -25457,7 +25851,6 @@ "version": "4.4.4", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz", "integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==", - "dev": true, "requires": { "@types/react": "*" } @@ -26375,6 +26768,30 @@ "@types/babel__traverse": "^7.0.6" } }, + "babel-plugin-macros": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "requires": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "dependencies": { + "cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + } + } + }, "babel-plugin-polyfill-corejs2": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", @@ -27157,8 +27574,7 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, "camelcase": { "version": "5.3.1", @@ -28159,6 +28575,15 @@ "integrity": "sha512-NMt+m9zFMPZe0JcY9gN224Qvk6qLIdqex29clBvc/y75ZBX9YA9wNK3frsYvu2DI1xcCIwxwnX+TlsJ2DSOADg==", "dev": true }, + "dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "requires": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", @@ -29709,8 +30134,7 @@ "find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" }, "find-up": { "version": "4.1.0", @@ -30796,7 +31220,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -30805,8 +31228,7 @@ "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" } } }, @@ -33068,8 +33490,7 @@ "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "json-schema-traverse": { "version": "0.4.1", @@ -33170,8 +33591,7 @@ "lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "linked-list": { "version": "0.1.0", @@ -35065,7 +35485,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "requires": { "callsites": "^3.0.0" } @@ -35074,7 +35493,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -35131,8 +35549,7 @@ "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, "pend": { "version": "1.2.0", @@ -35675,6 +36092,29 @@ "tiny-warning": "^1.0.0" } }, + "react-select": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/react-select/-/react-select-5.7.0.tgz", + "integrity": "sha512-lJGiMxCa3cqnUr2Jjtg9YHsaytiZqeNOKeibv6WF5zbK/fPegZ1hg3y/9P1RZVLhqBTs0PfqQLKuAACednYGhQ==", + "requires": { + "@babel/runtime": "^7.12.0", + "@emotion/cache": "^11.4.0", + "@emotion/react": "^11.8.1", + "@floating-ui/dom": "^1.0.1", + "@types/react-transition-group": "^4.4.0", + "memoize-one": "^6.0.0", + "prop-types": "^15.6.0", + "react-transition-group": "^4.3.0", + "use-isomorphic-layout-effect": "^1.1.2" + }, + "dependencies": { + "memoize-one": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", + "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==" + } + } + }, "react-shallow-renderer": { "version": "16.14.1", "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz", @@ -35685,6 +36125,17 @@ "react-is": "^16.12.0 || ^17.0.0" } }, + "react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "requires": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + } + }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -36054,9 +36505,9 @@ } }, "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "regenerator-transform": { "version": "0.15.0", @@ -37307,6 +37758,11 @@ "dev": true, "requires": {} }, + "stylis": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.1.3.tgz", + "integrity": "sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA==" + }, "sudo-prompt": { "version": "9.2.1", "resolved": "https://registry.npmjs.org/sudo-prompt/-/sudo-prompt-9.2.1.tgz", @@ -38049,6 +38505,12 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "peer": true }, + "use-isomorphic-layout-effect": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz", + "integrity": "sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==", + "requires": {} + }, "use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", @@ -38632,6 +39094,11 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" + }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/mattermost-plugin/webapp/package.json b/mattermost-plugin/webapp/package.json index d9f6645ff..d992f424f 100644 --- a/mattermost-plugin/webapp/package.json +++ b/mattermost-plugin/webapp/package.json @@ -93,7 +93,8 @@ "react-intl": "^5.20.0", "react-redux": "^7.2.0", "react-router-dom": "^5.2.0", - "trim-newlines": "4.0.2" + "trim-newlines": "4.0.2", + "react-select": "^5.2.2" }, "jest": { "testEnvironment": "jsdom", diff --git a/mattermost-plugin/webapp/src/components/createBoardFromTemplate.scss b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.scss new file mode 100644 index 000000000..3b85588a7 --- /dev/null +++ b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.scss @@ -0,0 +1,78 @@ +.CreateBoardFromTemplate { + width: 100%; + + .add-board-to-channel { + display: flex; + margin-top: 24px; + padding-bottom: 5px; + flex-direction: column; + + label { + display: flex; + color: rgba(var(--center-channel-color-rgb), 0.8); + cursor: pointer; + font-weight: 400; + + input[type=checkbox] { + margin-top: 0 !important; + -moz-appearance: none; + -webkit-appearance: none; + -o-appearance: none; + content: none; + outline: none; + } + + input[type=checkbox]::before { + display: block; + width: 15px; + height: 15px; + border: 1px solid rgba(var(--center-channel-color-rgb), 0.24); + margin-right: 7px; + background: var(--center-channel-bg); + border-radius: 2px; + color: transparent !important; + content: "\f00c"; + font-family: "FontAwesome"; + font-size: 12px; + } + + input[type=checkbox]:checked::before { + background: var(--button-bg); + color: var(--center-channel-bg) !important; + } + + span { + margin-top: -3px; + } + } + + i.icon-information-outline { + color: rgba(var(--center-channel-color-rgb), 0.7); + margin-top: -3px; + margin-left: 3px; + font-size: 18px; + } + } + + .templates-selector { + margin-top: 15px; + } +} + +.CreateBoardFromTemplate--templates-selector__menu-portal { + &__option { + &__icon { + display: inline-block; + width: 19px; + } + &__title { + margin-left: 10px; + } + &__description { + display: block; + font-size: 12px; + margin-left: 29px; + color: rgba(var(--center-channel-color-rgb), 0.5); + } + } +} diff --git a/mattermost-plugin/webapp/src/components/createBoardFromTemplate.tsx b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.tsx new file mode 100644 index 000000000..44a923774 --- /dev/null +++ b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.tsx @@ -0,0 +1,240 @@ +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. +// See LICENSE.txt for license information. +import React, {useState} from 'react' + +import {createIntl, createIntlCache, IntlProvider} from 'react-intl' + +import Select from 'react-select/async' +import {components, FormatOptionLabelMeta, GroupBase, PlaceholderProps} from 'react-select' +import {SingleValue} from 'react-select' + +import {CSSObject} from '@emotion/serialize' + +import {getCurrentLanguage, getMessages} from '../../../../webapp/src/i18n' +import {getLanguage} from '../../../../webapp/src/store/language' +import CompassIcon from '../../../../webapp/src/widgets/icons/compassIcon' +import {useAppSelector} from '../../../../webapp/src/store/hooks' +import {mutator} from '../../../../webapp/src/mutator' +import {useGetAllTemplates} from '../../../../webapp/src/hooks/useGetAllTemplates' + +import './createBoardFromTemplate.scss' + +type Props = { + setSelectedTemplate: (templateId: string) => void; + toggleAddBoardCheck: (addBoard: boolean) => void; + newBoardInfoIcon: React.ReactNode; +} + +type ReactSelectItem = { + id: string; + title: string; + icon?: string; + description: string; +} + +const EMPTY_BOARD = 'empty_board' +const TEMPLATE_DESCRIPTION_LENGTH = 70 + +const cache = createIntlCache() +const intl = createIntl({ + locale: getCurrentLanguage(), + messages: getMessages(getCurrentLanguage()) +}, cache) + +export const createBoardFromTemplateAction = async (templateId: string, teamId: string, channelId: string) => { + const ACTION_DESCRIPTION = 'board created from channel' + const asTemplate = false + + let boardsAndBlocks = undefined + + if (templateId === EMPTY_BOARD) { + boardsAndBlocks = await mutator.addEmptyBoard(teamId, intl) + } else { + boardsAndBlocks = await mutator.duplicateBoard(templateId, ACTION_DESCRIPTION, asTemplate, undefined, undefined, teamId) + } + + const board = boardsAndBlocks.boards[0] + await mutator.updateBoard({...board, channelId: channelId}, board, 'linked channel') + return board +} + +const {ValueContainer, Placeholder} = components + +const CreateBoardFromTemplate = (props: Props) => { + const {formatMessage} = intl + + const [addBoard, setAddBoard] = useState(false) + const allTemplates = useGetAllTemplates() + + const showNewBoardTemplateSelector = async () => { + setAddBoard((prev: boolean) => { + props.toggleAddBoardCheck(!prev) + return !prev + }) + } + + const getSubstringWithCompleteWords = (str: string, len: number) => { + if (str?.length <= len) { + return str + } + + // get the final part of the string in order to find the next whitespace if any + const finalStringPart = str.substring(len) + const wordBreakingIndex = finalStringPart.indexOf(' ') + + // if there is no whitespace is because the lenght in this case falls into an entire word and doesn't affect the display, so just return it + if (wordBreakingIndex === -1) { + return str + } + return `${str.substring(0, (len + wordBreakingIndex))}…` + } + + const formatOptionLabel = ({ id, title, icon, description }: ReactSelectItem, optionLabel: FormatOptionLabelMeta) => { + const cssPrefix = 'CreateBoardFromTemplate--templates-selector__menu-portal__option' + + const descriptionLabel = description ? getSubstringWithCompleteWords(description, TEMPLATE_DESCRIPTION_LENGTH) : 'ㅤ' + + const templateDescription = ( + + {descriptionLabel} + + ) + + // do not show the description for the selected option so the input only show the icon and title of the template + const selectedOption = id === optionLabel.selectValue[0]?.id + return ( +
+ + {icon || } + + + {title} + + {!selectedOption && templateDescription} +
+ ) + } + + const CustomValueContainer = ({ children, ...props }: any) => { + return ( + + + {props.selectProps.placeholder} + + {React.Children.map(children, (child) => + child && child.type !== Placeholder ? child : null + )} + + ) + } + + const loadOptions = async (value = '') => { + let templates = allTemplates.map((template) => { + return { + id: template.id, + title: template.title, + icon: template.icon, + description: template.description, + } + }) + + const emptyBoard = { + id: EMPTY_BOARD, + title: formatMessage({id: 'new_channel_modal.create_board.empty_board_title', defaultMessage: 'Empty board'}), + icon: '', + description: formatMessage({id: 'new_channel_modal.create_board.empty_board_description', defaultMessage: 'Create a new empty board'}), + } + + templates.push(emptyBoard) + + if (value !== '') { + templates = templates.filter(template => template.title.toLowerCase().includes(value.toLowerCase())) + } + return templates + } + + const selectorStyles = { + menu: (baseStyles: CSSObject): CSSObject => ({ + ...baseStyles, + height: '164px', + }), + menuList: (baseStyles: CSSObject): CSSObject => ({ + ...baseStyles, + height: '160px', + }), + menuPortal: (baseStyles: CSSObject): CSSObject => ({ + ...baseStyles, + zIndex: 9999, + }), + valueContainer: (baseStyles: CSSObject): CSSObject => ({ + ...baseStyles, + overflow: 'visible' + }), + placeholder: (baseStyles: CSSObject, state: PlaceholderProps>): CSSObject => { + const modifyPlaceholder = state.selectProps.menuIsOpen || (!state.selectProps.menuIsOpen && state.hasValue) + return { + ...baseStyles, + position: 'absolute', + backgroundColor: 'var(--sys-center-channel-bg)', + padding: '0 3px', + top: modifyPlaceholder ? -15 : '18%', + transition: 'top 0.5s, font-size 0.5s, color 0.5s', + fontSize: modifyPlaceholder ? 10 : 16, + color: modifyPlaceholder ? 'var(--sidebar-text-active-border)' : 'rgba(var(--center-channel-color-rgb), 0.42)', + } + }, + } + + return ( +
+
+ + {addBoard &&
+ + + Create a board for this channel + +
+ icon +
+ +
+
+
+`; diff --git a/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx new file mode 100644 index 000000000..5ad5b3752 --- /dev/null +++ b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx @@ -0,0 +1,228 @@ +// // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. +// // See LICENSE.txt for license information. + +// import React from 'react' +// import {act} from 'react-dom/test-utils' +// import {ReactWrapper} from 'enzyme' +// import {Provider} from 'react-redux' + + +// describe('components/new_channel_modal', () => { + +// const actImmediate = (wrapper: ReactWrapper) => +// act( +// () => +// new Promise((resolve) => { +// setImmediate(() => { +// wrapper.update() +// resolve() +// }) +// }), +// ) + +// test('should show the boards template when the user clicks the create template checkbox', async () => { +// const store = await mockStore(mockState) +// const wrapper = mountWithIntl( +// +// +// , +// ) +// const showTemplatesCheck = wrapper.find('.add-board-to-channel input') + +// showTemplatesCheck.simulate('change') + +// await actImmediate(wrapper) + +// const inputTemplatesSelector = wrapper.find('#input_select-board-template') + +// expect(inputTemplatesSelector).toHaveLength(1) +// }) + +// test('should show the list of templates when the templates selector is clicked', async () => { +// const store = await mockStore(mockState) +// const wrapper = mountWithIntl( +// +// +// , +// ) +// const showTemplatesCheck = wrapper.find('.add-board-to-channel input') + +// showTemplatesCheck.simulate('change') + +// await actImmediate(wrapper) + +// const templatesSelector = wrapper.find('#input_select-board-template') + +// templatesSelector.simulate('click') + +// await actImmediate(wrapper) + +// const menuItems = wrapper.find('li.MenuItem') + +// const createEmptyBoardItem = wrapper.find('li#Empty_board') +// expect(createEmptyBoardItem).toHaveLength(1) + +// // contains 3 items because of the create empty board menu item +// expect(menuItems).toHaveLength(3) +// }) + +// test('when a board template is selected must call the switch to channel butoon', async () => { +// const switchToChannelFn = jest.fn() +// jest.spyOn(ChannelViewsActions, 'switchToChannel').mockImplementation(switchToChannelFn) + +// const name = 'New channel with board' +// const mockChangeEvent = { +// preventDefault: jest.fn(), +// target: { +// value: name, +// }, +// } as unknown as React.ChangeEvent + +// const wrapper = mountWithIntl( +// +// +// , +// ) + +// const genericModal = wrapper.find('GenericModal') +// const displayName = genericModal.find('.new-channel-modal-name-input') +// const confirmButton = genericModal.find('button[type=\'submit\']') + +// displayName.simulate('change', mockChangeEvent) + +// // Display name should be updated +// expect((displayName.instance() as unknown as HTMLInputElement).value).toEqual(name) + +// // Confirm button should be enabled +// expect((confirmButton.instance() as unknown as HTMLButtonElement).disabled).toEqual(false) + +// const showTemplatesCheck = wrapper.find('.add-board-to-channel input') + +// showTemplatesCheck.simulate('change') + +// await actImmediate(wrapper) + +// const templatesSelector = wrapper.find('#input_select-board-template') + +// templatesSelector.simulate('click') + +// await actImmediate(wrapper) + +// const firstTemplate = wrapper.find('li.MenuItem').at(0).find('button') + +// expect(firstTemplate).toHaveLength(1) + +// firstTemplate.simulate('click') + +// await actImmediate(wrapper) + +// // Submit +// await act(async () => { +// confirmButton.simulate('click') +// }) +// expect(switchToChannelFn).toHaveBeenCalled() +// }) + +// test('if focalboard plugin is not enabled, the option to create a board should be hidden', async () => { +// // eslint-disable-next-line @typescript-eslint/ban-ts-comment +// // @ts-ignore +// mockState.plugins.plugins = {} as ClientPluginManifest +// const storeNoPlugins = await mockStore(mockState) +// const wrapper = mountWithIntl( +// +// +// , +// ) +// const showTemplatesCheck = wrapper.find('.add-board-to-channel input') + +// expect(showTemplatesCheck).toHaveLength(0) +// }) +// }) + + +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. +// See LICENSE.txt for license information. + +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. +// See LICENSE.txt for license information. + +import React from 'react' +import {Provider as ReduxProvider} from 'react-redux' +import {render, screen, act, fireEvent} from '@testing-library/react' +import {mocked} from 'jest-mock' + +import userEvent from '@testing-library/user-event' + +import octoClient from '../../../../webapp/src/octoClient' +import {mockStateStore} from '../../../../webapp/src/testUtils' +import {createBoard} from '../../../../webapp/src/blocks/board' +import {wrapIntl} from '../../../../webapp/src/testUtils' + +import CreateBoardFromTemplate from './createBoardFromTemplate' + +jest.mock('../../../../webapp/src/octoClient') +const mockedOctoClient = mocked(octoClient, true) + +jest.mock('../../../../webapp/src/hooks/useGetAllTemplates', () => ({ + useGetAllTemplates: () => [{id: 'id', title: 'title', description: 'description', icon: 'icon'}] +})) + +const wait = (ms: number) => { + return new Promise((resolve) => { + setTimeout(resolve, ms) + }) +} + +describe('components/createBoardFromTemplate', () => { + const team = { + id: 'team-id', + name: 'team', + display_name: 'Team name', + } + const state = { + teams: { + allTeams: [team], + current: team, + currentId: team.id, + }, + language: { + value: 'en', + }, + boards: { + linkToChannel: 'channel-id', + }, + } + + it('renders the Create Boards from template component', async () => { + const store = mockStateStore([], state) + let container: Element | DocumentFragment | null = null + const setSelectedTemplate = jest.fn + const toggleAddBoardCheckbox = jest.fn + const newBoardInfoIcon = (
{'icon'}
) + + await act(async () => { + const result = render(wrapIntl( + + + + )) + container = result.container + }) + + expect(container).toMatchSnapshot() + }) + + // it('renders without start searching', async () => { + // const store = mockStateStore([], state) + // const {container} = render(wrapIntl( + // + // + // + // )) + // expect(container).toMatchSnapshot() + // }) +}) From 61ba412c27de72d97bff9b5478662c89b71c332f Mon Sep 17 00:00:00 2001 From: Pablo Velez Vidal Date: Wed, 11 Jan 2023 17:08:42 +0100 Subject: [PATCH 22/75] add unit tests --- .../createBoardFromTemplate.test.tsx.snap | 32 ++- .../createBoardFromTemplate.test.tsx | 225 +++--------------- 2 files changed, 68 insertions(+), 189 deletions(-) diff --git a/mattermost-plugin/webapp/src/components/__snapshots__/createBoardFromTemplate.test.tsx.snap b/mattermost-plugin/webapp/src/components/__snapshots__/createBoardFromTemplate.test.tsx.snap index ae75c0d34..3f362f62b 100644 --- a/mattermost-plugin/webapp/src/components/__snapshots__/createBoardFromTemplate.test.tsx.snap +++ b/mattermost-plugin/webapp/src/components/__snapshots__/createBoardFromTemplate.test.tsx.snap @@ -17,9 +17,35 @@ exports[`components/createBoardFromTemplate renders the Create Boards from templ Create a board for this channel -
- icon -
+ + + + + +`; + +exports[`components/createBoardFromTemplate renders the Create Boards from template component and match snapshot 1`] = ` +
+
+
+
diff --git a/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx index 5ad5b3752..283fdcb86 100644 --- a/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx +++ b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx @@ -1,204 +1,31 @@ -// // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// // See LICENSE.txt for license information. - -// import React from 'react' -// import {act} from 'react-dom/test-utils' -// import {ReactWrapper} from 'enzyme' -// import {Provider} from 'react-redux' - - -// describe('components/new_channel_modal', () => { - -// const actImmediate = (wrapper: ReactWrapper) => -// act( -// () => -// new Promise((resolve) => { -// setImmediate(() => { -// wrapper.update() -// resolve() -// }) -// }), -// ) - -// test('should show the boards template when the user clicks the create template checkbox', async () => { -// const store = await mockStore(mockState) -// const wrapper = mountWithIntl( -// -// -// , -// ) -// const showTemplatesCheck = wrapper.find('.add-board-to-channel input') - -// showTemplatesCheck.simulate('change') - -// await actImmediate(wrapper) - -// const inputTemplatesSelector = wrapper.find('#input_select-board-template') - -// expect(inputTemplatesSelector).toHaveLength(1) -// }) - -// test('should show the list of templates when the templates selector is clicked', async () => { -// const store = await mockStore(mockState) -// const wrapper = mountWithIntl( -// -// -// , -// ) -// const showTemplatesCheck = wrapper.find('.add-board-to-channel input') - -// showTemplatesCheck.simulate('change') - -// await actImmediate(wrapper) - -// const templatesSelector = wrapper.find('#input_select-board-template') - -// templatesSelector.simulate('click') - -// await actImmediate(wrapper) - -// const menuItems = wrapper.find('li.MenuItem') - -// const createEmptyBoardItem = wrapper.find('li#Empty_board') -// expect(createEmptyBoardItem).toHaveLength(1) - -// // contains 3 items because of the create empty board menu item -// expect(menuItems).toHaveLength(3) -// }) - -// test('when a board template is selected must call the switch to channel butoon', async () => { -// const switchToChannelFn = jest.fn() -// jest.spyOn(ChannelViewsActions, 'switchToChannel').mockImplementation(switchToChannelFn) - -// const name = 'New channel with board' -// const mockChangeEvent = { -// preventDefault: jest.fn(), -// target: { -// value: name, -// }, -// } as unknown as React.ChangeEvent - -// const wrapper = mountWithIntl( -// -// -// , -// ) - -// const genericModal = wrapper.find('GenericModal') -// const displayName = genericModal.find('.new-channel-modal-name-input') -// const confirmButton = genericModal.find('button[type=\'submit\']') - -// displayName.simulate('change', mockChangeEvent) - -// // Display name should be updated -// expect((displayName.instance() as unknown as HTMLInputElement).value).toEqual(name) - -// // Confirm button should be enabled -// expect((confirmButton.instance() as unknown as HTMLButtonElement).disabled).toEqual(false) - -// const showTemplatesCheck = wrapper.find('.add-board-to-channel input') - -// showTemplatesCheck.simulate('change') - -// await actImmediate(wrapper) - -// const templatesSelector = wrapper.find('#input_select-board-template') - -// templatesSelector.simulate('click') - -// await actImmediate(wrapper) - -// const firstTemplate = wrapper.find('li.MenuItem').at(0).find('button') - -// expect(firstTemplate).toHaveLength(1) - -// firstTemplate.simulate('click') - -// await actImmediate(wrapper) - -// // Submit -// await act(async () => { -// confirmButton.simulate('click') -// }) -// expect(switchToChannelFn).toHaveBeenCalled() -// }) - -// test('if focalboard plugin is not enabled, the option to create a board should be hidden', async () => { -// // eslint-disable-next-line @typescript-eslint/ban-ts-comment -// // @ts-ignore -// mockState.plugins.plugins = {} as ClientPluginManifest -// const storeNoPlugins = await mockStore(mockState) -// const wrapper = mountWithIntl( -// -// -// , -// ) -// const showTemplatesCheck = wrapper.find('.add-board-to-channel input') - -// expect(showTemplatesCheck).toHaveLength(0) -// }) -// }) - - -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - import React from 'react' import {Provider as ReduxProvider} from 'react-redux' -import {render, screen, act, fireEvent} from '@testing-library/react' -import {mocked} from 'jest-mock' +import {render, screen, act} from '@testing-library/react' import userEvent from '@testing-library/user-event' -import octoClient from '../../../../webapp/src/octoClient' import {mockStateStore} from '../../../../webapp/src/testUtils' -import {createBoard} from '../../../../webapp/src/blocks/board' import {wrapIntl} from '../../../../webapp/src/testUtils' import CreateBoardFromTemplate from './createBoardFromTemplate' -jest.mock('../../../../webapp/src/octoClient') -const mockedOctoClient = mocked(octoClient, true) - jest.mock('../../../../webapp/src/hooks/useGetAllTemplates', () => ({ - useGetAllTemplates: () => [{id: 'id', title: 'title', description: 'description', icon: 'icon'}] + useGetAllTemplates: () => [{id: 'id', title: 'title', description: 'description', icon: '🍔'}] })) -const wait = (ms: number) => { - return new Promise((resolve) => { - setTimeout(resolve, ms) - }) -} - describe('components/createBoardFromTemplate', () => { - const team = { - id: 'team-id', - name: 'team', - display_name: 'Team name', - } const state = { - teams: { - allTeams: [team], - current: team, - currentId: team.id, - }, language: { value: 'en', }, - boards: { - linkToChannel: 'channel-id', - }, } - it('renders the Create Boards from template component', async () => { + it('renders the Create Boards from template component and match snapshot', async () => { const store = mockStateStore([], state) let container: Element | DocumentFragment | null = null const setSelectedTemplate = jest.fn const toggleAddBoardCheckbox = jest.fn - const newBoardInfoIcon = (
{'icon'}
) + const newBoardInfoIcon = () await act(async () => { const result = render(wrapIntl( @@ -216,13 +43,39 @@ describe('components/createBoardFromTemplate', () => { expect(container).toMatchSnapshot() }) - // it('renders without start searching', async () => { - // const store = mockStateStore([], state) - // const {container} = render(wrapIntl( - // - // - // - // )) - // expect(container).toMatchSnapshot() - // }) + it('clicking checkbox toggles the templates selector', async () => { + const store = mockStateStore([], state) + const setSelectedTemplate = jest.fn + const toggleAddBoardCheckbox = jest.fn + const newBoardInfoIcon = () + + await act(async () => { + render(wrapIntl( + + + + )) + }) + + // click to show the template selector + let checkbox = screen.getByRole('checkbox', {checked: false}) + await act(async () => { + await userEvent.click(checkbox) + const templatesSelector = screen.queryByText('Select a template') + expect(templatesSelector).toBeTruthy() + }) + + // click to hide the template selector + checkbox = screen.getByRole('checkbox', {checked: true}) + await act(async () => { + await userEvent.click(checkbox) + const templatesSelector = screen.queryByText('Select a template') + expect(templatesSelector).not.toBeInTheDocument() + }) + + }) }) From 79254c16acbaaf12320d59bd0f682d1810a935a4 Mon Sep 17 00:00:00 2001 From: Pablo Velez Vidal Date: Wed, 11 Jan 2023 17:26:41 +0100 Subject: [PATCH 23/75] fix snapshot --- .../createBoardFromTemplate.test.tsx.snap | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/mattermost-plugin/webapp/src/components/__snapshots__/createBoardFromTemplate.test.tsx.snap b/mattermost-plugin/webapp/src/components/__snapshots__/createBoardFromTemplate.test.tsx.snap index 3f362f62b..7908af00d 100644 --- a/mattermost-plugin/webapp/src/components/__snapshots__/createBoardFromTemplate.test.tsx.snap +++ b/mattermost-plugin/webapp/src/components/__snapshots__/createBoardFromTemplate.test.tsx.snap @@ -1,31 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`components/createBoardFromTemplate renders the Create Boards from template component 1`] = ` -
-
-
- -
-
-
-`; - exports[`components/createBoardFromTemplate renders the Create Boards from template component and match snapshot 1`] = `
Date: Fri, 13 Jan 2023 11:14:12 -0500 Subject: [PATCH 24/75] store unit tests --- server/services/store/sqlstore/compliance.go | 2 +- .../services/store/storetests/compliance.go | 202 +++++++++++++++++- server/services/store/storetests/util.go | 39 +++- 3 files changed, 230 insertions(+), 13 deletions(-) diff --git a/server/services/store/sqlstore/compliance.go b/server/services/store/sqlstore/compliance.go index 956b07c7c..a7f7b232b 100644 --- a/server/services/store/sqlstore/compliance.go +++ b/server/services/store/sqlstore/compliance.go @@ -136,7 +136,7 @@ func (s *SQLStore) getBlocksComplianceHistory(db sq.BaseRunner, opts model.Query "bh.modified_by", ). From(s.tablePrefix+"blocks_history as bh"). - Join(s.tablePrefix+"boards as brd on brd.id=bh.board_id"). + Join(s.tablePrefix+"boards_history as brd on brd.id=bh.board_id"). Where(sq.Gt{"bh.update_at": opts.ModifiedSince}). GroupBy("bh.id", "brd.team_id", "bh.board_id", "bh.type", "bh.delete_at", "bh.created_by", "bh.modified_by"). OrderBy("lastUpdateAt desc") diff --git a/server/services/store/storetests/compliance.go b/server/services/store/storetests/compliance.go index cc5ab61ea..71d679ac6 100644 --- a/server/services/store/storetests/compliance.go +++ b/server/services/store/storetests/compliance.go @@ -1,6 +1,7 @@ package storetests import ( + "math" "testing" "github.com/mattermost/focalboard/server/model" @@ -16,6 +17,16 @@ func StoreTestComplianceHistoryStore(t *testing.T, setup func(t *testing.T) (sto defer tearDown() testGetBoardsForCompliance(t, store) }) + t.Run("GetBoardsComplianceHistory", func(t *testing.T) { + store, tearDown := setup(t) + defer tearDown() + testGetBoardsComplianceHistory(t, store) + }) + t.Run("GetBlocksComplianceHistory", func(t *testing.T) { + store, tearDown := setup(t) + defer tearDown() + testGetBlocksComplianceHistory(t, store) + }) } func testGetBoardsForCompliance(t *testing.T, store store.Store) { @@ -46,7 +57,7 @@ func testGetBoardsForCompliance(t *testing.T, store store.Store) { boards, hasMore, err := store.GetBoardsForCompliance(opts) - assert.ElementsMatch(t, extractBoardIDs(boards, nil), extractBoardIDs(boardsAdded1, boardsAdded2)) + assert.ElementsMatch(t, extractIDs(t, boards), extractIDs(t, boardsAdded1, boardsAdded2)) assert.False(t, hasMore) assert.NoError(t, err) }) @@ -58,7 +69,7 @@ func testGetBoardsForCompliance(t *testing.T, store store.Store) { boards, hasMore, err := store.GetBoardsForCompliance(opts) - assert.ElementsMatch(t, extractBoardIDs(boards, nil), extractBoardIDs(boardsAdded1, nil)) + assert.ElementsMatch(t, extractIDs(t, boards), extractIDs(t, boardsAdded1)) assert.False(t, hasMore) assert.NoError(t, err) }) @@ -85,6 +96,191 @@ func testGetBoardsForCompliance(t *testing.T, store store.Store) { reps++ } - assert.ElementsMatch(t, extractBoardIDs(allBoards, nil), extractBoardIDs(boardsAdded1, boardsAdded2)) + assert.ElementsMatch(t, extractIDs(t, allBoards), extractIDs(t, boardsAdded1, boardsAdded2)) + }) +} + +func testGetBoardsComplianceHistory(t *testing.T, store store.Store) { + team1 := testTeamID + team2 := utils.NewID(utils.IDTypeTeam) + + boardsAdded1 := createTestBoards(t, store, team1, testUserID, 10) + boardsAdded2 := createTestBoards(t, store, team2, testUserID, 7) + + deleteTestBoard(t, store, boardsAdded1[0].ID, testUserID) + deleteTestBoard(t, store, boardsAdded1[1].ID, testUserID) + boardsDeleted1 := boardsAdded1[0:2] + + t.Run("Invalid teamID", func(t *testing.T) { + opts := model.QueryBoardsComplianceHistoryOptions{ + TeamID: utils.NewID(utils.IDTypeTeam), + } + + boardHistories, hasMore, err := store.GetBoardsComplianceHistory(opts) + + assert.Empty(t, boardHistories) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("All teams, include deleted", func(t *testing.T) { + opts := model.QueryBoardsComplianceHistoryOptions{ + IncludeDeleted: true, + } + + boardHistories, hasMore, err := store.GetBoardsComplianceHistory(opts) + + // boardHistories should contain a record for each board added, plus a record for the 2 deleted. + assert.ElementsMatch(t, extractIDs(t, boardHistories), extractIDs(t, boardsAdded1, boardsAdded2, boardsDeleted1)) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("All teams, exclude deleted", func(t *testing.T) { + opts := model.QueryBoardsComplianceHistoryOptions{ + IncludeDeleted: false, + } + + boardHistories, hasMore, err := store.GetBoardsComplianceHistory(opts) + + // boardHistories should contain a record for each board added. + assert.ElementsMatch(t, extractIDs(t, boardHistories), extractIDs(t, boardsAdded1, boardsAdded2)) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("Specific team", func(t *testing.T) { + opts := model.QueryBoardsComplianceHistoryOptions{ + TeamID: team1, + } + + boardHistories, hasMore, err := store.GetBoardsComplianceHistory(opts) + + assert.ElementsMatch(t, extractIDs(t, boardHistories), extractIDs(t, boardsAdded1)) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("Pagination", func(t *testing.T) { + opts := model.QueryBoardsComplianceHistoryOptions{ + Page: 0, + PerPage: 3, + } + + reps := 0 + allHistories := make([]model.BoardHistory, 0, 20) + + for { + reps++ + boardHistories, hasMore, err := store.GetBoardsComplianceHistory(opts) + require.NoError(t, err) + require.NotEmpty(t, boardHistories) + allHistories = append(allHistories, boardHistories...) + + if !hasMore { + break + } + opts.Page++ + } + + assert.ElementsMatch(t, extractIDs(t, allHistories), extractIDs(t, boardsAdded1, boardsAdded2)) + + // 17 boards were added. Fetching 3 per page means 6 reps + assert.Equal(t, math.Floor(17/3)+1, float64(reps)) + }) +} + +func testGetBlocksComplianceHistory(t *testing.T, store store.Store) { + team1 := testTeamID + team2 := utils.NewID(utils.IDTypeTeam) + + boardsAdded1 := createTestBoards(t, store, team1, testUserID, 3) + boardsAdded2 := createTestBoards(t, store, team2, testUserID, 1) + + // add cards (13 in total) + cardsAdded1B1 := createTestCards(t, store, testUserID, boardsAdded1[0].ID, 3) + cardsAdded1B2 := createTestCards(t, store, testUserID, boardsAdded1[1].ID, 5) + cardsAdded1B3 := createTestCards(t, store, testUserID, boardsAdded1[2].ID, 2) + cardsAdded2B1 := createTestCards(t, store, testUserID, boardsAdded2[0].ID, 3) + + deleteTestBoard(t, store, boardsAdded1[0].ID, testUserID) + cardsDeleted := cardsAdded1B1 + + t.Run("Invalid teamID", func(t *testing.T) { + opts := model.QueryBlocksComplianceHistoryOptions{ + TeamID: utils.NewID(utils.IDTypeTeam), + } + + boards, hasMore, err := store.GetBlocksComplianceHistory(opts) + + assert.Empty(t, boards) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("All teams, include deleted", func(t *testing.T) { + opts := model.QueryBlocksComplianceHistoryOptions{ + IncludeDeleted: true, + } + + blockHistories, hasMore, err := store.GetBlocksComplianceHistory(opts) + + // blockHistories should have records for all cards added, plus all cards deleted + assert.ElementsMatch(t, extractIDs(t, blockHistories, nil), + extractIDs(t, cardsAdded1B1, cardsAdded1B2, cardsAdded1B3, cardsAdded2B1, cardsDeleted)) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("All teams, exclude deleted", func(t *testing.T) { + opts := model.QueryBlocksComplianceHistoryOptions{} + + blockHistories, hasMore, err := store.GetBlocksComplianceHistory(opts) + + // blockHistories should have records for all cards added + assert.ElementsMatch(t, extractIDs(t, blockHistories, nil), + extractIDs(t, cardsAdded1B1, cardsAdded1B2, cardsAdded1B3, cardsAdded2B1)) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("Specific team", func(t *testing.T) { + opts := model.QueryBlocksComplianceHistoryOptions{ + TeamID: team1, + } + + blockHistories, hasMore, err := store.GetBlocksComplianceHistory(opts) + + assert.ElementsMatch(t, extractIDs(t, blockHistories), extractIDs(t, cardsAdded1B1, cardsAdded1B2, cardsAdded1B3)) + assert.False(t, hasMore) + assert.NoError(t, err) + }) + + t.Run("Pagination", func(t *testing.T) { + opts := model.QueryBlocksComplianceHistoryOptions{ + Page: 0, + PerPage: 3, + } + + reps := 0 + allHistories := make([]model.BlockHistory, 0) + + for { + reps++ + blockHistories, hasMore, err := store.GetBlocksComplianceHistory(opts) + require.NoError(t, err) + require.NotEmpty(t, blockHistories) + allHistories = append(allHistories, blockHistories...) + + if !hasMore { + break + } + opts.Page++ + } + + assert.ElementsMatch(t, extractIDs(t, allHistories), extractIDs(t, cardsAdded1B1, cardsAdded1B2, cardsAdded1B3, cardsAdded2B1)) + + // 13 cards were added. Fetching 3 per page means 5 reps + assert.Equal(t, math.Floor(13/3)+1, float64(reps)) }) } diff --git a/server/services/store/storetests/util.go b/server/services/store/storetests/util.go index f63625e50..7d48f7d7f 100644 --- a/server/services/store/storetests/util.go +++ b/server/services/store/storetests/util.go @@ -113,16 +113,37 @@ func deleteTestBoard(t *testing.T, store store.Store, boardID string, userID str require.NoError(t, err) } -func extractBoardIDs(boards1, boards2 []*model.Board) []string { - ids := make([]string, 0, len(boards1)+len(boards2)) - for _, b := range boards1 { - if b != nil { - ids = append(ids, b.ID) +func extractIDs(t *testing.T, arr ...any) []string { + ids := make([]string, 0) + + for _, item := range arr { + if item == nil { + continue } - } - for _, b := range boards2 { - if b != nil { - ids = append(ids, b.ID) + + switch tarr := item.(type) { + case []*model.Board: + for _, b := range tarr { + if b != nil { + ids = append(ids, b.ID) + } + } + case []model.BoardHistory: + for _, bh := range tarr { + ids = append(ids, bh.ID) + } + case []*model.Block: + for _, b := range tarr { + if b != nil { + ids = append(ids, b.ID) + } + } + case []model.BlockHistory: + for _, bh := range tarr { + ids = append(ids, bh.ID) + } + default: + t.Errorf("unsupported type %T extracting board ID", item) } } return ids From 5b345bd401da9ea5f630d2d7a390f2715a5c11fe Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Fri, 13 Jan 2023 20:44:07 -0500 Subject: [PATCH 25/75] fix queries for Postgres; fix unit tests --- server/integrationtests/compliance_test.go | 6 +- server/services/store/sqlstore/compliance.go | 28 ++++---- .../services/store/storetests/compliance.go | 66 +++++++++++-------- server/services/store/storetests/util.go | 4 ++ 4 files changed, 61 insertions(+), 43 deletions(-) diff --git a/server/integrationtests/compliance_test.go b/server/integrationtests/compliance_test.go index 7e5ae2e29..cba86fc65 100644 --- a/server/integrationtests/compliance_test.go +++ b/server/integrationtests/compliance_test.go @@ -154,7 +154,7 @@ func TestGetBoardsComplianceHistory(t *testing.T) { require.Nil(t, bchr) }) - t.Run("good call, no deleted", func(t *testing.T) { + t.Run("good call, exclude deleted", func(t *testing.T) { th, clients := setupTestHelperForCompliance(t, true) defer th.TearDown() @@ -172,7 +172,7 @@ func TestGetBoardsComplianceHistory(t *testing.T) { bchr, resp := clients.Admin.GetBoardsComplianceHistory(utils.GetMillis()-OneDay, false, testTeamID, 0, 0) th.CheckOK(resp) require.False(t, bchr.HasNext) - require.Len(t, bchr.Results, count) // both deleted boards have one non-deleted record each + require.Len(t, bchr.Results, count-2) // two boards deleted }) t.Run("good call, include deleted", func(t *testing.T) { @@ -287,7 +287,7 @@ func TestGetBlocksComplianceHistory(t *testing.T) { bchr, resp := clients.Admin.GetBlocksComplianceHistory(utils.GetMillis()-OneDay, false, testTeamID, board.ID, 0, 0) th.CheckOK(resp) require.False(t, bchr.HasNext) - require.Len(t, bchr.Results, count) // both deleted cards have one non-deleted record each + require.Len(t, bchr.Results, count-2) // 2 blocks deleted }) t.Run("good call, include deleted", func(t *testing.T) { diff --git a/server/services/store/sqlstore/compliance.go b/server/services/store/sqlstore/compliance.go index a7f7b232b..908adcfbb 100644 --- a/server/services/store/sqlstore/compliance.go +++ b/server/services/store/sqlstore/compliance.go @@ -80,15 +80,18 @@ func (s *SQLStore) getBoardsComplianceHistory(db sq.BaseRunner, opts model.Query "bh.created_by", "bh.modified_by", ). - From(s.tablePrefix+"boards_history as bh"). - Where(sq.Gt{"bh.update_at": opts.ModifiedSince}). - GroupBy("bh.id", "bh.team_id", "bh.delete_at", "bh.created_by", "bh.modified_by"). - OrderBy("decendentLastUpdateAt desc") + From(s.tablePrefix + "boards_history as bh") if !opts.IncludeDeleted { - query = query.Where(sq.Eq{"bh.delete_at": 0}) + // filtering out deleted boards; join with boards table to ensure no history + // for deleted boards are returned. Deleted boards won't exist in boards table. + query = query.Join(s.tablePrefix + "boards as b ON b.id=bh.id") } + query = query.Where(sq.Gt{"bh.update_at": opts.ModifiedSince}). + GroupBy("bh.id", "bh.team_id", "bh.delete_at", "bh.created_by", "bh.modified_by"). + OrderBy("decendentLastUpdateAt desc", "bh.id") + if opts.TeamID != "" { query = query.Where(sq.Eq{"bh.team_id": opts.TeamID}) } @@ -135,16 +138,19 @@ func (s *SQLStore) getBlocksComplianceHistory(db sq.BaseRunner, opts model.Query "bh.created_by", "bh.modified_by", ). - From(s.tablePrefix+"blocks_history as bh"). - Join(s.tablePrefix+"boards_history as brd on brd.id=bh.board_id"). - Where(sq.Gt{"bh.update_at": opts.ModifiedSince}). - GroupBy("bh.id", "brd.team_id", "bh.board_id", "bh.type", "bh.delete_at", "bh.created_by", "bh.modified_by"). - OrderBy("lastUpdateAt desc") + From(s.tablePrefix + "blocks_history as bh"). + Join(s.tablePrefix + "boards_history as brd on brd.id=bh.board_id") if !opts.IncludeDeleted { - query = query.Where(sq.Eq{"bh.delete_at": 0}) + // filtering out deleted blocks; join with blocks table to ensure no history + // for deleted blocks are returned. Deleted blocks won't exist in blocks table. + query = query.Join(s.tablePrefix + "blocks as b ON b.id=bh.id") } + query = query.Where(sq.Gt{"bh.update_at": opts.ModifiedSince}). + GroupBy("bh.id", "brd.team_id", "bh.board_id", "bh.type", "bh.delete_at", "bh.created_by", "bh.modified_by"). + OrderBy("lastUpdateAt desc", "bh.id") + if opts.TeamID != "" { query = query.Where(sq.Eq{"brd.team_id": opts.TeamID}) } diff --git a/server/services/store/storetests/compliance.go b/server/services/store/storetests/compliance.go index 71d679ac6..d795117ba 100644 --- a/server/services/store/storetests/compliance.go +++ b/server/services/store/storetests/compliance.go @@ -104,12 +104,21 @@ func testGetBoardsComplianceHistory(t *testing.T, store store.Store) { team1 := testTeamID team2 := utils.NewID(utils.IDTypeTeam) - boardsAdded1 := createTestBoards(t, store, team1, testUserID, 10) - boardsAdded2 := createTestBoards(t, store, team2, testUserID, 7) + boardsTeam1 := createTestBoards(t, store, team1, testUserID, 11) + boardsTeam2 := createTestBoards(t, store, team2, testUserID, 7) + boardsAdded := make([]*model.Board, 0) + boardsAdded = append(boardsAdded, boardsTeam1...) + boardsAdded = append(boardsAdded, boardsTeam2...) - deleteTestBoard(t, store, boardsAdded1[0].ID, testUserID) - deleteTestBoard(t, store, boardsAdded1[1].ID, testUserID) - boardsDeleted1 := boardsAdded1[0:2] + deleteTestBoard(t, store, boardsTeam1[0].ID, testUserID) + deleteTestBoard(t, store, boardsTeam1[1].ID, testUserID) + boardsDeleted := boardsTeam1[0:2] + boardsTeam1 = boardsTeam1[2:] + + t.Log("boardsTeam1: ", extractIDs(t, boardsTeam1)) + t.Log("boardsTeam2: ", extractIDs(t, boardsTeam2)) + t.Log("boardsAdded: ", extractIDs(t, boardsAdded)) + t.Log("boardsDeleted: ", extractIDs(t, boardsDeleted)) t.Run("Invalid teamID", func(t *testing.T) { opts := model.QueryBoardsComplianceHistoryOptions{ @@ -131,7 +140,7 @@ func testGetBoardsComplianceHistory(t *testing.T, store store.Store) { boardHistories, hasMore, err := store.GetBoardsComplianceHistory(opts) // boardHistories should contain a record for each board added, plus a record for the 2 deleted. - assert.ElementsMatch(t, extractIDs(t, boardHistories), extractIDs(t, boardsAdded1, boardsAdded2, boardsDeleted1)) + assert.ElementsMatch(t, extractIDs(t, boardHistories), extractIDs(t, boardsAdded, boardsDeleted)) assert.False(t, hasMore) assert.NoError(t, err) }) @@ -143,8 +152,8 @@ func testGetBoardsComplianceHistory(t *testing.T, store store.Store) { boardHistories, hasMore, err := store.GetBoardsComplianceHistory(opts) - // boardHistories should contain a record for each board added. - assert.ElementsMatch(t, extractIDs(t, boardHistories), extractIDs(t, boardsAdded1, boardsAdded2)) + // boardHistories should contain a record for each board added, minus the two deleted. + assert.ElementsMatch(t, extractIDs(t, boardHistories), extractIDs(t, boardsTeam1, boardsTeam2)) assert.False(t, hasMore) assert.NoError(t, err) }) @@ -156,7 +165,7 @@ func testGetBoardsComplianceHistory(t *testing.T, store store.Store) { boardHistories, hasMore, err := store.GetBoardsComplianceHistory(opts) - assert.ElementsMatch(t, extractIDs(t, boardHistories), extractIDs(t, boardsAdded1)) + assert.ElementsMatch(t, extractIDs(t, boardHistories), extractIDs(t, boardsTeam1)) assert.False(t, hasMore) assert.NoError(t, err) }) @@ -168,7 +177,7 @@ func testGetBoardsComplianceHistory(t *testing.T, store store.Store) { } reps := 0 - allHistories := make([]model.BoardHistory, 0, 20) + allHistories := make([]model.BoardHistory, 0) for { reps++ @@ -183,10 +192,9 @@ func testGetBoardsComplianceHistory(t *testing.T, store store.Store) { opts.Page++ } - assert.ElementsMatch(t, extractIDs(t, allHistories), extractIDs(t, boardsAdded1, boardsAdded2)) - - // 17 boards were added. Fetching 3 per page means 6 reps - assert.Equal(t, math.Floor(17/3)+1, float64(reps)) + assert.ElementsMatch(t, extractIDs(t, allHistories), extractIDs(t, boardsTeam1, boardsTeam2)) + expectedCount := len(boardsTeam1) + len(boardsTeam2) + assert.Equal(t, math.Floor(float64(expectedCount/opts.PerPage)+1), float64(reps)) }) } @@ -194,17 +202,17 @@ func testGetBlocksComplianceHistory(t *testing.T, store store.Store) { team1 := testTeamID team2 := utils.NewID(utils.IDTypeTeam) - boardsAdded1 := createTestBoards(t, store, team1, testUserID, 3) - boardsAdded2 := createTestBoards(t, store, team2, testUserID, 1) + boardsTeam1 := createTestBoards(t, store, team1, testUserID, 3) + boardsTeam2 := createTestBoards(t, store, team2, testUserID, 1) // add cards (13 in total) - cardsAdded1B1 := createTestCards(t, store, testUserID, boardsAdded1[0].ID, 3) - cardsAdded1B2 := createTestCards(t, store, testUserID, boardsAdded1[1].ID, 5) - cardsAdded1B3 := createTestCards(t, store, testUserID, boardsAdded1[2].ID, 2) - cardsAdded2B1 := createTestCards(t, store, testUserID, boardsAdded2[0].ID, 3) + cards1Team1 := createTestCards(t, store, testUserID, boardsTeam1[0].ID, 3) + cards2Team1 := createTestCards(t, store, testUserID, boardsTeam1[1].ID, 5) + cards3Team1 := createTestCards(t, store, testUserID, boardsTeam1[2].ID, 2) + cards1Team2 := createTestCards(t, store, testUserID, boardsTeam2[0].ID, 3) - deleteTestBoard(t, store, boardsAdded1[0].ID, testUserID) - cardsDeleted := cardsAdded1B1 + deleteTestBoard(t, store, boardsTeam1[0].ID, testUserID) + cardsDeleted := cards1Team1 t.Run("Invalid teamID", func(t *testing.T) { opts := model.QueryBlocksComplianceHistoryOptions{ @@ -227,7 +235,7 @@ func testGetBlocksComplianceHistory(t *testing.T, store store.Store) { // blockHistories should have records for all cards added, plus all cards deleted assert.ElementsMatch(t, extractIDs(t, blockHistories, nil), - extractIDs(t, cardsAdded1B1, cardsAdded1B2, cardsAdded1B3, cardsAdded2B1, cardsDeleted)) + extractIDs(t, cards1Team1, cards2Team1, cards3Team1, cards1Team2, cardsDeleted)) assert.False(t, hasMore) assert.NoError(t, err) }) @@ -237,9 +245,9 @@ func testGetBlocksComplianceHistory(t *testing.T, store store.Store) { blockHistories, hasMore, err := store.GetBlocksComplianceHistory(opts) - // blockHistories should have records for all cards added + // blockHistories should have records for all cards added that have not been deleted assert.ElementsMatch(t, extractIDs(t, blockHistories, nil), - extractIDs(t, cardsAdded1B1, cardsAdded1B2, cardsAdded1B3, cardsAdded2B1)) + extractIDs(t, cards2Team1, cards3Team1, cards1Team2)) assert.False(t, hasMore) assert.NoError(t, err) }) @@ -251,7 +259,7 @@ func testGetBlocksComplianceHistory(t *testing.T, store store.Store) { blockHistories, hasMore, err := store.GetBlocksComplianceHistory(opts) - assert.ElementsMatch(t, extractIDs(t, blockHistories), extractIDs(t, cardsAdded1B1, cardsAdded1B2, cardsAdded1B3)) + assert.ElementsMatch(t, extractIDs(t, blockHistories), extractIDs(t, cards2Team1, cards3Team1)) assert.False(t, hasMore) assert.NoError(t, err) }) @@ -278,9 +286,9 @@ func testGetBlocksComplianceHistory(t *testing.T, store store.Store) { opts.Page++ } - assert.ElementsMatch(t, extractIDs(t, allHistories), extractIDs(t, cardsAdded1B1, cardsAdded1B2, cardsAdded1B3, cardsAdded2B1)) + assert.ElementsMatch(t, extractIDs(t, allHistories), extractIDs(t, cards2Team1, cards3Team1, cards1Team2)) - // 13 cards were added. Fetching 3 per page means 5 reps - assert.Equal(t, math.Floor(13/3)+1, float64(reps)) + expectedCount := len(cards2Team1) + len(cards3Team1) + len(cards1Team2) + assert.Equal(t, math.Floor(float64(expectedCount/opts.PerPage)+1), float64(reps)) }) } diff --git a/server/services/store/storetests/util.go b/server/services/store/storetests/util.go index 7d48f7d7f..2ad0b3e69 100644 --- a/server/services/store/storetests/util.go +++ b/server/services/store/storetests/util.go @@ -5,6 +5,7 @@ package storetests import ( "fmt" + "sort" "testing" "github.com/mattermost/focalboard/server/model" @@ -146,5 +147,8 @@ func extractIDs(t *testing.T, arr ...any) []string { t.Errorf("unsupported type %T extracting board ID", item) } } + + // sort the ids to make it easier to compare lists of ids visually. + sort.Strings(ids) return ids } From 4df8c43410df8cfd2bdd9bcb407ebc19d7b1d127 Mon Sep 17 00:00:00 2001 From: wiggin77 Date: Fri, 13 Jan 2023 21:25:56 -0500 Subject: [PATCH 26/75] comments --- server/integrationtests/compliance_test.go | 2 +- server/services/store/storetests/util.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/integrationtests/compliance_test.go b/server/integrationtests/compliance_test.go index cba86fc65..da0b1d8ad 100644 --- a/server/integrationtests/compliance_test.go +++ b/server/integrationtests/compliance_test.go @@ -269,7 +269,7 @@ func TestGetBlocksComplianceHistory(t *testing.T) { require.Nil(t, bchr) }) - t.Run("good call, no deleted", func(t *testing.T) { + t.Run("good call, exclude deleted", func(t *testing.T) { th, clients := setupTestHelperForCompliance(t, true) defer th.TearDown() diff --git a/server/services/store/storetests/util.go b/server/services/store/storetests/util.go index 2ad0b3e69..afafd45ac 100644 --- a/server/services/store/storetests/util.go +++ b/server/services/store/storetests/util.go @@ -114,6 +114,8 @@ func deleteTestBoard(t *testing.T, store store.Store, boardID string, userID str require.NoError(t, err) } +// extractIDs is a test helper that extracts a sorted slice of IDs from slices of various struct types. +// Might have used generics here except that would require implementing a `GetID` method on each type. func extractIDs(t *testing.T, arr ...any) []string { ids := make([]string, 0) From 9d86216f5db99d0f2897a571463eeff490e90962 Mon Sep 17 00:00:00 2001 From: Scott Bishel Date: Tue, 17 Jan 2023 15:51:24 -0700 Subject: [PATCH 27/75] fix string vs string[] in hiding rows --- webapp/src/components/table/tableRow.tsx | 2 ++ webapp/src/mutator.ts | 31 ++++++++++++++++--- .../src/properties/person/confirmPerson.tsx | 2 +- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/webapp/src/components/table/tableRow.tsx b/webapp/src/components/table/tableRow.tsx index cff795a74..eb570f41c 100644 --- a/webapp/src/components/table/tableRow.tsx +++ b/webapp/src/components/table/tableRow.tsx @@ -103,6 +103,8 @@ const TableRow = (props: Props) => { } else if (template && template.type === 'updatedBy') { groupValue = card.modifiedBy } + } else if (Array.isArray(groupValue)) { + groupValue = groupValue[0] } if (collapsedOptionIds.indexOf(groupValue) > -1) { className += ' hidden' diff --git a/webapp/src/mutator.ts b/webapp/src/mutator.ts index 3642b5e01..4382e0933 100644 --- a/webapp/src/mutator.ts +++ b/webapp/src/mutator.ts @@ -665,19 +665,28 @@ class Mutator { const newBlockIDs: string[] = [] if (propertyTemplate.type !== newType) { - if (propertyTemplate.type === 'select' || propertyTemplate.type === 'multiSelect') { // If the old type was either select or multiselect + if (propertyTemplate.type === 'select' || propertyTemplate.type === 'multiSelect' || + (propertyTemplate.type === 'person' || propertyTemplate.type === 'multiPerson')) { // If the old type was either select or multiselect const isNewTypeSelectOrMulti = newType === 'select' || newType === 'multiSelect' + const isNewTypePersonOrMulti = newType === 'person' || newType === 'multiPerson' for (const card of cards) { - const oldValue = Array.isArray(card.fields.properties[propertyTemplate.id]) ? (card.fields.properties[propertyTemplate.id].length > 0 && card.fields.properties[propertyTemplate.id][0]) : card.fields.properties[propertyTemplate.id] + const oldValue = Array.isArray(card.fields.properties[propertyTemplate.id]) ? (card.fields.properties[propertyTemplate.id].length > 0 && card.fields.properties[propertyTemplate.id][0] as string) : card.fields.properties[propertyTemplate.id] as string if (oldValue) { - const newValue = isNewTypeSelectOrMulti ? propertyTemplate.options.find((o) => o.id === oldValue)?.id : propertyTemplate.options.find((o) => o.id === oldValue)?.value - const newCard = createCard(card) + let newValue: string | undefined + if (isNewTypeSelectOrMulti) { + newValue = propertyTemplate.options.find((o) => o.id === oldValue)?.id + } else if (isNewTypePersonOrMulti) { + newValue = oldValue + } else if (propertyTemplate.type === 'select' || propertyTemplate.type === 'multiSelect') { + newValue = propertyTemplate.options.find((o) => o.id === oldValue)?.value + } + const newCard = createCard(card) if (newValue) { newCard.fields.properties[propertyTemplate.id] = newType === 'multiSelect' ? [newValue] : newValue } else { - // This was an invalid select option, so delete it + // This was an invalid select option or old person id, so delete it delete newCard.fields.properties[propertyTemplate.id] } @@ -708,6 +717,18 @@ class Mutator { const newCard = createCard(card) newCard.fields.properties[propertyTemplate.id] = newType === 'multiSelect' ? [option.id] : option.id + newBlocks.push(newCard) + newBlockIDs.push(newCard.id) + oldBlocks.push(card) + } + } + } else if (newType === 'person' || newType === 'multiPerson') { // if the new type is either person or multiperson + // Clear old values + for (const card of cards) { + const oldValue = card.fields.properties[propertyTemplate.id] as string + if (oldValue) { + const newCard = createCard(card) + delete newCard.fields.properties[propertyTemplate.id] newBlocks.push(newCard) newBlockIDs.push(newCard.id) oldBlocks.push(card) diff --git a/webapp/src/properties/person/confirmPerson.tsx b/webapp/src/properties/person/confirmPerson.tsx index 666f8460b..08739b288 100644 --- a/webapp/src/properties/person/confirmPerson.tsx +++ b/webapp/src/properties/person/confirmPerson.tsx @@ -85,7 +85,7 @@ const ConfirmPerson = (props: PropertyProps): JSX.Element => { setConfirmAddUser(null) await mutator.createBoardMember(newMember) - if (userIDs) { + if (propertyTemplate.type === 'multiPerson') { await mutator.changePropertyValue(board.id, card, propertyTemplate.id, [...userIDs, newMember.userId]) } else { await mutator.changePropertyValue(board.id, card, propertyTemplate.id, newMember.userId) From c69bc6c16d03213952d45e3351d6e90acb8d476e Mon Sep 17 00:00:00 2001 From: Scott Bishel Date: Tue, 17 Jan 2023 17:06:21 -0700 Subject: [PATCH 28/75] clean up code --- webapp/src/mutator.ts | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/webapp/src/mutator.ts b/webapp/src/mutator.ts index 4382e0933..e05326477 100644 --- a/webapp/src/mutator.ts +++ b/webapp/src/mutator.ts @@ -665,26 +665,38 @@ class Mutator { const newBlockIDs: string[] = [] if (propertyTemplate.type !== newType) { + // If the old type was either select/multiselect or person/multiperson if (propertyTemplate.type === 'select' || propertyTemplate.type === 'multiSelect' || - (propertyTemplate.type === 'person' || propertyTemplate.type === 'multiPerson')) { // If the old type was either select or multiselect + (propertyTemplate.type === 'person' || propertyTemplate.type === 'multiPerson')) { + // determine new type is either select/multiselect or person/multiperson const isNewTypeSelectOrMulti = newType === 'select' || newType === 'multiSelect' const isNewTypePersonOrMulti = newType === 'person' || newType === 'multiPerson' + const isOldTypeSelectOrMulti = newType === 'select' || newType === 'multiSelect' + const isOldTypePersonOrMulti = newType === 'person' || newType === 'multiPerson' for (const card of cards) { + // if array get first value, if exists const oldValue = Array.isArray(card.fields.properties[propertyTemplate.id]) ? (card.fields.properties[propertyTemplate.id].length > 0 && card.fields.properties[propertyTemplate.id][0] as string) : card.fields.properties[propertyTemplate.id] as string if (oldValue) { let newValue: string | undefined - if (isNewTypeSelectOrMulti) { - newValue = propertyTemplate.options.find((o) => o.id === oldValue)?.id - } else if (isNewTypePersonOrMulti) { - newValue = oldValue - } else if (propertyTemplate.type === 'select' || propertyTemplate.type === 'multiSelect') { - newValue = propertyTemplate.options.find((o) => o.id === oldValue)?.value + if (isOldTypePersonOrMulti) { + if (isNewTypePersonOrMulti) { + newValue = oldValue + } + } else if (isNewTypeSelectOrMulti) { + if (isOldTypeSelectOrMulti) { + newValue = propertyTemplate.options.find((o) => o.id === oldValue)?.id + } else { + newValue = propertyTemplate.options.find((o) => o.id === oldValue)?.value + } } - const newCard = createCard(card) if (newValue) { - newCard.fields.properties[propertyTemplate.id] = newType === 'multiSelect' ? [newValue] : newValue + if (newType === 'multiSelect' || newType === 'multiPerson') { + newCard.fields.properties[propertyTemplate.id] = [newValue] + } else { + newCard.fields.properties[propertyTemplate.id] = newValue + } } else { // This was an invalid select option or old person id, so delete it delete newCard.fields.properties[propertyTemplate.id] From 02b96258ef0bd6f977a99c35124676485eb08984 Mon Sep 17 00:00:00 2001 From: Scott Bishel Date: Tue, 17 Jan 2023 17:14:15 -0700 Subject: [PATCH 29/75] more cleanup --- webapp/src/mutator.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/webapp/src/mutator.ts b/webapp/src/mutator.ts index e05326477..6c5887851 100644 --- a/webapp/src/mutator.ts +++ b/webapp/src/mutator.ts @@ -665,15 +665,14 @@ class Mutator { const newBlockIDs: string[] = [] if (propertyTemplate.type !== newType) { - // If the old type was either select/multiselect or person/multiperson - if (propertyTemplate.type === 'select' || propertyTemplate.type === 'multiSelect' || - (propertyTemplate.type === 'person' || propertyTemplate.type === 'multiPerson')) { - // determine new type is either select/multiselect or person/multiperson - const isNewTypeSelectOrMulti = newType === 'select' || newType === 'multiSelect' - const isNewTypePersonOrMulti = newType === 'person' || newType === 'multiPerson' - const isOldTypeSelectOrMulti = newType === 'select' || newType === 'multiSelect' - const isOldTypePersonOrMulti = newType === 'person' || newType === 'multiPerson' + const isNewTypeSelectOrMulti = newType === 'select' || newType === 'multiSelect' + const isNewTypePersonOrMulti = newType === 'person' || newType === 'multiPerson' + const isOldTypeSelectOrMulti = propertyTemplate.type === 'select' || propertyTemplate.type === 'multiSelect' + const isOldTypePersonOrMulti = propertyTemplate.type === 'person' || propertyTemplate.type === 'multiPerson' + + // If the old type was either select/multiselect or person/multiperson + if (isOldTypeSelectOrMulti || isOldTypePersonOrMulti) { for (const card of cards) { // if array get first value, if exists const oldValue = Array.isArray(card.fields.properties[propertyTemplate.id]) ? (card.fields.properties[propertyTemplate.id].length > 0 && card.fields.properties[propertyTemplate.id][0] as string) : card.fields.properties[propertyTemplate.id] as string @@ -711,7 +710,7 @@ class Mutator { newTemplate.options = propertyTemplate.options } } - } else if (newType === 'select' || newType === 'multiSelect') { // if the new type is either select or multiselect + } else if (isNewTypeSelectOrMulti) { // if the new type is either select or multiselect - old type is other // Map values to new template option IDs for (const card of cards) { const oldValue = card.fields.properties[propertyTemplate.id] as string @@ -734,7 +733,7 @@ class Mutator { oldBlocks.push(card) } } - } else if (newType === 'person' || newType === 'multiPerson') { // if the new type is either person or multiperson + } else if (isNewTypePersonOrMulti) { // if the new type is either person or multiperson - old type is other // Clear old values for (const card of cards) { const oldValue = card.fields.properties[propertyTemplate.id] as string From 165d3c0fc14f8eaeec3d466592667034a9760ac0 Mon Sep 17 00:00:00 2001 From: Doug Lauder Date: Wed, 25 Jan 2023 14:08:18 -0500 Subject: [PATCH 30/75] Update server/api/compliance.go Co-authored-by: Miguel de la Cruz --- server/api/compliance.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api/compliance.go b/server/api/compliance.go index 9ebb420d6..9cbd1f10c 100644 --- a/server/api/compliance.go +++ b/server/api/compliance.go @@ -371,7 +371,7 @@ func (a *API) handleGetBlocksComplianceHistory(w http.ResponseWriter, r *http.Re return } - // check for valid team + // check for valid board _, err = a.app.GetBoard(boardID) if err != nil { a.errorResponse(w, r, model.NewErrBadRequest("invalid board id: "+boardID)) From 3b88cefcff370bef9a6252e348d40c0f7260bcaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Andr=C3=A9s=20V=C3=A9lez=20Vidal?= Date: Wed, 25 Jan 2023 22:06:20 +0100 Subject: [PATCH 31/75] move template id handling to plugin --- mattermost-plugin/server/manifest.go | 3 +- .../createBoardFromTemplate.test.tsx | 18 ++-- .../components/createBoardFromTemplate.tsx | 83 ++++++++++++------- .../src/components/rhsChannelBoards.tsx | 2 +- mattermost-plugin/webapp/src/index.tsx | 13 +-- .../src/types/mattermost-webapp/index.d.ts | 2 +- webapp/src/hooks/useGetAllTemplates.ts | 3 +- 7 files changed, 73 insertions(+), 51 deletions(-) diff --git a/mattermost-plugin/server/manifest.go b/mattermost-plugin/server/manifest.go index 112f2f960..b59304865 100644 --- a/mattermost-plugin/server/manifest.go +++ b/mattermost-plugin/server/manifest.go @@ -45,7 +45,8 @@ const manifestStr = ` "type": "bool", "help_text": "This allows board editors to share boards that can be accessed by anyone with the link.", "placeholder": "", - "default": false + "default": false, + "hosting": "" } ] } diff --git a/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx index 283fdcb86..ead4d012d 100644 --- a/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx +++ b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.test.tsx @@ -23,16 +23,16 @@ describe('components/createBoardFromTemplate', () => { it('renders the Create Boards from template component and match snapshot', async () => { const store = mockStateStore([], state) let container: Element | DocumentFragment | null = null - const setSelectedTemplate = jest.fn - const toggleAddBoardCheckbox = jest.fn + const setCanCreate = jest.fn + const setAction = jest.fn const newBoardInfoIcon = () await act(async () => { const result = render(wrapIntl( @@ -45,16 +45,16 @@ describe('components/createBoardFromTemplate', () => { it('clicking checkbox toggles the templates selector', async () => { const store = mockStateStore([], state) - const setSelectedTemplate = jest.fn - const toggleAddBoardCheckbox = jest.fn + const setCanCreate = jest.fn + const setAction = jest.fn const newBoardInfoIcon = () await act(async () => { render(wrapIntl( @@ -74,7 +74,7 @@ describe('components/createBoardFromTemplate', () => { await act(async () => { await userEvent.click(checkbox) const templatesSelector = screen.queryByText('Select a template') - expect(templatesSelector).not.toBeInTheDocument() + expect(templatesSelector).toBeNull() }) }) diff --git a/mattermost-plugin/webapp/src/components/createBoardFromTemplate.tsx b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.tsx index 44a923774..af9c81560 100644 --- a/mattermost-plugin/webapp/src/components/createBoardFromTemplate.tsx +++ b/mattermost-plugin/webapp/src/components/createBoardFromTemplate.tsx @@ -1,6 +1,6 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. -import React, {useState} from 'react' +import React, {useCallback, useEffect, useRef, useState} from 'react' import {createIntl, createIntlCache, IntlProvider} from 'react-intl' @@ -18,10 +18,11 @@ import {mutator} from '../../../../webapp/src/mutator' import {useGetAllTemplates} from '../../../../webapp/src/hooks/useGetAllTemplates' import './createBoardFromTemplate.scss' +import {Board} from '../../../../webapp/src/blocks/board' type Props = { - setSelectedTemplate: (templateId: string) => void; - toggleAddBoardCheck: (addBoard: boolean) => void; + setCanCreate: (canCreate: boolean) => void; + setAction: (fn: () => (channelId: string, teamId: string) => Promise) => void; newBoardInfoIcon: React.ReactNode; } @@ -41,23 +42,6 @@ const intl = createIntl({ messages: getMessages(getCurrentLanguage()) }, cache) -export const createBoardFromTemplateAction = async (templateId: string, teamId: string, channelId: string) => { - const ACTION_DESCRIPTION = 'board created from channel' - const asTemplate = false - - let boardsAndBlocks = undefined - - if (templateId === EMPTY_BOARD) { - boardsAndBlocks = await mutator.addEmptyBoard(teamId, intl) - } else { - boardsAndBlocks = await mutator.duplicateBoard(templateId, ACTION_DESCRIPTION, asTemplate, undefined, undefined, teamId) - } - - const board = boardsAndBlocks.boards[0] - await mutator.updateBoard({...board, channelId: channelId}, board, 'linked channel') - return board -} - const {ValueContainer, Placeholder} = components const CreateBoardFromTemplate = (props: Props) => { @@ -65,14 +49,49 @@ const CreateBoardFromTemplate = (props: Props) => { const [addBoard, setAddBoard] = useState(false) const allTemplates = useGetAllTemplates() + const [selectedBoardTemplateId, setSelectedBoardTemplateId] = useState('') + + const addBoardRef = useRef(false) + addBoardRef.current = addBoard + const templateIdRef = useRef('') + templateIdRef.current = selectedBoardTemplateId + const showNewBoardTemplateSelector = async () => { - setAddBoard((prev: boolean) => { - props.toggleAddBoardCheck(!prev) - return !prev - }) + setAddBoard((prev: boolean) => !prev) } + // CreateBoardFromTemplate + const addBoardToChannel = async (channelId: string, teamId: string) => { + if (!addBoardRef.current || !templateIdRef.current) { + return + } + + const ACTION_DESCRIPTION = 'board created from channel' + const LINKED_CHANNEL = 'linked channel' + const asTemplate = false + + let boardsAndBlocks = undefined + + if (selectedBoardTemplateId === EMPTY_BOARD) { + boardsAndBlocks = await mutator.addEmptyBoard(teamId, intl) + } else { + boardsAndBlocks = await mutator.duplicateBoard(templateIdRef.current as string, ACTION_DESCRIPTION, asTemplate, undefined, undefined, teamId) + } + + const board = boardsAndBlocks.boards[0] + await mutator.updateBoard({...board, channelId: channelId}, board, LINKED_CHANNEL) + return board + } + + useEffect(() => { + props.setAction(() => addBoardToChannel) + }, []) + + useEffect(() => { + props.setCanCreate(!addBoard || (addBoard && selectedBoardTemplateId !== '')) + }, [addBoard, selectedBoardTemplateId]) + const getSubstringWithCompleteWords = (str: string, len: number) => { if (str?.length <= len) { return str @@ -128,7 +147,7 @@ const CreateBoardFromTemplate = (props: Props) => { ) } - const loadOptions = async (value = '') => { + const loadOptions = useCallback(async (value = '') => { let templates = allTemplates.map((template) => { return { id: template.id, @@ -151,7 +170,13 @@ const CreateBoardFromTemplate = (props: Props) => { templates = templates.filter(template => template.title.toLowerCase().includes(value.toLowerCase())) } return templates - } + }, [allTemplates]) + + const onChange = useCallback((item: SingleValue) => { + if (item) { + setSelectedBoardTemplateId(item.id) + } + }, [setSelectedBoardTemplateId]) const selectorStyles = { menu: (baseStyles: CSSObject): CSSObject => ({ @@ -205,11 +230,7 @@ const CreateBoardFromTemplate = (props: Props) => {