diff --git a/Wire.go b/Wire.go index 919b3cd909..9e0dc459ae 100644 --- a/Wire.go +++ b/Wire.go @@ -138,10 +138,11 @@ func InitializeApp() (*App, error) { webhookHelm.WebhookHelmWireSet, terminal.TerminalWireSet, // -------wireset end ---------- - gitSensor.GetGitSensorConfig, - gitSensor.NewGitSensorSession, - wire.Bind(new(gitSensor.GitSensorClient), new(*gitSensor.GitSensorClientImpl)), - //-------- + //------- + gitSensor.GetConfig, + gitSensor.NewGitSensorClient, + wire.Bind(new(gitSensor.Client), new(*gitSensor.ClientImpl)), + //------- helper.NewAppListingRepositoryQueryBuilder, //sql.GetConfig, eClient.GetEventClientConfig, diff --git a/api/restHandler/BulkUpdateRestHandler.go b/api/restHandler/BulkUpdateRestHandler.go index cf52b3bfe8..3c7bd0c794 100644 --- a/api/restHandler/BulkUpdateRestHandler.go +++ b/api/restHandler/BulkUpdateRestHandler.go @@ -55,7 +55,7 @@ type BulkUpdateRestHandlerImpl struct { validator *validator.Validate teamService team.TeamService enforcer casbin.Enforcer - gitSensorClient gitSensor.GitSensorClient + gitSensorClient gitSensor.Client pipelineRepository pipelineConfig.PipelineRepository appWorkflowService appWorkflow.AppWorkflowService enforcerUtil rbac.EnforcerUtil @@ -81,7 +81,7 @@ func NewBulkUpdateRestHandlerImpl(pipelineBuilder pipeline.PipelineBuilder, logg enforcer casbin.Enforcer, ciHandler pipeline.CiHandler, validator *validator.Validate, - gitSensorClient gitSensor.GitSensorClient, + gitSensorClient gitSensor.Client, ciPipelineRepository pipelineConfig.CiPipelineRepository, pipelineRepository pipelineConfig.PipelineRepository, enforcerUtil rbac.EnforcerUtil, envService request.EnvironmentService, gitRegistryConfig pipeline.GitRegistryConfig, dockerRegistryConfig pipeline.DockerRegistryConfig, diff --git a/api/restHandler/GitHostRestHandler.go b/api/restHandler/GitHostRestHandler.go index c7e60cce5f..2cd0627bb2 100644 --- a/api/restHandler/GitHostRestHandler.go +++ b/api/restHandler/GitHostRestHandler.go @@ -18,6 +18,7 @@ package restHandler import ( + "context" "encoding/json" "github.com/devtron-labs/devtron/api/restHandler/common" "github.com/devtron-labs/devtron/client/gitSensor" @@ -47,13 +48,13 @@ type GitHostRestHandlerImpl struct { userAuthService user.UserService validator *validator.Validate enforcer casbin.Enforcer - gitSensorClient gitSensor.GitSensorClient + gitSensorClient gitSensor.Client gitProviderConfig pipeline.GitRegistryConfig } func NewGitHostRestHandlerImpl(logger *zap.SugaredLogger, gitHostConfig pipeline.GitHostConfig, userAuthService user.UserService, - validator *validator.Validate, enforcer casbin.Enforcer, gitSensorClient gitSensor.GitSensorClient, gitProviderConfig pipeline.GitRegistryConfig) *GitHostRestHandlerImpl { + validator *validator.Validate, enforcer casbin.Enforcer, gitSensorClient gitSensor.Client, gitProviderConfig pipeline.GitRegistryConfig) *GitHostRestHandlerImpl { return &GitHostRestHandlerImpl{ logger: logger, gitHostConfig: gitHostConfig, @@ -192,7 +193,7 @@ func (impl GitHostRestHandlerImpl) GetAllWebhookEventConfig(w http.ResponseWrite GitHostId: id, } - res, err := impl.gitSensorClient.GetAllWebhookEventConfigForHost(webhookEventRequest) + res, err := impl.gitSensorClient.GetAllWebhookEventConfigForHost(context.Background(), webhookEventRequest) if err != nil { impl.logger.Errorw("service err, GetAllWebhookEventConfig", "err", err) @@ -226,7 +227,7 @@ func (impl GitHostRestHandlerImpl) GetWebhookEventConfig(w http.ResponseWriter, EventId: eventId, } - res, err := impl.gitSensorClient.GetWebhookEventConfig(webhookEventRequest) + res, err := impl.gitSensorClient.GetWebhookEventConfig(context.Background(), webhookEventRequest) if err != nil { impl.logger.Errorw("service err, GetWebhookEventConfig", "err", err) @@ -276,7 +277,7 @@ func (impl GitHostRestHandlerImpl) GetWebhookDataMetaConfig(w http.ResponseWrite webhookEventRequest := &gitSensor.WebhookEventConfigRequest{ GitHostId: gitHostId, } - webhookEvents, err := impl.gitSensorClient.GetAllWebhookEventConfigForHost(webhookEventRequest) + webhookEvents, err := impl.gitSensorClient.GetAllWebhookEventConfigForHost(context.Background(), webhookEventRequest) if err != nil { impl.logger.Errorw("service err, GetAllWebhookEventConfig", "err", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) diff --git a/api/restHandler/WebhookDataRestHandler.go b/api/restHandler/WebhookDataRestHandler.go index 3359766ad7..794b293ef7 100644 --- a/api/restHandler/WebhookDataRestHandler.go +++ b/api/restHandler/WebhookDataRestHandler.go @@ -18,6 +18,7 @@ package restHandler import ( + "context" "github.com/devtron-labs/devtron/api/restHandler/common" "github.com/devtron-labs/devtron/client/gitSensor" "github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig" @@ -42,20 +43,20 @@ type WebhookDataRestHandlerImpl struct { ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository enforcerUtil rbac.EnforcerUtil enforcer casbin.Enforcer - gitSensorClient gitSensor.GitSensorClient + gitSensorClient gitSensor.Client webhookEventDataConfig pipeline.WebhookEventDataConfig } func NewWebhookDataRestHandlerImpl(logger *zap.SugaredLogger, userAuthService user.UserService, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, enforcerUtil rbac.EnforcerUtil, enforcer casbin.Enforcer, - gitSensorClient gitSensor.GitSensorClient, webhookEventDataConfig pipeline.WebhookEventDataConfig) *WebhookDataRestHandlerImpl { + gitSensorGrpcClient gitSensor.Client, webhookEventDataConfig pipeline.WebhookEventDataConfig) *WebhookDataRestHandlerImpl { return &WebhookDataRestHandlerImpl{ logger: logger, userAuthService: userAuthService, ciPipelineMaterialRepository: ciPipelineMaterialRepository, enforcerUtil: enforcerUtil, enforcer: enforcer, - gitSensorClient: gitSensorClient, + gitSensorClient: gitSensorGrpcClient, webhookEventDataConfig: webhookEventDataConfig, } } @@ -118,7 +119,7 @@ func (impl WebhookDataRestHandlerImpl) GetWebhookPayloadDataForPipelineMaterialI EventTimeSortOrder: eventTimeSortOrder, } - response, err := impl.gitSensorClient.GetWebhookPayloadDataForPipelineMaterialId(webhookPayloadDataRequest) + response, err := impl.gitSensorClient.GetWebhookPayloadDataForPipelineMaterialId(context.Background(), webhookPayloadDataRequest) if err != nil { impl.logger.Errorw("service err, GetWebhookPayloadDataForPipelineMaterialId", "err", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) @@ -175,7 +176,7 @@ func (impl WebhookDataRestHandlerImpl) GetWebhookPayloadFilterDataForPipelineMat ParsedDataId: parsedDataId, } - response, err := impl.gitSensorClient.GetWebhookPayloadFilterDataForPipelineMaterialId(webhookPayloadFilterDataRequest) + response, err := impl.gitSensorClient.GetWebhookPayloadFilterDataForPipelineMaterialId(context.Background(), webhookPayloadFilterDataRequest) if err != nil { impl.logger.Errorw("service err, GetWebhookPayloadFilterDataForPipelineMaterialId", "err", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) @@ -184,7 +185,7 @@ func (impl WebhookDataRestHandlerImpl) GetWebhookPayloadFilterDataForPipelineMat // set payload json if response != nil && response.PayloadId != 0 { - webhookEventData, err := impl.webhookEventDataConfig.GetById(response.PayloadId) + webhookEventData, err := impl.webhookEventDataConfig.GetById(int(response.PayloadId)) if err != nil { impl.logger.Errorw("error in getting webhook payload data", "err", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) diff --git a/api/restHandler/app/BuildPipelineRestHandler.go b/api/restHandler/app/BuildPipelineRestHandler.go index b87b5221de..448f058d8a 100644 --- a/api/restHandler/app/BuildPipelineRestHandler.go +++ b/api/restHandler/app/BuildPipelineRestHandler.go @@ -1212,7 +1212,7 @@ func (handler PipelineConfigRestHandlerImpl) FetchChanges(w http.ResponseWriter, changeRequest := &gitSensor.FetchScmChangesRequest{ PipelineMaterialId: ciMaterialId, } - changes, err := handler.gitSensorClient.FetchChanges(changeRequest) + changes, err := handler.gitSensorClient.FetchChanges(context.Background(), changeRequest) if err != nil { handler.Logger.Errorw("service err, FetchChanges", "err", err, "ciMaterialId", ciMaterialId, "pipelineId", pipelineId) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) @@ -1258,7 +1258,7 @@ func (handler PipelineConfigRestHandlerImpl) GetCommitMetadataForPipelineMateria PipelineMaterialId: ciPipelineMaterialId, GitHash: gitHash, } - commit, err := handler.gitSensorClient.GetCommitMetadataForPipelineMaterial(commitMetadataRequest) + commit, err := handler.gitSensorClient.GetCommitMetadataForPipelineMaterial(context.Background(), commitMetadataRequest) if err != nil { handler.Logger.Errorw("error while fetching commit metadata for pipeline material", "commitMetadataRequest", commitMetadataRequest, "err", err) common.WriteJsonResp(w, err, nil, http.StatusInternalServerError) diff --git a/api/restHandler/app/PipelineConfigRestHandler.go b/api/restHandler/app/PipelineConfigRestHandler.go index 6181c6fe95..38631931da 100644 --- a/api/restHandler/app/PipelineConfigRestHandler.go +++ b/api/restHandler/app/PipelineConfigRestHandler.go @@ -22,6 +22,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/devtron-labs/devtron/client/gitSensor" "github.com/devtron-labs/devtron/api/restHandler/common" "github.com/devtron-labs/devtron/internal/sql/repository/helper" "github.com/devtron-labs/devtron/pkg/chart" @@ -36,7 +37,6 @@ import ( bean2 "github.com/devtron-labs/devtron/api/bean" "github.com/devtron-labs/devtron/client/argocdServer/application" - "github.com/devtron-labs/devtron/client/gitSensor" "github.com/devtron-labs/devtron/internal/sql/repository" "github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig" "github.com/devtron-labs/devtron/internal/sql/repository/security" @@ -104,7 +104,7 @@ type PipelineConfigRestHandlerImpl struct { validator *validator.Validate teamService team.TeamService enforcer casbin.Enforcer - gitSensorClient gitSensor.GitSensorClient + gitSensorClient gitSensor.Client pipelineRepository pipelineConfig.PipelineRepository appWorkflowService appWorkflow.AppWorkflowService enforcerUtil rbac.EnforcerUtil @@ -130,7 +130,7 @@ func NewPipelineRestHandlerImpl(pipelineBuilder pipeline.PipelineBuilder, Logger enforcer casbin.Enforcer, ciHandler pipeline.CiHandler, validator *validator.Validate, - gitSensorClient gitSensor.GitSensorClient, + gitSensorClient gitSensor.Client, ciPipelineRepository pipelineConfig.CiPipelineRepository, pipelineRepository pipelineConfig.PipelineRepository, enforcerUtil rbac.EnforcerUtil, envService request.EnvironmentService, gitRegistryConfig pipeline.GitRegistryConfig, dockerRegistryConfig pipeline.DockerRegistryConfig, diff --git a/client/gitSensor/GitSensorClient.go b/client/gitSensor/GitSensorClient.go index 58fee3ca41..f65980dac8 100644 --- a/client/gitSensor/GitSensorClient.go +++ b/client/gitSensor/GitSensorClient.go @@ -1,415 +1,131 @@ -/* - * Copyright (c) 2020 Devtron Labs - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - package gitSensor import ( - "bytes" - "encoding/json" - "fmt" + "context" + "errors" "github.com/caarlos0/env" - "github.com/devtron-labs/devtron/internal/sql/repository" "go.uber.org/zap" - "io" - "io/ioutil" - "net/http" - "net/url" - "reflect" - "time" ) -// ----------- -type GitSensorResponse struct { - Code int `json:"code,omitempty"` - Status string `json:"status,omitempty"` - Result json.RawMessage `json:"result,omitempty"` - Errors []*GitSensorApiError `json:"errors,omitempty"` -} -type GitSensorApiError struct { - HttpStatusCode int `json:"-"` - Code string `json:"code,omitempty"` - InternalMessage string `json:"internalMessage,omitempty"` - UserMessage string `json:"userMessage,omitempty"` - UserDetailMessage string `json:"userDetailMessage,omitempty"` -} - -// --------------- -type FetchScmChangesRequest struct { - PipelineMaterialId int `json:"pipelineMaterialId"` - From string `json:"from"` - To string `json:"to"` -} -type HeadRequest struct { - MaterialIds []int `json:"materialIds"` -} - -type SourceType string - -type CiPipelineMaterial struct { - Id int - GitMaterialId int - Type SourceType - Value string - Active bool - GitCommit GitCommit - ExtraEnvironmentVariables map[string]string // extra env variables which will be used for CI -} - -type GitMaterial struct { - Id int - GitProviderId int - Url string - Name string - CheckoutLocation string - CheckoutStatus bool - CheckoutMsgAny string - Deleted bool - FetchSubmodules bool -} -type GitProvider struct { - Id int - Name string - Url string - UserName string - Password string - SshPrivateKey string - AccessToken string - Active bool - AuthMode repository.AuthMode -} - -type GitCommit struct { - Commit string //git hash - Author string - Date time.Time - Message string - Changes []string - WebhookData *WebhookData -} - -type WebhookAndCiData struct { - ExtraEnvironmentVariables map[string]string `json:"extraEnvironmentVariables"` // extra env variables which will be used for CI - WebhookData *WebhookData `json:"webhookData"` -} - -type WebhookData struct { - Id int `json:"id"` - EventActionType string `json:"eventActionType"` - Data map[string]string `json:"data"` -} - -type MaterialChangeResp struct { - Commits []*GitCommit `json:"commits"` - LastFetchTime time.Time `json:"lastFetchTime"` - IsRepoError bool `json:"isRepoError"` - RepoErrorMsg string `json:"repoErrorMsg"` - IsBranchError bool `json:"isBranchError"` - BranchErrorMsg string `json:"branchErrorMsg"` -} - -type CommitMetadataRequest struct { - PipelineMaterialId int `json:"pipelineMaterialId"` - GitHash string `json:"gitHash"` - GitTag string `json:"gitTag"` - BranchName string `json:"branchName"` -} - -type RefreshGitMaterialRequest struct { - GitMaterialId int `json:"gitMaterialId"` -} +type Client interface { + SaveGitProvider(ctx context.Context, provider *GitProvider) error + AddRepo(ctx context.Context, materials []*GitMaterial) error + UpdateRepo(ctx context.Context, material *GitMaterial) error + SavePipelineMaterial(ctx context.Context, ciPipelineMaterials []*CiPipelineMaterial) error -type RefreshGitMaterialResponse struct { - Message string `json:"message"` - ErrorMsg string `json:"errorMsg"` - LastFetchTime time.Time `json:"lastFetchTime"` -} - -type WebhookDataRequest struct { - Id int `json:"id"` - CiPipelineMaterialId int `json:"ciPipelineMaterialId"` -} - -type WebhookEventConfigRequest struct { - GitHostId int `json:"gitHostId"` - EventId int `json:"eventId"` -} - -type WebhookEventConfig struct { - Id int `json:"id"` - GitHostId int `json:"gitHostId"` - Name string `json:"name"` - EventTypesCsv string `json:"eventTypesCsv"` - ActionType string `json:"actionType"` - IsActive bool `json:"isActive"` - CreatedOn time.Time `json:"createdOn"` - UpdatedOn time.Time `json:"updatedOn"` - - Selectors []*WebhookEventSelectors `json:"selectors"` -} - -type WebhookEventSelectors struct { - Id int `json:"id"` - EventId int `json:"eventId"` - Name string `json:"name"` - Selector string `json:"selector"` - ToShow bool `json:"toShow"` - ToShowInCiFilter bool `json:"toShowInCiFilter"` - FixValue string `json:"fixValue"` - PossibleValues string `json:"possibleValues"` - IsActive bool `json:"isActive"` - CreatedOn time.Time `json:"createdOn"` - UpdatedOn time.Time `json:"updatedOn"` -} - -type WebhookPayloadDataRequest struct { - CiPipelineMaterialId int `json:"ciPipelineMaterialId"` - Limit int `json:"limit"` - Offset int `json:"offset"` - EventTimeSortOrder string `json:"eventTimeSortOrder"` -} - -type WebhookPayloadDataResponse struct { - Filters map[string]string `json:"filters"` - RepositoryUrl string `json:"repositoryUrl"` - Payloads []*WebhookPayloadDataPayloadsResponse `json:"payloads"` -} + FetchChanges(ctx context.Context, req *FetchScmChangesRequest) (*MaterialChangeResp, error) + GetHeadForPipelineMaterials(ctx context.Context, req *HeadRequest) ([]*CiPipelineMaterial, error) + GetCommitMetadata(ctx context.Context, req *CommitMetadataRequest) (*GitCommit, error) + GetCommitMetadataForPipelineMaterial(ctx context.Context, req *CommitMetadataRequest) (*GitCommit, error) + RefreshGitMaterial(ctx context.Context, req *RefreshGitMaterialRequest) (*RefreshGitMaterialResponse, error) -type WebhookPayloadDataPayloadsResponse struct { - ParsedDataId int `json:"parsedDataId"` - EventTime time.Time `json:"eventTime"` - MatchedFiltersCount int `json:"matchedFiltersCount"` - FailedFiltersCount int `json:"failedFiltersCount"` - MatchedFilters bool `json:"matchedFilters"` + GetWebhookData(ctx context.Context, req *WebhookDataRequest) (*WebhookAndCiData, error) + GetAllWebhookEventConfigForHost(ctx context.Context, req *WebhookEventConfigRequest) ([]*WebhookEventConfig, error) + GetWebhookEventConfig(ctx context.Context, req *WebhookEventConfigRequest) (*WebhookEventConfig, error) + GetWebhookPayloadDataForPipelineMaterialId(ctx context.Context, req *WebhookPayloadDataRequest) (*WebhookPayloadDataResponse, error) + GetWebhookPayloadFilterDataForPipelineMaterialId(ctx context.Context, req *WebhookPayloadFilterDataRequest) (*WebhookPayloadFilterDataResponse, error) } -type WebhookPayloadFilterDataRequest struct { - CiPipelineMaterialId int `json:"ciPipelineMaterialId"` - ParsedDataId int `json:"parsedDataId"` +type ClientImpl struct { + logger *zap.SugaredLogger + config *ClientConfig + apiClient ApiClient } -type WebhookPayloadFilterDataResponse struct { - PayloadId int `json:"payloadId"` - PayloadJson string `json:"payloadJson"` - SelectorsData []*WebhookPayloadFilterDataSelectorResponse `json:"selectorsData"` -} - -type WebhookPayloadFilterDataSelectorResponse struct { - SelectorName string `json:"selectorName"` - SelectorCondition string `json:"selectorCondition"` - SelectorValue string `json:"selectorValue"` - Match bool `json:"match"` -} - -type GitSensorClient interface { - GetHeadForPipelineMaterials(req *HeadRequest) (material []*CiPipelineMaterial, err error) - FetchChanges(changeRequest *FetchScmChangesRequest) (materialChangeResp *MaterialChangeResp, err error) - GetCommitMetadata(commitMetadataRequest *CommitMetadataRequest) (*GitCommit, error) - GetCommitMetadataForPipelineMaterial(commitMetadataRequest *CommitMetadataRequest) (*GitCommit, error) - - SaveGitProvider(provider *GitProvider) (providerRes *GitProvider, err error) - AddRepo(material []*GitMaterial) (materialRes []*GitMaterial, err error) - UpdateRepo(material *GitMaterial) (materialRes *GitMaterial, err error) - SavePipelineMaterial(material []*CiPipelineMaterial) (materialRes []*CiPipelineMaterial, err error) - RefreshGitMaterial(req *RefreshGitMaterialRequest) (refreshRes *RefreshGitMaterialResponse, err error) +func NewGitSensorClient(logger *zap.SugaredLogger, config *ClientConfig) (*ClientImpl, error) { + client := &ClientImpl{ + logger: logger, + config: config, + } - GetWebhookData(req *WebhookDataRequest) (*WebhookAndCiData, error) + var apiClient ApiClient + var err error + if config.Protocol == "REST" { + logger.Infow("using REST api client for git sensor") + apiClient, err = NewGitSensorSession(config, logger) - GetAllWebhookEventConfigForHost(req *WebhookEventConfigRequest) (webhookEvents []*WebhookEventConfig, err error) - GetWebhookEventConfig(req *WebhookEventConfigRequest) (webhookEvent *WebhookEventConfig, err error) - GetWebhookPayloadDataForPipelineMaterialId(req *WebhookPayloadDataRequest) (response *WebhookPayloadDataResponse, err error) - GetWebhookPayloadFilterDataForPipelineMaterialId(req *WebhookPayloadFilterDataRequest) (response *WebhookPayloadFilterDataResponse, err error) -} + } else if config.Protocol == "GRPC" { + logger.Infow("using gRPC api client for git sensor") + apiClient, err = NewGitSensorGrpcClientImpl(logger, config) -// ----------------------impl -type GitSensorConfig struct { - Url string `env:"GIT_SENSOR_URL" envDefault:"http://localhost:9999"` - Timeout int `env:"GIT_SENSOR_TIMEOUT" envDefault:"0"` // in seconds -} - -type GitSensorClientImpl struct { - httpClient *http.Client - logger *zap.SugaredLogger - baseUrl *url.URL -} -type StatusCode int + } else { + err = errors.New("unknown protocol configured for git sensor client") + logger.Errorw(err.Error()) + return nil, err + } -func (code StatusCode) IsSuccess() bool { - return code >= 200 && code <= 299 + if err != nil { + return nil, err + } else { + client.apiClient = apiClient + } + return client, nil } -type ClientRequest struct { - Method string - Path string - RequestBody interface{} - ResponseBody interface{} +type ClientConfig struct { + Url string `env:"GIT_SENSOR_URL" envDefault:"127.0.0.1:7070"` + Protocol string `env:"GIT_SENSOR_PROTOCOL" envDefault:"REST"` + Timeout int `env:"GIT_SENSOR_TIMEOUT" envDefault:"0"` // in seconds } -func GetGitSensorConfig() (*GitSensorConfig, error) { - cfg := &GitSensorConfig{} +func GetConfig() (*ClientConfig, error) { + cfg := &ClientConfig{} err := env.Parse(cfg) return cfg, err } -func (session *GitSensorClientImpl) doRequest(clientRequest *ClientRequest) (resBody []byte, resCode *StatusCode, err error) { - if clientRequest.ResponseBody == nil { - return nil, nil, fmt.Errorf("response body cant be nil") - } - if reflect.ValueOf(clientRequest.ResponseBody).Kind() != reflect.Ptr { - return nil, nil, fmt.Errorf("responsebody non pointer") - } - rel, err := session.baseUrl.Parse(clientRequest.Path) - if err != nil { - return nil, nil, err - } - var body io.Reader - if clientRequest.RequestBody != nil { - if req, err := json.Marshal(clientRequest.RequestBody); err != nil { - return nil, nil, err - } else { - session.logger.Debugw("argo req with body", "body", string(req)) - body = bytes.NewBuffer(req) - } - } - httpReq, err := http.NewRequest(clientRequest.Method, rel.String(), body) - if err != nil { - return nil, nil, err - } - httpRes, err := session.httpClient.Do(httpReq) - if err != nil { - return nil, nil, err - } - defer httpRes.Body.Close() - resBody, err = ioutil.ReadAll(httpRes.Body) - if err != nil { - session.logger.Errorw("error on git sensor request", "err", err) - return nil, nil, err - } - status := StatusCode(httpRes.StatusCode) - if status.IsSuccess() { - apiRes := &GitSensorResponse{} - err = json.Unmarshal(resBody, apiRes) - if apiStatus := StatusCode(apiRes.Code); apiStatus.IsSuccess() { - err = json.Unmarshal(apiRes.Result, clientRequest.ResponseBody) - return resBody, &apiStatus, err - } else { - session.logger.Errorw("api err in git sensor response", "res", apiRes.Errors) - return resBody, &apiStatus, fmt.Errorf("err in git-sensor communication api res") - } - } else { - session.logger.Errorw("api err in git sensor response", "res", string(resBody)) - return resBody, &status, fmt.Errorf("res not success, Statuscode: %d ", status) - } - return resBody, &status, err -} - -func NewGitSensorSession(config *GitSensorConfig, logger *zap.SugaredLogger) (session *GitSensorClientImpl, err error) { - baseUrl, err := url.Parse(config.Url) - if err != nil { - return nil, err - } - client := &http.Client{Timeout: time.Duration(config.Timeout) * time.Second} - return &GitSensorClientImpl{httpClient: client, logger: logger, baseUrl: baseUrl}, nil -} - -func (session GitSensorClientImpl) GetHeadForPipelineMaterials(req *HeadRequest) (material []*CiPipelineMaterial, err error) { - request := &ClientRequest{ResponseBody: &material, Method: "POST", RequestBody: req, Path: "git-head"} - _, _, err = session.doRequest(request) - return material, err +func (c *ClientImpl) SaveGitProvider(ctx context.Context, provider *GitProvider) error { + return c.apiClient.SaveGitProvider(ctx, provider) } -func (session GitSensorClientImpl) FetchChanges(changeRequest *FetchScmChangesRequest) (materialChangeResp *MaterialChangeResp, err error) { - materialChangeResp = new(MaterialChangeResp) - request := &ClientRequest{ResponseBody: materialChangeResp, Method: "POST", RequestBody: changeRequest, Path: "git-changes"} - _, _, err = session.doRequest(request) - return materialChangeResp, err +func (c *ClientImpl) AddRepo(ctx context.Context, materials []*GitMaterial) error { + return c.apiClient.AddRepo(ctx, materials) } -func (session GitSensorClientImpl) SaveGitProvider(provider *GitProvider) (providerRes *GitProvider, err error) { - providerRes = new(GitProvider) - request := &ClientRequest{ResponseBody: providerRes, Method: "POST", RequestBody: provider, Path: "git-provider"} - _, _, err = session.doRequest(request) - return providerRes, err +func (c *ClientImpl) UpdateRepo(ctx context.Context, material *GitMaterial) error { + return c.apiClient.UpdateRepo(ctx, material) } -func (session GitSensorClientImpl) AddRepo(material []*GitMaterial) (materialRes []*GitMaterial, err error) { - request := &ClientRequest{ResponseBody: &materialRes, Method: "POST", RequestBody: material, Path: "git-repo"} - _, _, err = session.doRequest(request) - return materialRes, err +func (c *ClientImpl) SavePipelineMaterial(ctx context.Context, ciPipelineMaterials []*CiPipelineMaterial) error { + return c.apiClient.SavePipelineMaterial(ctx, ciPipelineMaterials) } -func (session GitSensorClientImpl) UpdateRepo(material *GitMaterial) (materialRes *GitMaterial, err error) { - request := &ClientRequest{ResponseBody: &materialRes, Method: "PUT", RequestBody: material, Path: "git-repo"} - _, _, err = session.doRequest(request) - return materialRes, err +func (c *ClientImpl) FetchChanges(ctx context.Context, req *FetchScmChangesRequest) (*MaterialChangeResp, error) { + return c.apiClient.FetchChanges(ctx, req) } -func (session GitSensorClientImpl) SavePipelineMaterial(material []*CiPipelineMaterial) (materialRes []*CiPipelineMaterial, err error) { - request := &ClientRequest{ResponseBody: &materialRes, Method: "POST", RequestBody: &material, Path: "git-pipeline-material"} - _, _, err = session.doRequest(request) - return materialRes, err +func (c *ClientImpl) GetHeadForPipelineMaterials(ctx context.Context, req *HeadRequest) ([]*CiPipelineMaterial, error) { + return c.apiClient.GetHeadForPipelineMaterials(ctx, req) } -func (session GitSensorClientImpl) GetCommitMetadata(commitMetadataRequest *CommitMetadataRequest) (*GitCommit, error) { - commit := new(GitCommit) - request := &ClientRequest{ResponseBody: commit, Method: "POST", RequestBody: commitMetadataRequest, Path: "commit-metadata"} - _, _, err := session.doRequest(request) - return commit, err +func (c *ClientImpl) GetCommitMetadata(ctx context.Context, req *CommitMetadataRequest) (*GitCommit, error) { + return c.apiClient.GetCommitMetadata(ctx, req) } -func (session GitSensorClientImpl) GetCommitMetadataForPipelineMaterial(commitMetadataRequest *CommitMetadataRequest) (commit *GitCommit, err error) { - request := &ClientRequest{ResponseBody: &commit, Method: "GET", RequestBody: commitMetadataRequest, Path: "pipeline-material-commit-metadata"} - _, _, err = session.doRequest(request) - return commit, err +func (c *ClientImpl) GetCommitMetadataForPipelineMaterial(ctx context.Context, req *CommitMetadataRequest) (*GitCommit, error) { + return c.apiClient.GetCommitMetadataForPipelineMaterial(ctx, req) } -func (session GitSensorClientImpl) RefreshGitMaterial(req *RefreshGitMaterialRequest) (refreshRes *RefreshGitMaterialResponse, err error) { - refreshRes = new(RefreshGitMaterialResponse) - request := &ClientRequest{ResponseBody: refreshRes, Method: "POST", RequestBody: req, Path: "git-repo/refresh"} - _, _, err = session.doRequest(request) - return refreshRes, err +func (c *ClientImpl) RefreshGitMaterial(ctx context.Context, req *RefreshGitMaterialRequest) (*RefreshGitMaterialResponse, error) { + return c.apiClient.RefreshGitMaterial(ctx, req) } -func (session GitSensorClientImpl) GetWebhookData(req *WebhookDataRequest) (*WebhookAndCiData, error) { - webhookData := new(WebhookAndCiData) - request := &ClientRequest{ResponseBody: webhookData, Method: "GET", RequestBody: req, Path: "webhook/data"} - _, _, err := session.doRequest(request) - return webhookData, err +func (c *ClientImpl) GetWebhookData(ctx context.Context, req *WebhookDataRequest) (*WebhookAndCiData, error) { + return c.apiClient.GetWebhookData(ctx, req) } -func (session GitSensorClientImpl) GetAllWebhookEventConfigForHost(req *WebhookEventConfigRequest) (webhookEvents []*WebhookEventConfig, err error) { - request := &ClientRequest{ResponseBody: &webhookEvents, Method: "GET", RequestBody: req, Path: "/webhook/host/events"} - _, _, err = session.doRequest(request) - return webhookEvents, err +func (c *ClientImpl) GetAllWebhookEventConfigForHost(ctx context.Context, req *WebhookEventConfigRequest) ([]*WebhookEventConfig, error) { + return c.apiClient.GetAllWebhookEventConfigForHost(ctx, req) } -func (session GitSensorClientImpl) GetWebhookEventConfig(req *WebhookEventConfigRequest) (webhookEvent *WebhookEventConfig, err error) { - request := &ClientRequest{ResponseBody: &webhookEvent, Method: "GET", RequestBody: req, Path: "/webhook/host/event"} - _, _, err = session.doRequest(request) - return webhookEvent, err +func (c *ClientImpl) GetWebhookEventConfig(ctx context.Context, req *WebhookEventConfigRequest) (*WebhookEventConfig, error) { + return c.apiClient.GetWebhookEventConfig(ctx, req) } -func (session GitSensorClientImpl) GetWebhookPayloadDataForPipelineMaterialId(req *WebhookPayloadDataRequest) (response *WebhookPayloadDataResponse, err error) { - request := &ClientRequest{ResponseBody: &response, Method: "GET", RequestBody: req, Path: "/webhook/ci-pipeline-material/payload-data"} - _, _, err = session.doRequest(request) - return response, err +func (c *ClientImpl) GetWebhookPayloadDataForPipelineMaterialId(ctx context.Context, req *WebhookPayloadDataRequest) (*WebhookPayloadDataResponse, error) { + return c.apiClient.GetWebhookPayloadDataForPipelineMaterialId(ctx, req) } -func (session GitSensorClientImpl) GetWebhookPayloadFilterDataForPipelineMaterialId(req *WebhookPayloadFilterDataRequest) (response *WebhookPayloadFilterDataResponse, err error) { - request := &ClientRequest{ResponseBody: &response, Method: "GET", RequestBody: req, Path: "/webhook/ci-pipeline-material/payload-filter-data"} - _, _, err = session.doRequest(request) - return response, err +func (c *ClientImpl) GetWebhookPayloadFilterDataForPipelineMaterialId(ctx context.Context, req *WebhookPayloadFilterDataRequest) (*WebhookPayloadFilterDataResponse, error) { + return c.apiClient.GetWebhookPayloadFilterDataForPipelineMaterialId(ctx, req) } diff --git a/client/gitSensor/GitSensorClient_test.go b/client/gitSensor/GitSensorClient_test.go new file mode 100644 index 0000000000..4be305b152 --- /dev/null +++ b/client/gitSensor/GitSensorClient_test.go @@ -0,0 +1,33 @@ +package gitSensor + +import ( + "github.com/devtron-labs/devtron/internal/util" + "github.com/stretchr/testify/assert" + "testing" +) + +func TestNewGitSensorClientWithValidConfigAndGrpcEnabled(t *testing.T) { + + config := &ClientConfig{ + Url: "127.0.0.1:7070", + Protocol: "GRPC", + } + + logger, err := util.NewSugardLogger() + _, err = NewGitSensorClient(logger, config) + + assert.Nil(t, err) +} + +func TestNewGitSensorClientWithValidConfigAndGrpcDisabled(t *testing.T) { + + config := &ClientConfig{ + Url: "127.0.0.1:7070", + Protocol: "REST", + } + + logger, err := util.NewSugardLogger() + _, err = NewGitSensorClient(logger, config) + + assert.Nil(t, err) +} diff --git a/client/gitSensor/GitSensorGrpcClient.go b/client/gitSensor/GitSensorGrpcClient.go new file mode 100644 index 0000000000..927ddad2e9 --- /dev/null +++ b/client/gitSensor/GitSensorGrpcClient.go @@ -0,0 +1,736 @@ +package gitSensor + +import ( + "context" + "fmt" + pb "github.com/devtron-labs/protos/gitSensor" + grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" + "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" + "go.uber.org/zap" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/protobuf/types/known/timestamppb" + "time" +) + +const ( + ContextTimeoutInSeconds = 10 +) + +type ApiClient interface { + SaveGitProvider(ctx context.Context, provider *GitProvider) error + AddRepo(ctx context.Context, materials []*GitMaterial) error + UpdateRepo(ctx context.Context, material *GitMaterial) error + SavePipelineMaterial(ctx context.Context, ciPipelineMaterials []*CiPipelineMaterial) error + + FetchChanges(ctx context.Context, req *FetchScmChangesRequest) (*MaterialChangeResp, error) + GetHeadForPipelineMaterials(ctx context.Context, req *HeadRequest) ([]*CiPipelineMaterial, error) + GetCommitMetadata(ctx context.Context, req *CommitMetadataRequest) (*GitCommit, error) + GetCommitMetadataForPipelineMaterial(ctx context.Context, req *CommitMetadataRequest) (*GitCommit, error) + RefreshGitMaterial(ctx context.Context, req *RefreshGitMaterialRequest) (*RefreshGitMaterialResponse, error) + + GetWebhookData(ctx context.Context, req *WebhookDataRequest) (*WebhookAndCiData, error) + GetAllWebhookEventConfigForHost(ctx context.Context, req *WebhookEventConfigRequest) ([]*WebhookEventConfig, error) + GetWebhookEventConfig(ctx context.Context, req *WebhookEventConfigRequest) (*WebhookEventConfig, error) + GetWebhookPayloadDataForPipelineMaterialId(ctx context.Context, req *WebhookPayloadDataRequest) (*WebhookPayloadDataResponse, error) + GetWebhookPayloadFilterDataForPipelineMaterialId(ctx context.Context, req *WebhookPayloadFilterDataRequest) (*WebhookPayloadFilterDataResponse, error) +} + +type GrpcApiClientImpl struct { + logger *zap.SugaredLogger + config *ClientConfig + serviceClient pb.GitSensorServiceClient +} + +func NewGitSensorGrpcClientImpl(logger *zap.SugaredLogger, config *ClientConfig) (*GrpcApiClientImpl, error) { + + return &GrpcApiClientImpl{ + logger: logger, + config: config, + }, nil +} + +// getGitSensorServiceClient initializes and returns gRPC GitSensorService client +func (client *GrpcApiClientImpl) getGitSensorServiceClient() (pb.GitSensorServiceClient, error) { + if client.serviceClient == nil { + conn, err := client.getConnection() + if err != nil { + return nil, err + } + client.serviceClient = pb.NewGitSensorServiceClient(conn) + } + return client.serviceClient, nil +} + +// getConnection initializes and returns a grpc client connection +func (client *GrpcApiClientImpl) getConnection() (*grpc.ClientConn, error) { + ctx, cancel := context.WithTimeout(context.Background(), ContextTimeoutInSeconds*time.Second) + defer cancel() + + // Configure gRPC dial options + var opts []grpc.DialOption + opts = append(opts, + grpc.WithChainUnaryInterceptor(grpc_prometheus.UnaryClientInterceptor, otelgrpc.UnaryClientInterceptor()), + grpc.WithBlock(), + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"round_robin"}`), + ) + endpoint := fmt.Sprintf("dns:///%s", client.config.Url) + + // initialize connection + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + client.logger.Errorw("error while initializing grpc connection", + "endpoint", endpoint, + "err", err) + return nil, err + } + return conn, nil +} + +// SaveGitProvider saves Git provider +func (client *GrpcApiClientImpl) SaveGitProvider(ctx context.Context, provider *GitProvider) error { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return err + } + // map req + req := &pb.GitProvider{ + Id: int64(provider.Id), + Name: provider.Name, + Url: provider.Url, + UserName: provider.UserName, + Password: provider.Password, + AccessToken: provider.AccessToken, + SshPrivateKey: provider.SshPrivateKey, + AuthMode: string(provider.AuthMode), + Active: provider.Active, + } + + // fetch + _, err = serviceClient.SaveGitProvider(ctx, req) + return err +} + +// AddRepo adds git materials +func (client *GrpcApiClientImpl) AddRepo(ctx context.Context, materials []*GitMaterial) error { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return err + } + + // Mapping req to proto type + var gitMaterials []*pb.GitMaterial + if materials != nil { + gitMaterials = make([]*pb.GitMaterial, 0, len(materials)) + for _, item := range materials { + + gitMaterials = append(gitMaterials, &pb.GitMaterial{ + Id: int64(item.Id), + GitProviderId: int64(item.GitProviderId), + Url: item.Url, + FetchSubmodules: item.FetchSubmodules, + Name: item.Name, + CheckoutLocation: item.CheckoutLocation, + CheckoutStatus: item.CheckoutStatus, + CheckoutMsgAny: item.CheckoutMsgAny, + Deleted: item.Deleted, + }) + } + } + + _, err = serviceClient.AddRepo(ctx, &pb.AddRepoRequest{ + GitMaterialList: gitMaterials, + }) + return err +} + +// UpdateRepo updates the git material +func (client *GrpcApiClientImpl) UpdateRepo(ctx context.Context, material *GitMaterial) error { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return err + } + + // mapping req + mappedMaterial := &pb.GitMaterial{ + Id: int64(material.Id), + GitProviderId: int64(material.GitProviderId), + Url: material.Url, + FetchSubmodules: material.FetchSubmodules, + Name: material.Name, + CheckoutLocation: material.CheckoutLocation, + CheckoutStatus: material.CheckoutStatus, + CheckoutMsgAny: material.CheckoutMsgAny, + Deleted: material.Deleted, + } + + _, err = serviceClient.UpdateRepo(ctx, mappedMaterial) + return err +} + +// SavePipelineMaterial saves ci pipeline material info +func (client *GrpcApiClientImpl) SavePipelineMaterial(ctx context.Context, ciPipelineMaterials []*CiPipelineMaterial) error { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return err + } + + // Mapping request + var mappedCiPipelineMaterials []*pb.CiPipelineMaterial + if ciPipelineMaterials != nil { + mappedCiPipelineMaterials = make([]*pb.CiPipelineMaterial, 0, len(ciPipelineMaterials)) + for _, item := range ciPipelineMaterials { + + mappedCiPipelineMaterials = append(mappedCiPipelineMaterials, &pb.CiPipelineMaterial{ + Id: int64(item.Id), + GitMaterialId: int64(item.GitMaterialId), + Type: string(item.Type), + Value: item.Value, + Active: item.Active, + }) + } + } + + _, err = serviceClient.SavePipelineMaterial(ctx, &pb.SavePipelineMaterialRequest{ + CiPipelineMaterials: mappedCiPipelineMaterials, + }) + return err +} + +func (client *GrpcApiClientImpl) FetchChanges(ctx context.Context, req *FetchScmChangesRequest) ( + *MaterialChangeResp, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + + res, err := serviceClient.FetchChanges(ctx, &pb.FetchScmChangesRequest{ + PipelineMaterialId: int64(req.PipelineMaterialId), + From: req.From, + To: req.To, + }) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + + // Mapping res + var commits []*GitCommit + if res.Commits != nil { + commits = make([]*GitCommit, 0, len(res.Commits)) + for _, item := range res.Commits { + commit := client.mapGitCommitToLocalType(item) + commits = append(commits, &commit) + } + } + + mappedRes := &MaterialChangeResp{ + Commits: commits, + IsRepoError: res.IsRepoError, + RepoErrorMsg: res.RepoErrorMsg, + IsBranchError: res.IsBranchError, + BranchErrorMsg: res.BranchErrorMsg, + } + if res.LastFetchTime != nil { + mappedRes.LastFetchTime = res.LastFetchTime.AsTime() + } + return mappedRes, nil +} + +func (client *GrpcApiClientImpl) GetHeadForPipelineMaterials(ctx context.Context, req *HeadRequest) ( + []*CiPipelineMaterial, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + + // mapping req + var materialIds []int64 + if req.MaterialIds != nil { + materialIds = make([]int64, 0, len(req.MaterialIds)) + for _, item := range req.MaterialIds { + materialIds = append(materialIds, int64(item)) + } + } + + res, err := serviceClient.GetHeadForPipelineMaterials(ctx, &pb.HeadRequest{MaterialIds: materialIds}) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + + // Mapping res + var materials []*CiPipelineMaterial + if res.Materials != nil { + materials = make([]*CiPipelineMaterial, 0, len(res.Materials)) + for _, item := range res.Materials { + + materials = append(materials, &CiPipelineMaterial{ + Id: int(item.Id), + GitMaterialId: int(item.GitMaterialId), + Type: SourceType(item.Type), + Value: item.Value, + Active: item.Active, + GitCommit: client.mapGitCommitToLocalType(item.GitCommit), + ExtraEnvironmentVariables: item.ExtraEnvironmentVariables, + }) + } + } + return materials, nil +} + +func (client *GrpcApiClientImpl) GetCommitMetadata(ctx context.Context, req *CommitMetadataRequest) ( + *GitCommit, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + + // fetch + res, err := serviceClient.GetCommitMetadata(ctx, &pb.CommitMetadataRequest{ + PipelineMaterialId: int64(req.PipelineMaterialId), + GitHash: req.GitHash, + GitTag: req.GitTag, + BranchName: req.BranchName, + }) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + + // mapping res + commit := client.mapGitCommitToLocalType(res) + return &commit, nil +} + +func (client *GrpcApiClientImpl) GetCommitMetadataForPipelineMaterial(ctx context.Context, req *CommitMetadataRequest) ( + *GitCommit, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + + // fetch + res, err := serviceClient.GetCommitMetadataForPipelineMaterial(ctx, &pb.CommitMetadataRequest{ + PipelineMaterialId: int64(req.PipelineMaterialId), + GitHash: req.GitHash, + GitTag: req.GitTag, + BranchName: req.BranchName, + }) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + + // mapping res + commit := client.mapGitCommitToLocalType(res) + return &commit, nil +} + +func (client *GrpcApiClientImpl) GetCommitInfoForTag(ctx context.Context, req *CommitMetadataRequest) ( + *GitCommit, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + res, err := serviceClient.GetCommitInfoForTag(ctx, &pb.CommitMetadataRequest{ + PipelineMaterialId: int64(req.PipelineMaterialId), + GitHash: req.GitHash, + GitTag: req.GitTag, + BranchName: req.BranchName, + }) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + + // mapping res + commit := client.mapGitCommitToLocalType(res) + return &commit, nil +} + +func (client *GrpcApiClientImpl) RefreshGitMaterial(ctx context.Context, req *RefreshGitMaterialRequest) ( + *RefreshGitMaterialResponse, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + res, err := serviceClient.RefreshGitMaterial(ctx, &pb.RefreshGitMaterialRequest{ + GitMaterialId: int64(req.GitMaterialId), + }) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + + // mapping res + mappedRes := &RefreshGitMaterialResponse{ + Message: res.Message, + ErrorMsg: res.ErrorMsg, + } + if res.LastFetchTime != nil { + mappedRes.LastFetchTime = res.LastFetchTime.AsTime() + } + return mappedRes, nil +} + +func (client *GrpcApiClientImpl) ReloadAllMaterial(ctx context.Context, req *pb.Empty) (*pb.Empty, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + return serviceClient.ReloadAllMaterial(ctx, req) +} + +func (client *GrpcApiClientImpl) ReloadMaterial(ctx context.Context, materialId int64) ( + *pb.GenericResponse, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + return serviceClient.ReloadMaterial(ctx, &pb.ReloadMaterialRequest{ + MaterialId: materialId, + }) +} + +func (client *GrpcApiClientImpl) GetChangesInRelease(ctx context.Context, req *pb.ReleaseChangeRequest) ( + *pb.GitChanges, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + return serviceClient.GetChangesInRelease(ctx, req) +} + +func (client *GrpcApiClientImpl) GetWebhookData(ctx context.Context, req *WebhookDataRequest) ( + *WebhookAndCiData, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + + res, err := serviceClient.GetWebhookData(ctx, &pb.WebhookDataRequest{ + Id: int64(req.Id), + CiPipelineMaterialId: int64(req.CiPipelineMaterialId), + }) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + + // mapping res + mappedRes := &WebhookAndCiData{ + ExtraEnvironmentVariables: res.ExtraEnvironmentVariables, + } + if res.WebhookData != nil { + mappedRes.WebhookData = &WebhookData{ + Id: int(res.WebhookData.Id), + EventActionType: res.WebhookData.EventActionType, + Data: res.WebhookData.Data, + } + } + return mappedRes, nil +} + +func (client *GrpcApiClientImpl) GetAllWebhookEventConfigForHost(ctx context.Context, req *WebhookEventConfigRequest) ( + []*WebhookEventConfig, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + + res, err := serviceClient.GetAllWebhookEventConfigForHost(ctx, &pb.WebhookEventConfigRequest{ + GitHostId: int64(req.GitHostId), + EventId: int64(req.EventId), + }) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + + // mapping res + var mappedRes []*WebhookEventConfig + if res.WebhookEventConfig != nil { + mappedRes = make([]*WebhookEventConfig, 0, len(res.WebhookEventConfig)) + for _, item := range res.WebhookEventConfig { + mappedRes = append(mappedRes, client.mapWebhookEventConfigToLocalType(item)) + } + } + return mappedRes, nil +} + +func (client *GrpcApiClientImpl) GetWebhookEventConfig(ctx context.Context, req *WebhookEventConfigRequest) ( + *WebhookEventConfig, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + res, err := serviceClient.GetWebhookEventConfig(ctx, &pb.WebhookEventConfigRequest{ + GitHostId: int64(req.GitHostId), + EventId: int64(req.EventId), + }) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + return client.mapWebhookEventConfigToLocalType(res), nil +} + +func (client *GrpcApiClientImpl) GetWebhookPayloadDataForPipelineMaterialId(ctx context.Context, + req *WebhookPayloadDataRequest) (*WebhookPayloadDataResponse, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + + res, err := serviceClient.GetWebhookPayloadDataForPipelineMaterialId(ctx, &pb.WebhookPayloadDataRequest{ + CiPipelineMaterialId: int64(req.CiPipelineMaterialId), + Limit: int64(req.Limit), + Offset: int64(req.Offset), + EventTimeSortOrder: req.EventTimeSortOrder, + }) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + + // mapping res + var payloads []*WebhookPayloadDataPayloadsResponse + if res.Payloads != nil { + payloads = make([]*WebhookPayloadDataPayloadsResponse, 0, len(res.Payloads)) + for _, item := range res.Payloads { + + payload := &WebhookPayloadDataPayloadsResponse{ + ParsedDataId: int(item.ParsedDataId), + MatchedFiltersCount: int(item.MatchedFiltersCount), + FailedFiltersCount: int(item.FailedFiltersCount), + MatchedFilters: item.MatchedFilters, + } + if item.EventTime != nil { + payload.EventTime = item.EventTime.AsTime() + } + payloads = append(payloads, payload) + } + } + + return &WebhookPayloadDataResponse{ + Filters: res.Filters, + RepositoryUrl: res.RepositoryUrl, + Payloads: payloads, + }, nil +} + +func (client *GrpcApiClientImpl) GetWebhookPayloadFilterDataForPipelineMaterialId(ctx context.Context, + req *WebhookPayloadFilterDataRequest) (*WebhookPayloadFilterDataResponse, error) { + + serviceClient, err := client.getGitSensorServiceClient() + if err != nil { + return nil, err + } + + res, err := serviceClient.GetWebhookPayloadFilterDataForPipelineMaterialId(ctx, &pb.WebhookPayloadFilterDataRequest{ + CiPipelineMaterialId: int64(req.CiPipelineMaterialId), + ParsedDataId: int64(req.ParsedDataId), + }) + if err != nil { + return nil, err + } + if res == nil { + return nil, nil + } + + // mapping res + var selectors []*WebhookPayloadFilterDataSelectorResponse + if res.SelectorsData != nil { + selectors = make([]*WebhookPayloadFilterDataSelectorResponse, 0, len(res.SelectorsData)) + for _, item := range res.SelectorsData { + + selectors = append(selectors, &WebhookPayloadFilterDataSelectorResponse{ + SelectorName: item.SelectorName, + SelectorCondition: item.SelectorCondition, + SelectorValue: item.SelectorValue, + Match: item.Match, + }) + } + } + + mappedRes := &WebhookPayloadFilterDataResponse{ + PayloadId: int(res.PayloadId), + PayloadJson: res.PayloadJson, + SelectorsData: selectors, + } + return mappedRes, nil +} + +func (client *GrpcApiClientImpl) mapWebhookEventConfigToLocalType(config *pb.WebhookEventConfig) *WebhookEventConfig { + + var selectors []*WebhookEventSelectors + if config.Selectors != nil { + selectors = make([]*WebhookEventSelectors, 0, len(config.Selectors)) + for _, item := range config.Selectors { + + selector := &WebhookEventSelectors{ + Id: int(item.Id), + EventId: int(item.EventId), + Name: item.Name, + ToShow: item.ToShow, + ToShowInCiFilter: item.ToShowInCiFilter, + FixValue: item.FixValue, + PossibleValues: item.PossibleValues, + IsActive: item.IsActive, + } + if item.CreatedOn != nil { + selector.CreatedOn = item.CreatedOn.AsTime() + } + if item.UpdatedOn != nil { + selector.UpdatedOn = item.UpdatedOn.AsTime() + } + selectors = append(selectors, selector) + } + } + + mappedConfig := &WebhookEventConfig{ + Id: int(config.Id), + GitHostId: int(config.GitHostId), + Name: config.Name, + EventTypesCsv: config.EventTypesCsv, + ActionType: config.ActionType, + IsActive: config.IsActive, + Selectors: selectors, + } + if config.CreatedOn != nil { + mappedConfig.CreatedOn = config.CreatedOn.AsTime() + } + if config.UpdatedOn != nil { + mappedConfig.UpdatedOn = config.UpdatedOn.AsTime() + } + return mappedConfig +} + +// mapGitCommitToLocalType maps the protobuf specified GitCommit to local specified golang based struct +func (client *GrpcApiClientImpl) mapGitCommitToLocalType(commit *pb.GitCommit) GitCommit { + + mappedCommit := GitCommit{ + Commit: commit.Commit, + Author: commit.Author, + Message: commit.Message, + Changes: commit.Changes, + } + if commit.Date != nil { + mappedCommit.Date = commit.Date.AsTime() + } + if commit.WebhookData != nil { + mappedCommit.WebhookData = &WebhookData{ + Id: int(commit.WebhookData.Id), + EventActionType: commit.WebhookData.EventActionType, + Data: commit.WebhookData.Data, + } + } + return mappedCommit +} + +func (client *GrpcApiClientImpl) mapWebhookEventConfigToProtoType(config *WebhookEventConfig) *pb.WebhookEventConfig { + + var selectors []*pb.WebhookEventSelectors + if config.Selectors != nil { + selectors = make([]*pb.WebhookEventSelectors, 0, len(config.Selectors)) + for _, item := range config.Selectors { + + selector := &pb.WebhookEventSelectors{ + Id: int64(item.Id), + EventId: int64(item.EventId), + Name: item.Name, + ToShow: item.ToShow, + ToShowInCiFilter: item.ToShowInCiFilter, + FixValue: item.FixValue, + PossibleValues: item.PossibleValues, + IsActive: item.IsActive, + } + if !item.CreatedOn.IsZero() { + selector.CreatedOn = timestamppb.New(item.CreatedOn) + } + if !item.UpdatedOn.IsZero() { + selector.UpdatedOn = timestamppb.New(item.UpdatedOn) + } + selectors = append(selectors, selector) + } + } + + mappedConfig := &pb.WebhookEventConfig{ + Id: int64(config.Id), + GitHostId: int64(config.GitHostId), + Name: config.Name, + EventTypesCsv: config.EventTypesCsv, + ActionType: config.ActionType, + IsActive: config.IsActive, + Selectors: selectors, + } + if !config.CreatedOn.IsZero() { + mappedConfig.CreatedOn = timestamppb.New(config.CreatedOn) + } + if !config.UpdatedOn.IsZero() { + mappedConfig.UpdatedOn = timestamppb.New(config.UpdatedOn) + } + return mappedConfig +} + +func (client *GrpcApiClientImpl) mapGitCommitToProtoType(commit *GitCommit) (*pb.GitCommit, error) { + + // Mapping GitCommit + mappedRes := &pb.GitCommit{ + Commit: commit.Commit, + Author: commit.Author, + Message: commit.Message, + Changes: commit.Changes, + } + + if commit.WebhookData != nil { + mappedRes.WebhookData = &pb.WebhookData{ + Id: int64(commit.WebhookData.Id), + EventActionType: commit.WebhookData.EventActionType, + Data: commit.WebhookData.Data, + } + } + if !commit.Date.IsZero() { + mappedRes.Date = timestamppb.New(commit.Date) + } + return mappedRes, nil +} diff --git a/client/gitSensor/GitSensorRestClient.go b/client/gitSensor/GitSensorRestClient.go new file mode 100644 index 0000000000..e2c3f49c0c --- /dev/null +++ b/client/gitSensor/GitSensorRestClient.go @@ -0,0 +1,399 @@ +/* + * Copyright (c) 2020 Devtron Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package gitSensor + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/devtron-labs/devtron/internal/sql/repository" + "go.uber.org/zap" + "io" + "io/ioutil" + "net/http" + "net/url" + "reflect" + "strings" + "time" +) + +const ( + POST = "POST" + GET = "GET" + PUT = "PUT" +) + +// ----------- +type GitSensorResponse struct { + Code int `json:"code,omitempty"` + Status string `json:"status,omitempty"` + Result json.RawMessage `json:"result,omitempty"` + Errors []*GitSensorApiError `json:"errors,omitempty"` +} +type GitSensorApiError struct { + HttpStatusCode int `json:"-"` + Code string `json:"code,omitempty"` + InternalMessage string `json:"internalMessage,omitempty"` + UserMessage string `json:"userMessage,omitempty"` + UserDetailMessage string `json:"userDetailMessage,omitempty"` +} + +// --------------- +type FetchScmChangesRequest struct { + PipelineMaterialId int `json:"pipelineMaterialId"` + From string `json:"from"` + To string `json:"to"` +} +type HeadRequest struct { + MaterialIds []int `json:"materialIds"` +} + +type SourceType string + +type CiPipelineMaterial struct { + Id int + GitMaterialId int + Type SourceType + Value string + Active bool + GitCommit GitCommit + ExtraEnvironmentVariables map[string]string // extra env variables which will be used for CI +} + +type GitMaterial struct { + Id int + GitProviderId int + Url string + Name string + CheckoutLocation string + CheckoutStatus bool + CheckoutMsgAny string + Deleted bool + FetchSubmodules bool +} +type GitProvider struct { + Id int + Name string + Url string + UserName string + Password string + SshPrivateKey string + AccessToken string + Active bool + AuthMode repository.AuthMode +} + +type GitCommit struct { + Commit string //git hash + Author string + Date time.Time + Message string + Changes []string + WebhookData *WebhookData +} + +type WebhookAndCiData struct { + ExtraEnvironmentVariables map[string]string `json:"extraEnvironmentVariables"` // extra env variables which will be used for CI + WebhookData *WebhookData `json:"webhookData"` +} + +type WebhookData struct { + Id int `json:"id"` + EventActionType string `json:"eventActionType"` + Data map[string]string `json:"data"` +} + +type MaterialChangeResp struct { + Commits []*GitCommit `json:"commits"` + LastFetchTime time.Time `json:"lastFetchTime"` + IsRepoError bool `json:"isRepoError"` + RepoErrorMsg string `json:"repoErrorMsg"` + IsBranchError bool `json:"isBranchError"` + BranchErrorMsg string `json:"branchErrorMsg"` +} + +type CommitMetadataRequest struct { + PipelineMaterialId int `json:"pipelineMaterialId"` + GitHash string `json:"gitHash"` + GitTag string `json:"gitTag"` + BranchName string `json:"branchName"` +} + +type RefreshGitMaterialRequest struct { + GitMaterialId int `json:"gitMaterialId"` +} + +type RefreshGitMaterialResponse struct { + Message string `json:"message"` + ErrorMsg string `json:"errorMsg"` + LastFetchTime time.Time `json:"lastFetchTime"` +} + +type WebhookDataRequest struct { + Id int `json:"id"` + CiPipelineMaterialId int `json:"ciPipelineMaterialId"` +} + +type WebhookEventConfigRequest struct { + GitHostId int `json:"gitHostId"` + EventId int `json:"eventId"` +} + +type WebhookEventConfig struct { + Id int `json:"id"` + GitHostId int `json:"gitHostId"` + Name string `json:"name"` + EventTypesCsv string `json:"eventTypesCsv"` + ActionType string `json:"actionType"` + IsActive bool `json:"isActive"` + CreatedOn time.Time `json:"createdOn"` + UpdatedOn time.Time `json:"updatedOn"` + + Selectors []*WebhookEventSelectors `json:"selectors"` +} + +type WebhookEventSelectors struct { + Id int `json:"id"` + EventId int `json:"eventId"` + Name string `json:"name"` + Selector string `json:"selector"` + ToShow bool `json:"toShow"` + ToShowInCiFilter bool `json:"toShowInCiFilter"` + FixValue string `json:"fixValue"` + PossibleValues string `json:"possibleValues"` + IsActive bool `json:"isActive"` + CreatedOn time.Time `json:"createdOn"` + UpdatedOn time.Time `json:"updatedOn"` +} + +type WebhookPayloadDataRequest struct { + CiPipelineMaterialId int `json:"ciPipelineMaterialId"` + Limit int `json:"limit"` + Offset int `json:"offset"` + EventTimeSortOrder string `json:"eventTimeSortOrder"` +} + +type WebhookPayloadDataResponse struct { + Filters map[string]string `json:"filters"` + RepositoryUrl string `json:"repositoryUrl"` + Payloads []*WebhookPayloadDataPayloadsResponse `json:"payloads"` +} + +type WebhookPayloadDataPayloadsResponse struct { + ParsedDataId int `json:"parsedDataId"` + EventTime time.Time `json:"eventTime"` + MatchedFiltersCount int `json:"matchedFiltersCount"` + FailedFiltersCount int `json:"failedFiltersCount"` + MatchedFilters bool `json:"matchedFilters"` +} + +type WebhookPayloadFilterDataRequest struct { + CiPipelineMaterialId int `json:"ciPipelineMaterialId"` + ParsedDataId int `json:"parsedDataId"` +} + +type WebhookPayloadFilterDataResponse struct { + PayloadId int `json:"payloadId"` + PayloadJson string `json:"payloadJson"` + SelectorsData []*WebhookPayloadFilterDataSelectorResponse `json:"selectorsData"` +} + +type WebhookPayloadFilterDataSelectorResponse struct { + SelectorName string `json:"selectorName"` + SelectorCondition string `json:"selectorCondition"` + SelectorValue string `json:"selectorValue"` + Match bool `json:"match"` +} + +type RestClientImpl struct { + httpClient *http.Client + logger *zap.SugaredLogger + baseUrl *url.URL +} +type StatusCode int + +func (code StatusCode) IsSuccess() bool { + return code >= 200 && code <= 299 +} + +type ClientRequest struct { + Method string + Path string + RequestBody interface{} + ResponseBody interface{} +} + +func (session *RestClientImpl) doRequest(clientRequest *ClientRequest) (resBody []byte, resCode *StatusCode, err error) { + if clientRequest.ResponseBody == nil { + return nil, nil, fmt.Errorf("response body cant be nil") + } + if reflect.ValueOf(clientRequest.ResponseBody).Kind() != reflect.Ptr { + return nil, nil, fmt.Errorf("responsebody non pointer") + } + rel, err := session.baseUrl.Parse(clientRequest.Path) + if err != nil { + return nil, nil, err + } + var body io.Reader + if clientRequest.RequestBody != nil { + if req, err := json.Marshal(clientRequest.RequestBody); err != nil { + return nil, nil, err + } else { + session.logger.Debugw("argo req with body", "body", string(req)) + body = bytes.NewBuffer(req) + } + } + httpReq, err := http.NewRequest(clientRequest.Method, rel.String(), body) + if err != nil { + return nil, nil, err + } + httpRes, err := session.httpClient.Do(httpReq) + if err != nil { + return nil, nil, err + } + defer httpRes.Body.Close() + resBody, err = ioutil.ReadAll(httpRes.Body) + if err != nil { + session.logger.Errorw("error on git sensor request", "err", err) + return nil, nil, err + } + status := StatusCode(httpRes.StatusCode) + if status.IsSuccess() { + apiRes := &GitSensorResponse{} + err = json.Unmarshal(resBody, apiRes) + if apiStatus := StatusCode(apiRes.Code); apiStatus.IsSuccess() { + err = json.Unmarshal(apiRes.Result, clientRequest.ResponseBody) + return resBody, &apiStatus, err + } else { + session.logger.Errorw("api err in git sensor response", "res", apiRes.Errors) + return resBody, &apiStatus, fmt.Errorf("err in git-sensor communication api res") + } + } else { + session.logger.Errorw("api err in git sensor response", "res", string(resBody)) + return resBody, &status, fmt.Errorf("res not success, Statuscode: %d ", status) + } + return resBody, &status, err +} + +func NewGitSensorSession(config *ClientConfig, logger *zap.SugaredLogger) (session *RestClientImpl, err error) { + baseUrl, err := url.Parse(config.Url) + if err != nil { + if !strings.Contains(config.Url, "http") { + // try with appending `http://` + baseUrl, err = url.Parse(fmt.Sprintf("http://%s", config.Url)) + if err != nil { + return nil, err + } + } + } + client := &http.Client{Timeout: time.Duration(config.Timeout) * time.Second} + return &RestClientImpl{httpClient: client, logger: logger, baseUrl: baseUrl}, nil +} + +func (session RestClientImpl) GetHeadForPipelineMaterials(ctx context.Context, req *HeadRequest) (material []*CiPipelineMaterial, err error) { + request := &ClientRequest{ResponseBody: &material, Method: POST, RequestBody: req, Path: "git-head"} + _, _, err = session.doRequest(request) + return material, err +} + +func (session RestClientImpl) FetchChanges(ctx context.Context, changeRequest *FetchScmChangesRequest) (materialChangeResp *MaterialChangeResp, err error) { + materialChangeResp = new(MaterialChangeResp) + request := &ClientRequest{ResponseBody: materialChangeResp, Method: POST, RequestBody: changeRequest, Path: "git-changes"} + _, _, err = session.doRequest(request) + return materialChangeResp, err +} + +func (session RestClientImpl) SaveGitProvider(ctx context.Context, provider *GitProvider) error { + providerRes := new(GitProvider) + request := &ClientRequest{ResponseBody: providerRes, Method: POST, RequestBody: provider, Path: "git-provider"} + _, _, err := session.doRequest(request) + return err +} + +func (session RestClientImpl) AddRepo(ctx context.Context, material []*GitMaterial) error { + materialRes := new([]*GitMaterial) + request := &ClientRequest{ResponseBody: &materialRes, Method: POST, RequestBody: material, Path: "git-repo"} + _, _, err := session.doRequest(request) + return err +} + +func (session RestClientImpl) UpdateRepo(ctx context.Context, material *GitMaterial) error { + materialRes := new(GitMaterial) + request := &ClientRequest{ResponseBody: &materialRes, Method: PUT, RequestBody: material, Path: "git-repo"} + _, _, err := session.doRequest(request) + return err +} + +func (session RestClientImpl) SavePipelineMaterial(ctx context.Context, material []*CiPipelineMaterial) error { + materialRes := new([]*CiPipelineMaterial) + request := &ClientRequest{ResponseBody: &materialRes, Method: POST, RequestBody: &material, Path: "git-pipeline-material"} + _, _, err := session.doRequest(request) + return err +} + +func (session RestClientImpl) GetCommitMetadata(ctx context.Context, commitMetadataRequest *CommitMetadataRequest) (*GitCommit, error) { + commit := new(GitCommit) + request := &ClientRequest{ResponseBody: commit, Method: POST, RequestBody: commitMetadataRequest, Path: "commit-metadata"} + _, _, err := session.doRequest(request) + return commit, err +} + +func (session RestClientImpl) GetCommitMetadataForPipelineMaterial(ctx context.Context, commitMetadataRequest *CommitMetadataRequest) (commit *GitCommit, err error) { + request := &ClientRequest{ResponseBody: &commit, Method: GET, RequestBody: commitMetadataRequest, Path: "pipeline-material-commit-metadata"} + _, _, err = session.doRequest(request) + return commit, err +} + +func (session RestClientImpl) RefreshGitMaterial(ctx context.Context, req *RefreshGitMaterialRequest) (refreshRes *RefreshGitMaterialResponse, err error) { + refreshRes = new(RefreshGitMaterialResponse) + request := &ClientRequest{ResponseBody: refreshRes, Method: POST, RequestBody: req, Path: "git-repo/refresh"} + _, _, err = session.doRequest(request) + return refreshRes, err +} + +func (session RestClientImpl) GetWebhookData(ctx context.Context, req *WebhookDataRequest) (*WebhookAndCiData, error) { + webhookData := new(WebhookAndCiData) + request := &ClientRequest{ResponseBody: webhookData, Method: GET, RequestBody: req, Path: "webhook/data"} + _, _, err := session.doRequest(request) + return webhookData, err +} + +func (session RestClientImpl) GetAllWebhookEventConfigForHost(ctx context.Context, req *WebhookEventConfigRequest) (webhookEvents []*WebhookEventConfig, err error) { + request := &ClientRequest{ResponseBody: &webhookEvents, Method: GET, RequestBody: req, Path: "/webhook/host/events"} + _, _, err = session.doRequest(request) + return webhookEvents, err +} + +func (session RestClientImpl) GetWebhookEventConfig(ctx context.Context, req *WebhookEventConfigRequest) (webhookEvent *WebhookEventConfig, err error) { + request := &ClientRequest{ResponseBody: &webhookEvent, Method: GET, RequestBody: req, Path: "/webhook/host/event"} + _, _, err = session.doRequest(request) + return webhookEvent, err +} + +func (session RestClientImpl) GetWebhookPayloadDataForPipelineMaterialId(ctx context.Context, req *WebhookPayloadDataRequest) (response *WebhookPayloadDataResponse, err error) { + request := &ClientRequest{ResponseBody: &response, Method: GET, RequestBody: req, Path: "/webhook/ci-pipeline-material/payload-data"} + _, _, err = session.doRequest(request) + return response, err +} + +func (session RestClientImpl) GetWebhookPayloadFilterDataForPipelineMaterialId(ctx context.Context, req *WebhookPayloadFilterDataRequest) (response *WebhookPayloadFilterDataResponse, err error) { + request := &ClientRequest{ResponseBody: &response, Method: GET, RequestBody: req, Path: "/webhook/ci-pipeline-material/payload-filter-data"} + _, _, err = session.doRequest(request) + return response, err +} diff --git a/go.mod b/go.mod index 665203d499..0bf20afb1c 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/devtron-labs/authenticator v0.4.31-0.20221213131053-6e4668309f53 github.com/devtron-labs/common-lib v0.0.0-20230407072229-d4f665f5ca12 + github.com/devtron-labs/protos v0.0.0-20230307051313-ecb763b443a8 github.com/evanphx/json-patch v5.6.0+incompatible github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 github.com/go-pg/pg v6.15.1+incompatible diff --git a/go.sum b/go.sum index 91e10a3db3..58df398d4f 100644 --- a/go.sum +++ b/go.sum @@ -284,6 +284,8 @@ github.com/devtron-labs/authenticator v0.4.31-0.20221213131053-6e4668309f53 h1:o github.com/devtron-labs/authenticator v0.4.31-0.20221213131053-6e4668309f53/go.mod h1:ozNfT8WcruiSgnUbyp48WVfc41++W6xYXhKFp67lNTU= github.com/devtron-labs/common-lib v0.0.0-20230407072229-d4f665f5ca12 h1:tcwNgAWTzalItF5XT0WxicRvY4wzz/o0HYLMVLxsxjg= github.com/devtron-labs/common-lib v0.0.0-20230407072229-d4f665f5ca12/go.mod h1:R24nOqgk4buk9zv+BXzORfObZsOe3NE9P55KrZXGX9k= +github.com/devtron-labs/protos v0.0.0-20230307051313-ecb763b443a8 h1:B/mf/ojkLxUsLPnSzY8c5ffFbkU8RS11C1BbtB4jJd0= +github.com/devtron-labs/protos v0.0.0-20230307051313-ecb763b443a8/go.mod h1:l85jxWHlcSo910hdUfRycL40yGzC6glE93V1sVxVPto= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 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= diff --git a/pkg/pipeline/CiCdPipelineOrchestrator.go b/pkg/pipeline/CiCdPipelineOrchestrator.go index 10a221f711..4b98326e28 100644 --- a/pkg/pipeline/CiCdPipelineOrchestrator.go +++ b/pkg/pipeline/CiCdPipelineOrchestrator.go @@ -18,6 +18,7 @@ package pipeline import ( + "context" "crypto/hmac" "crypto/sha256" "encoding/base64" @@ -25,6 +26,7 @@ import ( "encoding/json" "errors" "fmt" + "github.com/devtron-labs/devtron/client/gitSensor" app2 "github.com/devtron-labs/devtron/internal/sql/repository/app" dockerRegistryRepository "github.com/devtron-labs/devtron/internal/sql/repository/dockerRegistry" "github.com/devtron-labs/devtron/internal/sql/repository/helper" @@ -43,7 +45,6 @@ import ( "strings" "time" - "github.com/devtron-labs/devtron/client/gitSensor" "github.com/devtron-labs/devtron/internal/constants" "github.com/devtron-labs/devtron/internal/sql/repository" "github.com/devtron-labs/devtron/internal/sql/repository/appWorkflow" @@ -86,7 +87,7 @@ type CiCdPipelineOrchestratorImpl struct { pipelineRepository pipelineConfig.PipelineRepository ciPipelineRepository pipelineConfig.CiPipelineRepository ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository - GitSensorClient gitSensor.GitSensorClient + GitSensorClient gitSensor.Client ciConfig *CiConfig appWorkflowRepository appWorkflow.AppWorkflowRepository envRepository repository2.EnvironmentRepository @@ -112,7 +113,7 @@ func NewCiCdPipelineOrchestrator( pipelineRepository pipelineConfig.PipelineRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, - GitSensorClient gitSensor.GitSensorClient, ciConfig *CiConfig, + GitSensorClient gitSensor.Client, ciConfig *CiConfig, appWorkflowRepository appWorkflow.AppWorkflowRepository, envRepository repository2.EnvironmentRepository, attributesService attributes.AttributesService, @@ -760,8 +761,7 @@ func (impl CiCdPipelineOrchestratorImpl) AddPipelineMaterialInGitSensor(pipeline } } - _, err := impl.GitSensorClient.SavePipelineMaterial(materials) - return err + return impl.GitSensorClient.SavePipelineMaterial(context.Background(), materials) } func (impl CiCdPipelineOrchestratorImpl) CheckStringMatchRegex(regex string, value string) bool { @@ -956,8 +956,7 @@ func (impl CiCdPipelineOrchestratorImpl) updateRepositoryToGitSensor(material *p Deleted: !material.Active, FetchSubmodules: material.FetchSubmodules, } - _, err := impl.GitSensorClient.UpdateRepo(sensorMaterial) - return err + return impl.GitSensorClient.UpdateRepo(context.Background(), sensorMaterial) } func (impl CiCdPipelineOrchestratorImpl) addRepositoryToGitSensor(materials []*bean.GitMaterial) error { @@ -973,8 +972,7 @@ func (impl CiCdPipelineOrchestratorImpl) addRepositoryToGitSensor(materials []*b } sensorMaterials = append(sensorMaterials, sensorMaterial) } - _, err := impl.GitSensorClient.AddRepo(sensorMaterials) - return err + return impl.GitSensorClient.AddRepo(context.Background(), sensorMaterials) } // FIXME: not thread safe diff --git a/pkg/pipeline/CiHandler.go b/pkg/pipeline/CiHandler.go index e5d49947ac..1f38138e78 100644 --- a/pkg/pipeline/CiHandler.go +++ b/pkg/pipeline/CiHandler.go @@ -20,11 +20,13 @@ package pipeline import ( "archive/zip" "bufio" + "context" "encoding/json" "errors" "fmt" blob_storage "github.com/devtron-labs/common-lib/blob-storage" bean2 "github.com/devtron-labs/devtron/api/bean" + "github.com/devtron-labs/devtron/client/gitSensor" "github.com/devtron-labs/devtron/util/rbac" "io/ioutil" errors2 "k8s.io/apimachinery/pkg/api/errors" @@ -37,7 +39,6 @@ import ( "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1" client "github.com/devtron-labs/devtron/client/events" - "github.com/devtron-labs/devtron/client/gitSensor" "github.com/devtron-labs/devtron/internal/sql/repository" "github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig" "github.com/devtron-labs/devtron/internal/util" @@ -79,7 +80,7 @@ type CiHandlerImpl struct { Logger *zap.SugaredLogger ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository ciService CiService - gitSensorClient gitSensor.GitSensorClient + gitSensorClient gitSensor.Client ciWorkflowRepository pipelineConfig.CiWorkflowRepository workflowService WorkflowService ciLogService CiLogService @@ -96,7 +97,7 @@ type CiHandlerImpl struct { } func NewCiHandlerImpl(Logger *zap.SugaredLogger, ciService CiService, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, - gitSensorClient gitSensor.GitSensorClient, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, workflowService WorkflowService, + gitSensorClient gitSensor.Client, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, workflowService WorkflowService, ciLogService CiLogService, ciConfig *CiConfig, ciArtifactRepository repository.CiArtifactRepository, userService user.UserService, eventClient client.EventClient, eventFactory client.EventFactory, ciPipelineRepository pipelineConfig.CiPipelineRepository, appListingRepository repository.AppListingRepository, K8sUtil *util.K8sUtil, cdPipelineRepository pipelineConfig.PipelineRepository, enforcerUtil rbac.EnforcerUtil) *CiHandlerImpl { @@ -273,7 +274,9 @@ func (impl *CiHandlerImpl) validateBuildSequence(gitCiTriggerRequest bean.GitCiT func (impl *CiHandlerImpl) RefreshMaterialByCiPipelineMaterialId(gitMaterialId int) (refreshRes *gitSensor.RefreshGitMaterialResponse, err error) { impl.Logger.Debugw("refreshing git material", "id", gitMaterialId) - refreshRes, err = impl.gitSensorClient.RefreshGitMaterial(&gitSensor.RefreshGitMaterialRequest{GitMaterialId: gitMaterialId}) + refreshRes, err = impl.gitSensorClient.RefreshGitMaterial(context.Background(), + &gitSensor.RefreshGitMaterialRequest{GitMaterialId: gitMaterialId}, + ) return refreshRes, err } @@ -295,7 +298,7 @@ func (impl *CiHandlerImpl) FetchMaterialsByPipelineId(pipelineId int) ([]CiPipel changesRequest := &gitSensor.FetchScmChangesRequest{ PipelineMaterialId: m.Id, } - changesResp, apiErr := impl.gitSensorClient.FetchChanges(changesRequest) + changesResp, apiErr := impl.gitSensorClient.FetchChanges(context.Background(), changesRequest) impl.Logger.Debugw("commits for material ", "m", m, "commits: ", changesResp) if apiErr != nil { impl.Logger.Warnw("git sensor FetchChanges failed for material", "id", m.Id) @@ -919,7 +922,7 @@ func (impl *CiHandlerImpl) BuildManualTriggerCommitHashesForSourceTypeBranchFix( GitHash: ciPipelineMaterial.GitCommit.Commit, GitTag: ciPipelineMaterial.GitTag, } - gitCommitResponse, err := impl.gitSensorClient.GetCommitMetadataForPipelineMaterial(commitMetadataRequest) + gitCommitResponse, err := impl.gitSensorClient.GetCommitMetadataForPipelineMaterial(context.Background(), commitMetadataRequest) if err != nil { impl.Logger.Errorw("err in fetching commit metadata", "commitMetadataRequest", commitMetadataRequest, "err", err) return bean.GitCommit{}, err @@ -952,7 +955,7 @@ func (impl *CiHandlerImpl) BuildManualTriggerCommitHashesForSourceTypeWebhook(ci CiPipelineMaterialId: ciPipelineMaterial.Id, } - webhookAndCiData, err := impl.gitSensorClient.GetWebhookData(webhookDataRequest) + webhookAndCiData, err := impl.gitSensorClient.GetWebhookData(context.Background(), webhookDataRequest) if err != nil { impl.Logger.Errorw("err", "err", err) return bean.GitCommit{}, nil, err @@ -975,7 +978,7 @@ func (impl *CiHandlerImpl) BuildManualTriggerCommitHashesForSourceTypeWebhook(ci BranchName: targetBranchName, } - latestCommit, err := impl.gitSensorClient.GetCommitMetadata(latestCommitMetadataRequest) + latestCommit, err := impl.gitSensorClient.GetCommitMetadata(context.Background(), latestCommitMetadataRequest) if err != nil { impl.Logger.Errorw("err", "err", err) @@ -994,7 +997,7 @@ func (impl *CiHandlerImpl) BuildManualTriggerCommitHashesForSourceTypeWebhook(ci CiConfigureSourceValue: pipeLineMaterialFromDb.Value, CiConfigureSourceType: pipeLineMaterialFromDb.Type, WebhookData: &bean.WebhookData{ - Id: webhookData.Id, + Id: int(webhookData.Id), EventActionType: webhookData.EventActionType, Data: webhookData.Data, }, @@ -1009,16 +1012,19 @@ func (impl *CiHandlerImpl) getLastSeenCommit(ciMaterialId int) (bean.GitCommit, headReq := &gitSensor.HeadRequest{ MaterialIds: materialIds, } - hashResponse, err := impl.gitSensorClient.GetHeadForPipelineMaterials(headReq) + res, err := impl.gitSensorClient.GetHeadForPipelineMaterials(context.Background(), headReq) if err != nil { return bean.GitCommit{}, err } + if len(res) == 0 { + return bean.GitCommit{}, errors.New("received empty response") + } gitCommit := bean.GitCommit{ - Commit: hashResponse[0].GitCommit.Commit, - Author: hashResponse[0].GitCommit.Author, - Date: hashResponse[0].GitCommit.Date, - Message: hashResponse[0].GitCommit.Message, - Changes: hashResponse[0].GitCommit.Changes, + Commit: res[0].GitCommit.Commit, + Author: res[0].GitCommit.Author, + Date: res[0].GitCommit.Date, + Message: res[0].GitCommit.Message, + Changes: res[0].GitCommit.Changes, } return gitCommit, nil } diff --git a/pkg/pipeline/GitRegistryConfig.go b/pkg/pipeline/GitRegistryConfig.go index 5914111cee..ccea48d7f4 100644 --- a/pkg/pipeline/GitRegistryConfig.go +++ b/pkg/pipeline/GitRegistryConfig.go @@ -18,6 +18,7 @@ package pipeline import ( + "context" "github.com/devtron-labs/devtron/client/gitSensor" "github.com/devtron-labs/devtron/internal/constants" "github.com/devtron-labs/devtron/internal/sql/repository" @@ -39,9 +40,9 @@ type GitRegistryConfig interface { Delete(request *GitRegistry) error } type GitRegistryConfigImpl struct { - logger *zap.SugaredLogger - gitProviderRepo repository.GitProviderRepository - GitSensorClient gitSensor.GitSensorClient + logger *zap.SugaredLogger + gitProviderRepo repository.GitProviderRepository + GitSensorGrpcClient gitSensor.Client } type GitRegistry struct { @@ -59,11 +60,11 @@ type GitRegistry struct { } func NewGitRegistryConfigImpl(logger *zap.SugaredLogger, gitProviderRepo repository.GitProviderRepository, - GitSensorClient gitSensor.GitSensorClient) *GitRegistryConfigImpl { + GitSensorClient gitSensor.Client) *GitRegistryConfigImpl { return &GitRegistryConfigImpl{ - logger: logger, - gitProviderRepo: gitProviderRepo, - GitSensorClient: GitSensorClient, + logger: logger, + gitProviderRepo: gitProviderRepo, + GitSensorGrpcClient: GitSensorClient, } } @@ -314,8 +315,7 @@ func (impl GitRegistryConfigImpl) UpdateGitSensor(provider *repository.GitProvid SshPrivateKey: provider.SshPrivateKey, AuthMode: provider.AuthMode, } - _, err := impl.GitSensorClient.SaveGitProvider(sensorGitProvider) - return err + return impl.GitSensorGrpcClient.SaveGitProvider(context.Background(), sensorGitProvider) } // Modifying Ssh Private Key because Ssh key authentication requires a new-line at the end of string & there are chances that user skips sending \n diff --git a/pkg/pipeline/WorkflowDagExecutor.go b/pkg/pipeline/WorkflowDagExecutor.go index 8336770759..4ac6ee7809 100644 --- a/pkg/pipeline/WorkflowDagExecutor.go +++ b/pkg/pipeline/WorkflowDagExecutor.go @@ -23,7 +23,7 @@ import ( "fmt" "github.com/argoproj/gitops-engine/pkg/health" blob_storage "github.com/devtron-labs/common-lib/blob-storage" - "github.com/devtron-labs/devtron/client/gitSensor" + gitSensorClient "github.com/devtron-labs/devtron/client/gitSensor" util4 "github.com/devtron-labs/devtron/util" "github.com/devtron-labs/devtron/util/argo" "go.opentelemetry.io/otel" @@ -103,7 +103,7 @@ type WorkflowDagExecutorImpl struct { CiTemplateRepository pipelineConfig.CiTemplateRepository ciWorkflowRepository pipelineConfig.CiWorkflowRepository appLabelRepository pipelineConfig.AppLabelRepository - gitSensorClient gitSensor.GitSensorClient + gitSensorGrpcClient gitSensorClient.Client } const ( @@ -168,7 +168,7 @@ func NewWorkflowDagExecutorImpl(Logger *zap.SugaredLogger, pipelineRepository pi pipelineStatusTimelineService app.PipelineStatusTimelineService, CiTemplateRepository pipelineConfig.CiTemplateRepository, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, - appLabelRepository pipelineConfig.AppLabelRepository, gitSensorClient gitSensor.GitSensorClient) *WorkflowDagExecutorImpl { + appLabelRepository pipelineConfig.AppLabelRepository, gitSensorGrpcClient gitSensorClient.Client) *WorkflowDagExecutorImpl { wde := &WorkflowDagExecutorImpl{logger: Logger, pipelineRepository: pipelineRepository, cdWorkflowRepository: cdWorkflowRepository, @@ -199,7 +199,7 @@ func NewWorkflowDagExecutorImpl(Logger *zap.SugaredLogger, pipelineRepository pi CiTemplateRepository: CiTemplateRepository, ciWorkflowRepository: ciWorkflowRepository, appLabelRepository: appLabelRepository, - gitSensorClient: gitSensorClient, + gitSensorGrpcClient: gitSensorGrpcClient, } err := wde.Subscribe() if err != nil { @@ -751,11 +751,11 @@ func (impl *WorkflowDagExecutorImpl) buildWFRequest(runner *pipelineConfig.CdWor if gitTrigger.CiConfigureSourceType == pipelineConfig.SOURCE_TYPE_WEBHOOK { webhookDataId := gitTrigger.WebhookData.Id if webhookDataId > 0 { - webhookDataRequest := &gitSensor.WebhookDataRequest{ + webhookDataRequest := &gitSensorClient.WebhookDataRequest{ Id: webhookDataId, CiPipelineMaterialId: ciPipelineMaterialId, } - webhookAndCiData, err := impl.gitSensorClient.GetWebhookData(webhookDataRequest) + webhookAndCiData, err := impl.gitSensorGrpcClient.GetWebhookData(context.Background(), webhookDataRequest) if err != nil { impl.logger.Errorw("err while getting webhook data from git-sensor", "err", err, "webhookDataRequest", webhookDataRequest) return nil, err diff --git a/vendor/github.com/devtron-labs/protos/LICENSE b/vendor/github.com/devtron-labs/protos/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/vendor/github.com/devtron-labs/protos/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/devtron-labs/protos/gitSensor/service.pb.go b/vendor/github.com/devtron-labs/protos/gitSensor/service.pb.go new file mode 100644 index 0000000000..4a401557a0 --- /dev/null +++ b/vendor/github.com/devtron-labs/protos/gitSensor/service.pb.go @@ -0,0 +1,3848 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: gitSensor/service.proto + +package gitSensor + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AddRepoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GitMaterialList []*GitMaterial `protobuf:"bytes,1,rep,name=gitMaterialList,proto3" json:"gitMaterialList,omitempty"` +} + +func (x *AddRepoRequest) Reset() { + *x = AddRepoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddRepoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddRepoRequest) ProtoMessage() {} + +func (x *AddRepoRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddRepoRequest.ProtoReflect.Descriptor instead. +func (*AddRepoRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{0} +} + +func (x *AddRepoRequest) GetGitMaterialList() []*GitMaterial { + if x != nil { + return x.GitMaterialList + } + return nil +} + +type GitProvider struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + UserName string `protobuf:"bytes,4,opt,name=userName,proto3" json:"userName,omitempty"` + Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` + SshPrivateKey string `protobuf:"bytes,6,opt,name=sshPrivateKey,proto3" json:"sshPrivateKey,omitempty"` + AccessToken string `protobuf:"bytes,7,opt,name=accessToken,proto3" json:"accessToken,omitempty"` + AuthMode string `protobuf:"bytes,8,opt,name=authMode,proto3" json:"authMode,omitempty"` + Active bool `protobuf:"varint,9,opt,name=active,proto3" json:"active,omitempty"` +} + +func (x *GitProvider) Reset() { + *x = GitProvider{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GitProvider) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GitProvider) ProtoMessage() {} + +func (x *GitProvider) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GitProvider.ProtoReflect.Descriptor instead. +func (*GitProvider) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GitProvider) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *GitProvider) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GitProvider) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *GitProvider) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *GitProvider) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *GitProvider) GetSshPrivateKey() string { + if x != nil { + return x.SshPrivateKey + } + return "" +} + +func (x *GitProvider) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *GitProvider) GetAuthMode() string { + if x != nil { + return x.AuthMode + } + return "" +} + +func (x *GitProvider) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +type GitMaterial struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + GitProviderId int64 `protobuf:"varint,2,opt,name=gitProviderId,proto3" json:"gitProviderId,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + FetchSubmodules bool `protobuf:"varint,4,opt,name=fetchSubmodules,proto3" json:"fetchSubmodules,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + CheckoutLocation string `protobuf:"bytes,6,opt,name=checkoutLocation,proto3" json:"checkoutLocation,omitempty"` + CheckoutStatus bool `protobuf:"varint,7,opt,name=checkoutStatus,proto3" json:"checkoutStatus,omitempty"` + CheckoutMsgAny string `protobuf:"bytes,8,opt,name=checkoutMsgAny,proto3" json:"checkoutMsgAny,omitempty"` + Deleted bool `protobuf:"varint,9,opt,name=deleted,proto3" json:"deleted,omitempty"` +} + +func (x *GitMaterial) Reset() { + *x = GitMaterial{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GitMaterial) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GitMaterial) ProtoMessage() {} + +func (x *GitMaterial) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GitMaterial.ProtoReflect.Descriptor instead. +func (*GitMaterial) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{2} +} + +func (x *GitMaterial) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *GitMaterial) GetGitProviderId() int64 { + if x != nil { + return x.GitProviderId + } + return 0 +} + +func (x *GitMaterial) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *GitMaterial) GetFetchSubmodules() bool { + if x != nil { + return x.FetchSubmodules + } + return false +} + +func (x *GitMaterial) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GitMaterial) GetCheckoutLocation() string { + if x != nil { + return x.CheckoutLocation + } + return "" +} + +func (x *GitMaterial) GetCheckoutStatus() bool { + if x != nil { + return x.CheckoutStatus + } + return false +} + +func (x *GitMaterial) GetCheckoutMsgAny() string { + if x != nil { + return x.CheckoutMsgAny + } + return "" +} + +func (x *GitMaterial) GetDeleted() bool { + if x != nil { + return x.Deleted + } + return false +} + +type SavePipelineMaterialRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CiPipelineMaterials []*CiPipelineMaterial `protobuf:"bytes,1,rep,name=ciPipelineMaterials,proto3" json:"ciPipelineMaterials,omitempty"` +} + +func (x *SavePipelineMaterialRequest) Reset() { + *x = SavePipelineMaterialRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SavePipelineMaterialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SavePipelineMaterialRequest) ProtoMessage() {} + +func (x *SavePipelineMaterialRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SavePipelineMaterialRequest.ProtoReflect.Descriptor instead. +func (*SavePipelineMaterialRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{3} +} + +func (x *SavePipelineMaterialRequest) GetCiPipelineMaterials() []*CiPipelineMaterial { + if x != nil { + return x.CiPipelineMaterials + } + return nil +} + +type CiPipelineMaterial struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + GitMaterialId int64 `protobuf:"varint,2,opt,name=gitMaterialId,proto3" json:"gitMaterialId,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + Active bool `protobuf:"varint,5,opt,name=active,proto3" json:"active,omitempty"` + LastSeenHash string `protobuf:"bytes,6,opt,name=lastSeenHash,proto3" json:"lastSeenHash,omitempty"` + CommitAuthor string `protobuf:"bytes,7,opt,name=commitAuthor,proto3" json:"commitAuthor,omitempty"` + CommitDate *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=commitDate,proto3" json:"commitDate,omitempty"` + CommitHistory string `protobuf:"bytes,9,opt,name=commitHistory,proto3" json:"commitHistory,omitempty"` + Errored bool `protobuf:"varint,10,opt,name=errored,proto3" json:"errored,omitempty"` + ErrorMsg string `protobuf:"bytes,11,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` +} + +func (x *CiPipelineMaterial) Reset() { + *x = CiPipelineMaterial{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CiPipelineMaterial) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CiPipelineMaterial) ProtoMessage() {} + +func (x *CiPipelineMaterial) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CiPipelineMaterial.ProtoReflect.Descriptor instead. +func (*CiPipelineMaterial) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CiPipelineMaterial) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *CiPipelineMaterial) GetGitMaterialId() int64 { + if x != nil { + return x.GitMaterialId + } + return 0 +} + +func (x *CiPipelineMaterial) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *CiPipelineMaterial) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *CiPipelineMaterial) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +func (x *CiPipelineMaterial) GetLastSeenHash() string { + if x != nil { + return x.LastSeenHash + } + return "" +} + +func (x *CiPipelineMaterial) GetCommitAuthor() string { + if x != nil { + return x.CommitAuthor + } + return "" +} + +func (x *CiPipelineMaterial) GetCommitDate() *timestamppb.Timestamp { + if x != nil { + return x.CommitDate + } + return nil +} + +func (x *CiPipelineMaterial) GetCommitHistory() string { + if x != nil { + return x.CommitHistory + } + return "" +} + +func (x *CiPipelineMaterial) GetErrored() bool { + if x != nil { + return x.Errored + } + return false +} + +func (x *CiPipelineMaterial) GetErrorMsg() string { + if x != nil { + return x.ErrorMsg + } + return "" +} + +type FetchScmChangesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PipelineMaterialId int64 `protobuf:"varint,1,opt,name=pipelineMaterialId,proto3" json:"pipelineMaterialId,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *FetchScmChangesRequest) Reset() { + *x = FetchScmChangesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchScmChangesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchScmChangesRequest) ProtoMessage() {} + +func (x *FetchScmChangesRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchScmChangesRequest.ProtoReflect.Descriptor instead. +func (*FetchScmChangesRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{5} +} + +func (x *FetchScmChangesRequest) GetPipelineMaterialId() int64 { + if x != nil { + return x.PipelineMaterialId + } + return 0 +} + +func (x *FetchScmChangesRequest) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *FetchScmChangesRequest) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *FetchScmChangesRequest) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +type MaterialChangeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Commits []*GitCommit `protobuf:"bytes,1,rep,name=commits,proto3" json:"commits,omitempty"` + LastFetchTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=lastFetchTime,proto3" json:"lastFetchTime,omitempty"` + IsRepoError bool `protobuf:"varint,3,opt,name=isRepoError,proto3" json:"isRepoError,omitempty"` + RepoErrorMsg string `protobuf:"bytes,4,opt,name=repoErrorMsg,proto3" json:"repoErrorMsg,omitempty"` + IsBranchError bool `protobuf:"varint,5,opt,name=isBranchError,proto3" json:"isBranchError,omitempty"` + BranchErrorMsg string `protobuf:"bytes,6,opt,name=branchErrorMsg,proto3" json:"branchErrorMsg,omitempty"` +} + +func (x *MaterialChangeResponse) Reset() { + *x = MaterialChangeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MaterialChangeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MaterialChangeResponse) ProtoMessage() {} + +func (x *MaterialChangeResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MaterialChangeResponse.ProtoReflect.Descriptor instead. +func (*MaterialChangeResponse) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{6} +} + +func (x *MaterialChangeResponse) GetCommits() []*GitCommit { + if x != nil { + return x.Commits + } + return nil +} + +func (x *MaterialChangeResponse) GetLastFetchTime() *timestamppb.Timestamp { + if x != nil { + return x.LastFetchTime + } + return nil +} + +func (x *MaterialChangeResponse) GetIsRepoError() bool { + if x != nil { + return x.IsRepoError + } + return false +} + +func (x *MaterialChangeResponse) GetRepoErrorMsg() string { + if x != nil { + return x.RepoErrorMsg + } + return "" +} + +func (x *MaterialChangeResponse) GetIsBranchError() bool { + if x != nil { + return x.IsBranchError + } + return false +} + +func (x *MaterialChangeResponse) GetBranchErrorMsg() string { + if x != nil { + return x.BranchErrorMsg + } + return "" +} + +type GitCommit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Commit string `protobuf:"bytes,1,opt,name=Commit,proto3" json:"Commit,omitempty"` + Author string `protobuf:"bytes,2,opt,name=Author,proto3" json:"Author,omitempty"` + Date *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Date,proto3" json:"Date,omitempty"` + Message string `protobuf:"bytes,4,opt,name=Message,proto3" json:"Message,omitempty"` + Changes []string `protobuf:"bytes,5,rep,name=Changes,proto3" json:"Changes,omitempty"` + FileStats []*FileStat `protobuf:"bytes,6,rep,name=FileStats,proto3" json:"FileStats,omitempty"` + WebhookData *WebhookData `protobuf:"bytes,7,opt,name=WebhookData,proto3" json:"WebhookData,omitempty"` +} + +func (x *GitCommit) Reset() { + *x = GitCommit{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GitCommit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GitCommit) ProtoMessage() {} + +func (x *GitCommit) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GitCommit.ProtoReflect.Descriptor instead. +func (*GitCommit) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{7} +} + +func (x *GitCommit) GetCommit() string { + if x != nil { + return x.Commit + } + return "" +} + +func (x *GitCommit) GetAuthor() string { + if x != nil { + return x.Author + } + return "" +} + +func (x *GitCommit) GetDate() *timestamppb.Timestamp { + if x != nil { + return x.Date + } + return nil +} + +func (x *GitCommit) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *GitCommit) GetChanges() []string { + if x != nil { + return x.Changes + } + return nil +} + +func (x *GitCommit) GetFileStats() []*FileStat { + if x != nil { + return x.FileStats + } + return nil +} + +func (x *GitCommit) GetWebhookData() *WebhookData { + if x != nil { + return x.WebhookData + } + return nil +} + +type FileStat struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Addition int64 `protobuf:"varint,2,opt,name=Addition,proto3" json:"Addition,omitempty"` + Deletion int64 `protobuf:"varint,3,opt,name=Deletion,proto3" json:"Deletion,omitempty"` +} + +func (x *FileStat) Reset() { + *x = FileStat{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileStat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileStat) ProtoMessage() {} + +func (x *FileStat) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileStat.ProtoReflect.Descriptor instead. +func (*FileStat) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{8} +} + +func (x *FileStat) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FileStat) GetAddition() int64 { + if x != nil { + return x.Addition + } + return 0 +} + +func (x *FileStat) GetDeletion() int64 { + if x != nil { + return x.Deletion + } + return 0 +} + +type WebhookData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + EventActionType string `protobuf:"bytes,2,opt,name=eventActionType,proto3" json:"eventActionType,omitempty"` + Data map[string]string `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *WebhookData) Reset() { + *x = WebhookData{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookData) ProtoMessage() {} + +func (x *WebhookData) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookData.ProtoReflect.Descriptor instead. +func (*WebhookData) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{9} +} + +func (x *WebhookData) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *WebhookData) GetEventActionType() string { + if x != nil { + return x.EventActionType + } + return "" +} + +func (x *WebhookData) GetData() map[string]string { + if x != nil { + return x.Data + } + return nil +} + +type HeadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MaterialIds []int64 `protobuf:"varint,1,rep,packed,name=materialIds,proto3" json:"materialIds,omitempty"` +} + +func (x *HeadRequest) Reset() { + *x = HeadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeadRequest) ProtoMessage() {} + +func (x *HeadRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeadRequest.ProtoReflect.Descriptor instead. +func (*HeadRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{10} +} + +func (x *HeadRequest) GetMaterialIds() []int64 { + if x != nil { + return x.MaterialIds + } + return nil +} + +type GetHeadForPipelineMaterialsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Materials []*CiPipelineMaterialBean `protobuf:"bytes,1,rep,name=materials,proto3" json:"materials,omitempty"` +} + +func (x *GetHeadForPipelineMaterialsResponse) Reset() { + *x = GetHeadForPipelineMaterialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetHeadForPipelineMaterialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetHeadForPipelineMaterialsResponse) ProtoMessage() {} + +func (x *GetHeadForPipelineMaterialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetHeadForPipelineMaterialsResponse.ProtoReflect.Descriptor instead. +func (*GetHeadForPipelineMaterialsResponse) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{11} +} + +func (x *GetHeadForPipelineMaterialsResponse) GetMaterials() []*CiPipelineMaterialBean { + if x != nil { + return x.Materials + } + return nil +} + +type CiPipelineMaterialBean struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` + GitMaterialId int64 `protobuf:"varint,2,opt,name=GitMaterialId,proto3" json:"GitMaterialId,omitempty"` + Type string `protobuf:"bytes,3,opt,name=Type,proto3" json:"Type,omitempty"` + Value string `protobuf:"bytes,4,opt,name=Value,proto3" json:"Value,omitempty"` + Active bool `protobuf:"varint,5,opt,name=Active,proto3" json:"Active,omitempty"` + GitCommit *GitCommit `protobuf:"bytes,6,opt,name=GitCommit,proto3" json:"GitCommit,omitempty"` + ExtraEnvironmentVariables map[string]string `protobuf:"bytes,7,rep,name=ExtraEnvironmentVariables,proto3" json:"ExtraEnvironmentVariables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *CiPipelineMaterialBean) Reset() { + *x = CiPipelineMaterialBean{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CiPipelineMaterialBean) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CiPipelineMaterialBean) ProtoMessage() {} + +func (x *CiPipelineMaterialBean) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CiPipelineMaterialBean.ProtoReflect.Descriptor instead. +func (*CiPipelineMaterialBean) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{12} +} + +func (x *CiPipelineMaterialBean) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *CiPipelineMaterialBean) GetGitMaterialId() int64 { + if x != nil { + return x.GitMaterialId + } + return 0 +} + +func (x *CiPipelineMaterialBean) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *CiPipelineMaterialBean) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *CiPipelineMaterialBean) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +func (x *CiPipelineMaterialBean) GetGitCommit() *GitCommit { + if x != nil { + return x.GitCommit + } + return nil +} + +func (x *CiPipelineMaterialBean) GetExtraEnvironmentVariables() map[string]string { + if x != nil { + return x.ExtraEnvironmentVariables + } + return nil +} + +type CommitMetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PipelineMaterialId int64 `protobuf:"varint,1,opt,name=pipelineMaterialId,proto3" json:"pipelineMaterialId,omitempty"` + GitHash string `protobuf:"bytes,2,opt,name=gitHash,proto3" json:"gitHash,omitempty"` + GitTag string `protobuf:"bytes,3,opt,name=gitTag,proto3" json:"gitTag,omitempty"` + BranchName string `protobuf:"bytes,4,opt,name=branchName,proto3" json:"branchName,omitempty"` +} + +func (x *CommitMetadataRequest) Reset() { + *x = CommitMetadataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommitMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommitMetadataRequest) ProtoMessage() {} + +func (x *CommitMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommitMetadataRequest.ProtoReflect.Descriptor instead. +func (*CommitMetadataRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{13} +} + +func (x *CommitMetadataRequest) GetPipelineMaterialId() int64 { + if x != nil { + return x.PipelineMaterialId + } + return 0 +} + +func (x *CommitMetadataRequest) GetGitHash() string { + if x != nil { + return x.GitHash + } + return "" +} + +func (x *CommitMetadataRequest) GetGitTag() string { + if x != nil { + return x.GitTag + } + return "" +} + +func (x *CommitMetadataRequest) GetBranchName() string { + if x != nil { + return x.BranchName + } + return "" +} + +type RefreshGitMaterialRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GitMaterialId int64 `protobuf:"varint,1,opt,name=gitMaterialId,proto3" json:"gitMaterialId,omitempty"` +} + +func (x *RefreshGitMaterialRequest) Reset() { + *x = RefreshGitMaterialRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefreshGitMaterialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshGitMaterialRequest) ProtoMessage() {} + +func (x *RefreshGitMaterialRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshGitMaterialRequest.ProtoReflect.Descriptor instead. +func (*RefreshGitMaterialRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{14} +} + +func (x *RefreshGitMaterialRequest) GetGitMaterialId() int64 { + if x != nil { + return x.GitMaterialId + } + return 0 +} + +type RefreshGitMaterialResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + LastFetchTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lastFetchTime,proto3" json:"lastFetchTime,omitempty"` +} + +func (x *RefreshGitMaterialResponse) Reset() { + *x = RefreshGitMaterialResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefreshGitMaterialResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefreshGitMaterialResponse) ProtoMessage() {} + +func (x *RefreshGitMaterialResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefreshGitMaterialResponse.ProtoReflect.Descriptor instead. +func (*RefreshGitMaterialResponse) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{15} +} + +func (x *RefreshGitMaterialResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *RefreshGitMaterialResponse) GetErrorMsg() string { + if x != nil { + return x.ErrorMsg + } + return "" +} + +func (x *RefreshGitMaterialResponse) GetLastFetchTime() *timestamppb.Timestamp { + if x != nil { + return x.LastFetchTime + } + return nil +} + +type ReloadMaterialRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MaterialId int64 `protobuf:"varint,1,opt,name=materialId,proto3" json:"materialId,omitempty"` +} + +func (x *ReloadMaterialRequest) Reset() { + *x = ReloadMaterialRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReloadMaterialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReloadMaterialRequest) ProtoMessage() {} + +func (x *ReloadMaterialRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReloadMaterialRequest.ProtoReflect.Descriptor instead. +func (*ReloadMaterialRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{16} +} + +func (x *ReloadMaterialRequest) GetMaterialId() int64 { + if x != nil { + return x.MaterialId + } + return 0 +} + +type GenericResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *GenericResponse) Reset() { + *x = GenericResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenericResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenericResponse) ProtoMessage() {} + +func (x *GenericResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenericResponse.ProtoReflect.Descriptor instead. +func (*GenericResponse) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{17} +} + +func (x *GenericResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type Empty struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Empty) Reset() { + *x = Empty{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Empty) ProtoMessage() {} + +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{18} +} + +type ReleaseChangeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PipelineMaterialId int64 `protobuf:"varint,1,opt,name=pipelineMaterialId,proto3" json:"pipelineMaterialId,omitempty"` + OldCommit string `protobuf:"bytes,2,opt,name=oldCommit,proto3" json:"oldCommit,omitempty"` + NewCommit string `protobuf:"bytes,3,opt,name=newCommit,proto3" json:"newCommit,omitempty"` +} + +func (x *ReleaseChangeRequest) Reset() { + *x = ReleaseChangeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReleaseChangeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReleaseChangeRequest) ProtoMessage() {} + +func (x *ReleaseChangeRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReleaseChangeRequest.ProtoReflect.Descriptor instead. +func (*ReleaseChangeRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{19} +} + +func (x *ReleaseChangeRequest) GetPipelineMaterialId() int64 { + if x != nil { + return x.PipelineMaterialId + } + return 0 +} + +func (x *ReleaseChangeRequest) GetOldCommit() string { + if x != nil { + return x.OldCommit + } + return "" +} + +func (x *ReleaseChangeRequest) GetNewCommit() string { + if x != nil { + return x.NewCommit + } + return "" +} + +type Hash struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Long string `protobuf:"bytes,1,opt,name=Long,proto3" json:"Long,omitempty"` + Short string `protobuf:"bytes,2,opt,name=Short,proto3" json:"Short,omitempty"` +} + +func (x *Hash) Reset() { + *x = Hash{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Hash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hash) ProtoMessage() {} + +func (x *Hash) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hash.ProtoReflect.Descriptor instead. +func (*Hash) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{20} +} + +func (x *Hash) GetLong() string { + if x != nil { + return x.Long + } + return "" +} + +func (x *Hash) GetShort() string { + if x != nil { + return x.Short + } + return "" +} + +type Tree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Long string `protobuf:"bytes,1,opt,name=Long,proto3" json:"Long,omitempty"` + Short string `protobuf:"bytes,2,opt,name=Short,proto3" json:"Short,omitempty"` +} + +func (x *Tree) Reset() { + *x = Tree{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tree) ProtoMessage() {} + +func (x *Tree) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tree.ProtoReflect.Descriptor instead. +func (*Tree) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{21} +} + +func (x *Tree) GetLong() string { + if x != nil { + return x.Long + } + return "" +} + +func (x *Tree) GetShort() string { + if x != nil { + return x.Short + } + return "" +} + +type Author struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Email string `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"` + Date *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Date,proto3" json:"Date,omitempty"` +} + +func (x *Author) Reset() { + *x = Author{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Author) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Author) ProtoMessage() {} + +func (x *Author) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Author.ProtoReflect.Descriptor instead. +func (*Author) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{22} +} + +func (x *Author) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Author) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *Author) GetDate() *timestamppb.Timestamp { + if x != nil { + return x.Date + } + return nil +} + +type Committer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Email string `protobuf:"bytes,2,opt,name=Email,proto3" json:"Email,omitempty"` + Date *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=Date,proto3" json:"Date,omitempty"` +} + +func (x *Committer) Reset() { + *x = Committer{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Committer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Committer) ProtoMessage() {} + +func (x *Committer) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Committer.ProtoReflect.Descriptor instead. +func (*Committer) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{23} +} + +func (x *Committer) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Committer) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *Committer) GetDate() *timestamppb.Timestamp { + if x != nil { + return x.Date + } + return nil +} + +type Tag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` + Date *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=Date,proto3" json:"Date,omitempty"` +} + +func (x *Tag) Reset() { + *x = Tag{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tag) ProtoMessage() {} + +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tag.ProtoReflect.Descriptor instead. +func (*Tag) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{24} +} + +func (x *Tag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Tag) GetDate() *timestamppb.Timestamp { + if x != nil { + return x.Date + } + return nil +} + +type Commit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hash *Hash `protobuf:"bytes,1,opt,name=Hash,proto3" json:"Hash,omitempty"` + Tree *Tree `protobuf:"bytes,2,opt,name=Tree,proto3" json:"Tree,omitempty"` + Author *Author `protobuf:"bytes,3,opt,name=Author,proto3" json:"Author,omitempty"` + Committer *Committer `protobuf:"bytes,4,opt,name=Committer,proto3" json:"Committer,omitempty"` + Tag *Tag `protobuf:"bytes,5,opt,name=Tag,proto3" json:"Tag,omitempty"` + Subject string `protobuf:"bytes,6,opt,name=Subject,proto3" json:"Subject,omitempty"` + Body string `protobuf:"bytes,7,opt,name=Body,proto3" json:"Body,omitempty"` +} + +func (x *Commit) Reset() { + *x = Commit{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Commit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Commit) ProtoMessage() {} + +func (x *Commit) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Commit.ProtoReflect.Descriptor instead. +func (*Commit) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{25} +} + +func (x *Commit) GetHash() *Hash { + if x != nil { + return x.Hash + } + return nil +} + +func (x *Commit) GetTree() *Tree { + if x != nil { + return x.Tree + } + return nil +} + +func (x *Commit) GetAuthor() *Author { + if x != nil { + return x.Author + } + return nil +} + +func (x *Commit) GetCommitter() *Committer { + if x != nil { + return x.Committer + } + return nil +} + +func (x *Commit) GetTag() *Tag { + if x != nil { + return x.Tag + } + return nil +} + +func (x *Commit) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *Commit) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +type GitChanges struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Commits []*Commit `protobuf:"bytes,1,rep,name=Commits,proto3" json:"Commits,omitempty"` + FileStats []*FileStat `protobuf:"bytes,2,rep,name=FileStats,proto3" json:"FileStats,omitempty"` +} + +func (x *GitChanges) Reset() { + *x = GitChanges{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GitChanges) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GitChanges) ProtoMessage() {} + +func (x *GitChanges) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GitChanges.ProtoReflect.Descriptor instead. +func (*GitChanges) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{26} +} + +func (x *GitChanges) GetCommits() []*Commit { + if x != nil { + return x.Commits + } + return nil +} + +func (x *GitChanges) GetFileStats() []*FileStat { + if x != nil { + return x.FileStats + } + return nil +} + +type WebhookDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + CiPipelineMaterialId int64 `protobuf:"varint,2,opt,name=ciPipelineMaterialId,proto3" json:"ciPipelineMaterialId,omitempty"` +} + +func (x *WebhookDataRequest) Reset() { + *x = WebhookDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookDataRequest) ProtoMessage() {} + +func (x *WebhookDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookDataRequest.ProtoReflect.Descriptor instead. +func (*WebhookDataRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{27} +} + +func (x *WebhookDataRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *WebhookDataRequest) GetCiPipelineMaterialId() int64 { + if x != nil { + return x.CiPipelineMaterialId + } + return 0 +} + +type WebhookAndCiData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExtraEnvironmentVariables map[string]string `protobuf:"bytes,1,rep,name=extraEnvironmentVariables,proto3" json:"extraEnvironmentVariables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + WebhookData *WebhookData `protobuf:"bytes,2,opt,name=webhookData,proto3" json:"webhookData,omitempty"` +} + +func (x *WebhookAndCiData) Reset() { + *x = WebhookAndCiData{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookAndCiData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookAndCiData) ProtoMessage() {} + +func (x *WebhookAndCiData) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookAndCiData.ProtoReflect.Descriptor instead. +func (*WebhookAndCiData) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{28} +} + +func (x *WebhookAndCiData) GetExtraEnvironmentVariables() map[string]string { + if x != nil { + return x.ExtraEnvironmentVariables + } + return nil +} + +func (x *WebhookAndCiData) GetWebhookData() *WebhookData { + if x != nil { + return x.WebhookData + } + return nil +} + +type WebhookEventConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GitHostId int64 `protobuf:"varint,1,opt,name=gitHostId,proto3" json:"gitHostId,omitempty"` + EventId int64 `protobuf:"varint,2,opt,name=eventId,proto3" json:"eventId,omitempty"` +} + +func (x *WebhookEventConfigRequest) Reset() { + *x = WebhookEventConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookEventConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookEventConfigRequest) ProtoMessage() {} + +func (x *WebhookEventConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookEventConfigRequest.ProtoReflect.Descriptor instead. +func (*WebhookEventConfigRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{29} +} + +func (x *WebhookEventConfigRequest) GetGitHostId() int64 { + if x != nil { + return x.GitHostId + } + return 0 +} + +func (x *WebhookEventConfigRequest) GetEventId() int64 { + if x != nil { + return x.EventId + } + return 0 +} + +type WebhookEventSelectors struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + EventId int64 `protobuf:"varint,2,opt,name=eventId,proto3" json:"eventId,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + ToShow bool `protobuf:"varint,4,opt,name=toShow,proto3" json:"toShow,omitempty"` + ToShowInCiFilter bool `protobuf:"varint,5,opt,name=toShowInCiFilter,proto3" json:"toShowInCiFilter,omitempty"` + FixValue string `protobuf:"bytes,6,opt,name=fixValue,proto3" json:"fixValue,omitempty"` + PossibleValues string `protobuf:"bytes,7,opt,name=possibleValues,proto3" json:"possibleValues,omitempty"` + IsActive bool `protobuf:"varint,8,opt,name=isActive,proto3" json:"isActive,omitempty"` + CreatedOn *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=createdOn,proto3" json:"createdOn,omitempty"` + UpdatedOn *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updatedOn,proto3" json:"updatedOn,omitempty"` +} + +func (x *WebhookEventSelectors) Reset() { + *x = WebhookEventSelectors{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookEventSelectors) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookEventSelectors) ProtoMessage() {} + +func (x *WebhookEventSelectors) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookEventSelectors.ProtoReflect.Descriptor instead. +func (*WebhookEventSelectors) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{30} +} + +func (x *WebhookEventSelectors) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *WebhookEventSelectors) GetEventId() int64 { + if x != nil { + return x.EventId + } + return 0 +} + +func (x *WebhookEventSelectors) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WebhookEventSelectors) GetToShow() bool { + if x != nil { + return x.ToShow + } + return false +} + +func (x *WebhookEventSelectors) GetToShowInCiFilter() bool { + if x != nil { + return x.ToShowInCiFilter + } + return false +} + +func (x *WebhookEventSelectors) GetFixValue() string { + if x != nil { + return x.FixValue + } + return "" +} + +func (x *WebhookEventSelectors) GetPossibleValues() string { + if x != nil { + return x.PossibleValues + } + return "" +} + +func (x *WebhookEventSelectors) GetIsActive() bool { + if x != nil { + return x.IsActive + } + return false +} + +func (x *WebhookEventSelectors) GetCreatedOn() *timestamppb.Timestamp { + if x != nil { + return x.CreatedOn + } + return nil +} + +func (x *WebhookEventSelectors) GetUpdatedOn() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedOn + } + return nil +} + +type WebhookEventConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + GitHostId int64 `protobuf:"varint,2,opt,name=gitHostId,proto3" json:"gitHostId,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + EventTypesCsv string `protobuf:"bytes,4,opt,name=eventTypesCsv,proto3" json:"eventTypesCsv,omitempty"` + ActionType string `protobuf:"bytes,5,opt,name=actionType,proto3" json:"actionType,omitempty"` + IsActive bool `protobuf:"varint,6,opt,name=isActive,proto3" json:"isActive,omitempty"` + CreatedOn *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=createdOn,proto3" json:"createdOn,omitempty"` + UpdatedOn *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updatedOn,proto3" json:"updatedOn,omitempty"` + Selectors []*WebhookEventSelectors `protobuf:"bytes,9,rep,name=selectors,proto3" json:"selectors,omitempty"` +} + +func (x *WebhookEventConfig) Reset() { + *x = WebhookEventConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookEventConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookEventConfig) ProtoMessage() {} + +func (x *WebhookEventConfig) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookEventConfig.ProtoReflect.Descriptor instead. +func (*WebhookEventConfig) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{31} +} + +func (x *WebhookEventConfig) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *WebhookEventConfig) GetGitHostId() int64 { + if x != nil { + return x.GitHostId + } + return 0 +} + +func (x *WebhookEventConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WebhookEventConfig) GetEventTypesCsv() string { + if x != nil { + return x.EventTypesCsv + } + return "" +} + +func (x *WebhookEventConfig) GetActionType() string { + if x != nil { + return x.ActionType + } + return "" +} + +func (x *WebhookEventConfig) GetIsActive() bool { + if x != nil { + return x.IsActive + } + return false +} + +func (x *WebhookEventConfig) GetCreatedOn() *timestamppb.Timestamp { + if x != nil { + return x.CreatedOn + } + return nil +} + +func (x *WebhookEventConfig) GetUpdatedOn() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedOn + } + return nil +} + +func (x *WebhookEventConfig) GetSelectors() []*WebhookEventSelectors { + if x != nil { + return x.Selectors + } + return nil +} + +type WebhookEventConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WebhookEventConfig []*WebhookEventConfig `protobuf:"bytes,1,rep,name=webhookEventConfig,proto3" json:"webhookEventConfig,omitempty"` +} + +func (x *WebhookEventConfigResponse) Reset() { + *x = WebhookEventConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookEventConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookEventConfigResponse) ProtoMessage() {} + +func (x *WebhookEventConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookEventConfigResponse.ProtoReflect.Descriptor instead. +func (*WebhookEventConfigResponse) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{32} +} + +func (x *WebhookEventConfigResponse) GetWebhookEventConfig() []*WebhookEventConfig { + if x != nil { + return x.WebhookEventConfig + } + return nil +} + +type WebhookPayloadDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CiPipelineMaterialId int64 `protobuf:"varint,1,opt,name=ciPipelineMaterialId,proto3" json:"ciPipelineMaterialId,omitempty"` + Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` + EventTimeSortOrder string `protobuf:"bytes,4,opt,name=eventTimeSortOrder,proto3" json:"eventTimeSortOrder,omitempty"` +} + +func (x *WebhookPayloadDataRequest) Reset() { + *x = WebhookPayloadDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookPayloadDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookPayloadDataRequest) ProtoMessage() {} + +func (x *WebhookPayloadDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookPayloadDataRequest.ProtoReflect.Descriptor instead. +func (*WebhookPayloadDataRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{33} +} + +func (x *WebhookPayloadDataRequest) GetCiPipelineMaterialId() int64 { + if x != nil { + return x.CiPipelineMaterialId + } + return 0 +} + +func (x *WebhookPayloadDataRequest) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *WebhookPayloadDataRequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *WebhookPayloadDataRequest) GetEventTimeSortOrder() string { + if x != nil { + return x.EventTimeSortOrder + } + return "" +} + +type WebhookPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParsedDataId int64 `protobuf:"varint,1,opt,name=parsedDataId,proto3" json:"parsedDataId,omitempty"` + EventTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=eventTime,proto3" json:"eventTime,omitempty"` + MatchedFiltersCount int64 `protobuf:"varint,3,opt,name=matchedFiltersCount,proto3" json:"matchedFiltersCount,omitempty"` + FailedFiltersCount int64 `protobuf:"varint,4,opt,name=failedFiltersCount,proto3" json:"failedFiltersCount,omitempty"` + MatchedFilters bool `protobuf:"varint,5,opt,name=matchedFilters,proto3" json:"matchedFilters,omitempty"` +} + +func (x *WebhookPayload) Reset() { + *x = WebhookPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookPayload) ProtoMessage() {} + +func (x *WebhookPayload) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookPayload.ProtoReflect.Descriptor instead. +func (*WebhookPayload) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{34} +} + +func (x *WebhookPayload) GetParsedDataId() int64 { + if x != nil { + return x.ParsedDataId + } + return 0 +} + +func (x *WebhookPayload) GetEventTime() *timestamppb.Timestamp { + if x != nil { + return x.EventTime + } + return nil +} + +func (x *WebhookPayload) GetMatchedFiltersCount() int64 { + if x != nil { + return x.MatchedFiltersCount + } + return 0 +} + +func (x *WebhookPayload) GetFailedFiltersCount() int64 { + if x != nil { + return x.FailedFiltersCount + } + return 0 +} + +func (x *WebhookPayload) GetMatchedFilters() bool { + if x != nil { + return x.MatchedFilters + } + return false +} + +type WebhookPayloadDataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filters map[string]string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + RepositoryUrl string `protobuf:"bytes,2,opt,name=repositoryUrl,proto3" json:"repositoryUrl,omitempty"` + Payloads []*WebhookPayload `protobuf:"bytes,3,rep,name=payloads,proto3" json:"payloads,omitempty"` +} + +func (x *WebhookPayloadDataResponse) Reset() { + *x = WebhookPayloadDataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookPayloadDataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookPayloadDataResponse) ProtoMessage() {} + +func (x *WebhookPayloadDataResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookPayloadDataResponse.ProtoReflect.Descriptor instead. +func (*WebhookPayloadDataResponse) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{35} +} + +func (x *WebhookPayloadDataResponse) GetFilters() map[string]string { + if x != nil { + return x.Filters + } + return nil +} + +func (x *WebhookPayloadDataResponse) GetRepositoryUrl() string { + if x != nil { + return x.RepositoryUrl + } + return "" +} + +func (x *WebhookPayloadDataResponse) GetPayloads() []*WebhookPayload { + if x != nil { + return x.Payloads + } + return nil +} + +type WebhookPayloadFilterDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CiPipelineMaterialId int64 `protobuf:"varint,1,opt,name=ciPipelineMaterialId,proto3" json:"ciPipelineMaterialId,omitempty"` + ParsedDataId int64 `protobuf:"varint,2,opt,name=parsedDataId,proto3" json:"parsedDataId,omitempty"` +} + +func (x *WebhookPayloadFilterDataRequest) Reset() { + *x = WebhookPayloadFilterDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookPayloadFilterDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookPayloadFilterDataRequest) ProtoMessage() {} + +func (x *WebhookPayloadFilterDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookPayloadFilterDataRequest.ProtoReflect.Descriptor instead. +func (*WebhookPayloadFilterDataRequest) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{36} +} + +func (x *WebhookPayloadFilterDataRequest) GetCiPipelineMaterialId() int64 { + if x != nil { + return x.CiPipelineMaterialId + } + return 0 +} + +func (x *WebhookPayloadFilterDataRequest) GetParsedDataId() int64 { + if x != nil { + return x.ParsedDataId + } + return 0 +} + +type WebhookPayloadFilterDataSelectorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SelectorName string `protobuf:"bytes,1,opt,name=selectorName,proto3" json:"selectorName,omitempty"` + SelectorCondition string `protobuf:"bytes,2,opt,name=selectorCondition,proto3" json:"selectorCondition,omitempty"` + SelectorValue string `protobuf:"bytes,3,opt,name=selectorValue,proto3" json:"selectorValue,omitempty"` + Match bool `protobuf:"varint,4,opt,name=match,proto3" json:"match,omitempty"` +} + +func (x *WebhookPayloadFilterDataSelectorResponse) Reset() { + *x = WebhookPayloadFilterDataSelectorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookPayloadFilterDataSelectorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookPayloadFilterDataSelectorResponse) ProtoMessage() {} + +func (x *WebhookPayloadFilterDataSelectorResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookPayloadFilterDataSelectorResponse.ProtoReflect.Descriptor instead. +func (*WebhookPayloadFilterDataSelectorResponse) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{37} +} + +func (x *WebhookPayloadFilterDataSelectorResponse) GetSelectorName() string { + if x != nil { + return x.SelectorName + } + return "" +} + +func (x *WebhookPayloadFilterDataSelectorResponse) GetSelectorCondition() string { + if x != nil { + return x.SelectorCondition + } + return "" +} + +func (x *WebhookPayloadFilterDataSelectorResponse) GetSelectorValue() string { + if x != nil { + return x.SelectorValue + } + return "" +} + +func (x *WebhookPayloadFilterDataSelectorResponse) GetMatch() bool { + if x != nil { + return x.Match + } + return false +} + +type WebhookPayloadFilterDataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PayloadId int64 `protobuf:"varint,1,opt,name=payloadId,proto3" json:"payloadId,omitempty"` + SelectorsData []*WebhookPayloadFilterDataSelectorResponse `protobuf:"bytes,2,rep,name=selectorsData,proto3" json:"selectorsData,omitempty"` + PayloadJson string `protobuf:"bytes,3,opt,name=payloadJson,proto3" json:"payloadJson,omitempty"` +} + +func (x *WebhookPayloadFilterDataResponse) Reset() { + *x = WebhookPayloadFilterDataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitSensor_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebhookPayloadFilterDataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebhookPayloadFilterDataResponse) ProtoMessage() {} + +func (x *WebhookPayloadFilterDataResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitSensor_service_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebhookPayloadFilterDataResponse.ProtoReflect.Descriptor instead. +func (*WebhookPayloadFilterDataResponse) Descriptor() ([]byte, []int) { + return file_gitSensor_service_proto_rawDescGZIP(), []int{38} +} + +func (x *WebhookPayloadFilterDataResponse) GetPayloadId() int64 { + if x != nil { + return x.PayloadId + } + return 0 +} + +func (x *WebhookPayloadFilterDataResponse) GetSelectorsData() []*WebhookPayloadFilterDataSelectorResponse { + if x != nil { + return x.SelectorsData + } + return nil +} + +func (x *WebhookPayloadFilterDataResponse) GetPayloadJson() string { + if x != nil { + return x.PayloadJson + } + return "" +} + +var File_gitSensor_service_proto protoreflect.FileDescriptor + +var file_gitSensor_service_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x67, 0x69, 0x74, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0f, 0x67, 0x69, 0x74, 0x4d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, + 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x0f, 0x67, 0x69, 0x74, 0x4d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xf7, 0x01, 0x0a, 0x0b, + 0x47, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x73, 0x68, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x73, 0x73, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, + 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0xa9, 0x02, 0x0a, 0x0b, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x69, + 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x28, 0x0a, + 0x0f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x26, 0x0a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x4d, 0x73, 0x67, 0x41, 0x6e, + 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, + 0x74, 0x4d, 0x73, 0x67, 0x41, 0x6e, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x22, 0x6f, 0x0a, 0x1b, 0x53, 0x61, 0x76, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x50, 0x0a, 0x13, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x69, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x13, 0x63, + 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x73, 0x22, 0xec, 0x02, 0x0a, 0x12, 0x43, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x69, 0x74, + 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x67, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x65, 0x6e, 0x48, 0x61, 0x73, + 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x65, + 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x44, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, + 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, + 0x67, 0x22, 0x82, 0x01, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x63, 0x6d, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, + 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9f, 0x02, 0x0a, 0x16, 0x4d, 0x61, 0x74, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x52, 0x65, 0x70, + 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, + 0x70, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x73, + 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x69, 0x73, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, + 0x73, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x8e, 0x02, 0x0a, 0x09, 0x47, 0x69, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x46, 0x69, + 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x52, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x39, + 0x0a, 0x0b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x57, 0x65, + 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x08, 0x46, 0x69, 0x6c, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x41, 0x64, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x41, 0x64, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x0b, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2f, 0x0a, 0x0b, 0x48, + 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, + 0x0b, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x22, 0x67, 0x0a, 0x23, + 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x43, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x42, 0x65, 0x61, 0x6e, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x94, 0x03, 0x0a, 0x16, 0x43, 0x69, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x42, 0x65, 0x61, 0x6e, + 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, + 0x12, 0x24, 0x0a, 0x0d, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x69, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x52, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x7f, 0x0a, + 0x19, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x41, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x69, + 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x42, 0x65, 0x61, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x19, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a, 0x4c, + 0x0a, 0x1e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x01, 0x0a, + 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x69, 0x74, 0x48, 0x61, 0x73, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x69, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x74, 0x54, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x67, 0x69, 0x74, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x72, + 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x41, 0x0a, 0x19, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x69, + 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x94, 0x01, 0x0a, 0x1a, + 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, + 0x12, 0x40, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x46, 0x65, 0x74, 0x63, 0x68, 0x54, 0x69, + 0x6d, 0x65, 0x22, 0x37, 0x0a, 0x15, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x0f, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x82, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x6c, + 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, + 0x6c, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x30, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, + 0x0a, 0x04, 0x4c, 0x6f, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x6f, + 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x22, 0x30, 0x0a, 0x04, 0x54, 0x72, 0x65, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x6f, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x4c, 0x6f, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x22, 0x62, 0x0a, 0x06, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2e, + 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x22, 0x65, + 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2e, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x04, 0x44, 0x61, 0x74, 0x65, 0x22, 0x49, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x2e, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, + 0x22, 0x86, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x48, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x69, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x04, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x24, 0x0a, 0x04, 0x54, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x72, 0x65, + 0x65, 0x52, 0x04, 0x54, 0x72, 0x65, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x52, 0x06, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x52, 0x09, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x6e, 0x0a, 0x0a, 0x47, 0x69, 0x74, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x07, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x52, 0x09, + 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x58, 0x0a, 0x12, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x32, 0x0a, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x63, + 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x49, 0x64, 0x22, 0x96, 0x02, 0x0a, 0x10, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, + 0x6e, 0x64, 0x43, 0x69, 0x44, 0x61, 0x74, 0x61, 0x12, 0x79, 0x0a, 0x19, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x69, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, + 0x41, 0x6e, 0x64, 0x43, 0x69, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x19, 0x65, 0x78, 0x74, 0x72, 0x61, 0x45, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x0b, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x4c, + 0x0a, 0x1e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x53, 0x0a, 0x19, + 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, + 0x48, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, + 0x74, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x22, 0xed, 0x02, 0x0a, 0x15, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x53, + 0x68, 0x6f, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x74, 0x6f, 0x53, 0x68, 0x6f, + 0x77, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x6f, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x43, 0x69, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x74, 0x6f, 0x53, + 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x43, 0x69, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, + 0x08, 0x66, 0x69, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x66, 0x69, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x73, + 0x73, 0x69, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x38, 0x0a, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x4f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4f, + 0x6e, 0x22, 0xed, 0x02, 0x0a, 0x12, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x69, 0x74, 0x48, + 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x74, + 0x48, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x43, 0x73, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x43, 0x73, 0x76, + 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x38, 0x0a, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x4f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x6e, + 0x12, 0x3f, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x09, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x22, 0x6c, 0x0a, 0x1a, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4e, 0x0a, 0x12, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x69, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x77, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0xad, 0x01, 0x0a, 0x19, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, + 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x63, 0x69, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, + 0x2e, 0x0a, 0x12, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x6f, 0x72, 0x74, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, + 0xf8, 0x01, 0x0a, 0x0e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, + 0x44, 0x61, 0x74, 0x61, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x30, 0x0a, 0x13, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0x85, 0x02, 0x0a, 0x1a, 0x57, + 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x07, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x69, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x55, 0x72, 0x6c, 0x12, 0x36, + 0x0a, 0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, + 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x08, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x79, 0x0a, 0x1f, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x14, 0x63, 0x69, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72, + 0x73, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x49, 0x64, 0x22, 0xb8, 0x01, + 0x0a, 0x28, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, + 0x0a, 0x11, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, + 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xbe, 0x01, 0x0a, 0x20, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x0d, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x4a, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4a, 0x73, 0x6f, 0x6e, 0x32, 0xce, 0x0c, 0x0a, 0x10, 0x47, 0x69, + 0x74, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, + 0x0a, 0x0f, 0x53, 0x61, 0x76, 0x65, 0x47, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, + 0x69, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x38, 0x0a, + 0x07, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x12, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0x11, + 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x12, 0x52, 0x0a, 0x14, 0x53, 0x61, 0x76, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x56, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x63, 0x6d, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, + 0x1b, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x17, 0x2e, 0x67, + 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x2e, 0x67, 0x69, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, + 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x43, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x60, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x21, 0x2e, + 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x69, + 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x4f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x6f, 0x72, 0x54, 0x61, 0x67, 0x12, 0x21, + 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, + 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x63, 0x0a, 0x12, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x25, + 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x47, 0x69, 0x74, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, + 0x11, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x12, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x11, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x50, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x6f, + 0x61, 0x64, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x49, 0x6e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x12, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, + 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x47, 0x69, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x4e, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x2e, + 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, + 0x6f, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, + 0x6f, 0x6b, 0x41, 0x6e, 0x64, 0x43, 0x69, 0x44, 0x61, 0x74, 0x61, 0x12, 0x70, 0x0a, 0x1f, 0x47, + 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x6f, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x25, + 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, + 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, + 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7b, 0x0a, + 0x2a, 0x47, 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x25, 0x2e, 0x67, 0x69, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x30, 0x47, + 0x65, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, + 0x2b, 0x2e, 0x67, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, + 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, + 0x6b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x72, 0x6f, 0x6e, + 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67, 0x69, 0x74, + 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gitSensor_service_proto_rawDescOnce sync.Once + file_gitSensor_service_proto_rawDescData = file_gitSensor_service_proto_rawDesc +) + +func file_gitSensor_service_proto_rawDescGZIP() []byte { + file_gitSensor_service_proto_rawDescOnce.Do(func() { + file_gitSensor_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_gitSensor_service_proto_rawDescData) + }) + return file_gitSensor_service_proto_rawDescData +} + +var file_gitSensor_service_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +var file_gitSensor_service_proto_goTypes = []interface{}{ + (*AddRepoRequest)(nil), // 0: gitService.AddRepoRequest + (*GitProvider)(nil), // 1: gitService.GitProvider + (*GitMaterial)(nil), // 2: gitService.GitMaterial + (*SavePipelineMaterialRequest)(nil), // 3: gitService.SavePipelineMaterialRequest + (*CiPipelineMaterial)(nil), // 4: gitService.CiPipelineMaterial + (*FetchScmChangesRequest)(nil), // 5: gitService.FetchScmChangesRequest + (*MaterialChangeResponse)(nil), // 6: gitService.MaterialChangeResponse + (*GitCommit)(nil), // 7: gitService.GitCommit + (*FileStat)(nil), // 8: gitService.FileStat + (*WebhookData)(nil), // 9: gitService.WebhookData + (*HeadRequest)(nil), // 10: gitService.HeadRequest + (*GetHeadForPipelineMaterialsResponse)(nil), // 11: gitService.GetHeadForPipelineMaterialsResponse + (*CiPipelineMaterialBean)(nil), // 12: gitService.CiPipelineMaterialBean + (*CommitMetadataRequest)(nil), // 13: gitService.CommitMetadataRequest + (*RefreshGitMaterialRequest)(nil), // 14: gitService.RefreshGitMaterialRequest + (*RefreshGitMaterialResponse)(nil), // 15: gitService.RefreshGitMaterialResponse + (*ReloadMaterialRequest)(nil), // 16: gitService.ReloadMaterialRequest + (*GenericResponse)(nil), // 17: gitService.GenericResponse + (*Empty)(nil), // 18: gitService.Empty + (*ReleaseChangeRequest)(nil), // 19: gitService.ReleaseChangeRequest + (*Hash)(nil), // 20: gitService.Hash + (*Tree)(nil), // 21: gitService.Tree + (*Author)(nil), // 22: gitService.Author + (*Committer)(nil), // 23: gitService.Committer + (*Tag)(nil), // 24: gitService.Tag + (*Commit)(nil), // 25: gitService.Commit + (*GitChanges)(nil), // 26: gitService.GitChanges + (*WebhookDataRequest)(nil), // 27: gitService.WebhookDataRequest + (*WebhookAndCiData)(nil), // 28: gitService.WebhookAndCiData + (*WebhookEventConfigRequest)(nil), // 29: gitService.WebhookEventConfigRequest + (*WebhookEventSelectors)(nil), // 30: gitService.WebhookEventSelectors + (*WebhookEventConfig)(nil), // 31: gitService.WebhookEventConfig + (*WebhookEventConfigResponse)(nil), // 32: gitService.WebhookEventConfigResponse + (*WebhookPayloadDataRequest)(nil), // 33: gitService.WebhookPayloadDataRequest + (*WebhookPayload)(nil), // 34: gitService.WebhookPayload + (*WebhookPayloadDataResponse)(nil), // 35: gitService.WebhookPayloadDataResponse + (*WebhookPayloadFilterDataRequest)(nil), // 36: gitService.WebhookPayloadFilterDataRequest + (*WebhookPayloadFilterDataSelectorResponse)(nil), // 37: gitService.WebhookPayloadFilterDataSelectorResponse + (*WebhookPayloadFilterDataResponse)(nil), // 38: gitService.WebhookPayloadFilterDataResponse + nil, // 39: gitService.WebhookData.DataEntry + nil, // 40: gitService.CiPipelineMaterialBean.ExtraEnvironmentVariablesEntry + nil, // 41: gitService.WebhookAndCiData.ExtraEnvironmentVariablesEntry + nil, // 42: gitService.WebhookPayloadDataResponse.FiltersEntry + (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp +} +var file_gitSensor_service_proto_depIdxs = []int32{ + 2, // 0: gitService.AddRepoRequest.gitMaterialList:type_name -> gitService.GitMaterial + 4, // 1: gitService.SavePipelineMaterialRequest.ciPipelineMaterials:type_name -> gitService.CiPipelineMaterial + 43, // 2: gitService.CiPipelineMaterial.commitDate:type_name -> google.protobuf.Timestamp + 7, // 3: gitService.MaterialChangeResponse.commits:type_name -> gitService.GitCommit + 43, // 4: gitService.MaterialChangeResponse.lastFetchTime:type_name -> google.protobuf.Timestamp + 43, // 5: gitService.GitCommit.Date:type_name -> google.protobuf.Timestamp + 8, // 6: gitService.GitCommit.FileStats:type_name -> gitService.FileStat + 9, // 7: gitService.GitCommit.WebhookData:type_name -> gitService.WebhookData + 39, // 8: gitService.WebhookData.data:type_name -> gitService.WebhookData.DataEntry + 12, // 9: gitService.GetHeadForPipelineMaterialsResponse.materials:type_name -> gitService.CiPipelineMaterialBean + 7, // 10: gitService.CiPipelineMaterialBean.GitCommit:type_name -> gitService.GitCommit + 40, // 11: gitService.CiPipelineMaterialBean.ExtraEnvironmentVariables:type_name -> gitService.CiPipelineMaterialBean.ExtraEnvironmentVariablesEntry + 43, // 12: gitService.RefreshGitMaterialResponse.lastFetchTime:type_name -> google.protobuf.Timestamp + 43, // 13: gitService.Author.Date:type_name -> google.protobuf.Timestamp + 43, // 14: gitService.Committer.Date:type_name -> google.protobuf.Timestamp + 43, // 15: gitService.Tag.Date:type_name -> google.protobuf.Timestamp + 20, // 16: gitService.Commit.Hash:type_name -> gitService.Hash + 21, // 17: gitService.Commit.Tree:type_name -> gitService.Tree + 22, // 18: gitService.Commit.Author:type_name -> gitService.Author + 23, // 19: gitService.Commit.Committer:type_name -> gitService.Committer + 24, // 20: gitService.Commit.Tag:type_name -> gitService.Tag + 25, // 21: gitService.GitChanges.Commits:type_name -> gitService.Commit + 8, // 22: gitService.GitChanges.FileStats:type_name -> gitService.FileStat + 41, // 23: gitService.WebhookAndCiData.extraEnvironmentVariables:type_name -> gitService.WebhookAndCiData.ExtraEnvironmentVariablesEntry + 9, // 24: gitService.WebhookAndCiData.webhookData:type_name -> gitService.WebhookData + 43, // 25: gitService.WebhookEventSelectors.createdOn:type_name -> google.protobuf.Timestamp + 43, // 26: gitService.WebhookEventSelectors.updatedOn:type_name -> google.protobuf.Timestamp + 43, // 27: gitService.WebhookEventConfig.createdOn:type_name -> google.protobuf.Timestamp + 43, // 28: gitService.WebhookEventConfig.updatedOn:type_name -> google.protobuf.Timestamp + 30, // 29: gitService.WebhookEventConfig.selectors:type_name -> gitService.WebhookEventSelectors + 31, // 30: gitService.WebhookEventConfigResponse.webhookEventConfig:type_name -> gitService.WebhookEventConfig + 43, // 31: gitService.WebhookPayload.eventTime:type_name -> google.protobuf.Timestamp + 42, // 32: gitService.WebhookPayloadDataResponse.filters:type_name -> gitService.WebhookPayloadDataResponse.FiltersEntry + 34, // 33: gitService.WebhookPayloadDataResponse.payloads:type_name -> gitService.WebhookPayload + 37, // 34: gitService.WebhookPayloadFilterDataResponse.selectorsData:type_name -> gitService.WebhookPayloadFilterDataSelectorResponse + 1, // 35: gitService.GitSensorService.SaveGitProvider:input_type -> gitService.GitProvider + 0, // 36: gitService.GitSensorService.AddRepo:input_type -> gitService.AddRepoRequest + 2, // 37: gitService.GitSensorService.UpdateRepo:input_type -> gitService.GitMaterial + 3, // 38: gitService.GitSensorService.SavePipelineMaterial:input_type -> gitService.SavePipelineMaterialRequest + 5, // 39: gitService.GitSensorService.FetchChanges:input_type -> gitService.FetchScmChangesRequest + 10, // 40: gitService.GitSensorService.GetHeadForPipelineMaterials:input_type -> gitService.HeadRequest + 13, // 41: gitService.GitSensorService.GetCommitMetadata:input_type -> gitService.CommitMetadataRequest + 13, // 42: gitService.GitSensorService.GetCommitMetadataForPipelineMaterial:input_type -> gitService.CommitMetadataRequest + 13, // 43: gitService.GitSensorService.GetCommitInfoForTag:input_type -> gitService.CommitMetadataRequest + 14, // 44: gitService.GitSensorService.RefreshGitMaterial:input_type -> gitService.RefreshGitMaterialRequest + 18, // 45: gitService.GitSensorService.ReloadAllMaterial:input_type -> gitService.Empty + 16, // 46: gitService.GitSensorService.ReloadMaterial:input_type -> gitService.ReloadMaterialRequest + 19, // 47: gitService.GitSensorService.GetChangesInRelease:input_type -> gitService.ReleaseChangeRequest + 27, // 48: gitService.GitSensorService.GetWebhookData:input_type -> gitService.WebhookDataRequest + 29, // 49: gitService.GitSensorService.GetAllWebhookEventConfigForHost:input_type -> gitService.WebhookEventConfigRequest + 29, // 50: gitService.GitSensorService.GetWebhookEventConfig:input_type -> gitService.WebhookEventConfigRequest + 33, // 51: gitService.GitSensorService.GetWebhookPayloadDataForPipelineMaterialId:input_type -> gitService.WebhookPayloadDataRequest + 36, // 52: gitService.GitSensorService.GetWebhookPayloadFilterDataForPipelineMaterialId:input_type -> gitService.WebhookPayloadFilterDataRequest + 18, // 53: gitService.GitSensorService.SaveGitProvider:output_type -> gitService.Empty + 18, // 54: gitService.GitSensorService.AddRepo:output_type -> gitService.Empty + 18, // 55: gitService.GitSensorService.UpdateRepo:output_type -> gitService.Empty + 18, // 56: gitService.GitSensorService.SavePipelineMaterial:output_type -> gitService.Empty + 6, // 57: gitService.GitSensorService.FetchChanges:output_type -> gitService.MaterialChangeResponse + 11, // 58: gitService.GitSensorService.GetHeadForPipelineMaterials:output_type -> gitService.GetHeadForPipelineMaterialsResponse + 7, // 59: gitService.GitSensorService.GetCommitMetadata:output_type -> gitService.GitCommit + 7, // 60: gitService.GitSensorService.GetCommitMetadataForPipelineMaterial:output_type -> gitService.GitCommit + 7, // 61: gitService.GitSensorService.GetCommitInfoForTag:output_type -> gitService.GitCommit + 15, // 62: gitService.GitSensorService.RefreshGitMaterial:output_type -> gitService.RefreshGitMaterialResponse + 18, // 63: gitService.GitSensorService.ReloadAllMaterial:output_type -> gitService.Empty + 17, // 64: gitService.GitSensorService.ReloadMaterial:output_type -> gitService.GenericResponse + 26, // 65: gitService.GitSensorService.GetChangesInRelease:output_type -> gitService.GitChanges + 28, // 66: gitService.GitSensorService.GetWebhookData:output_type -> gitService.WebhookAndCiData + 32, // 67: gitService.GitSensorService.GetAllWebhookEventConfigForHost:output_type -> gitService.WebhookEventConfigResponse + 31, // 68: gitService.GitSensorService.GetWebhookEventConfig:output_type -> gitService.WebhookEventConfig + 35, // 69: gitService.GitSensorService.GetWebhookPayloadDataForPipelineMaterialId:output_type -> gitService.WebhookPayloadDataResponse + 38, // 70: gitService.GitSensorService.GetWebhookPayloadFilterDataForPipelineMaterialId:output_type -> gitService.WebhookPayloadFilterDataResponse + 53, // [53:71] is the sub-list for method output_type + 35, // [35:53] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name +} + +func init() { file_gitSensor_service_proto_init() } +func file_gitSensor_service_proto_init() { + if File_gitSensor_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gitSensor_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddRepoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GitProvider); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GitMaterial); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SavePipelineMaterialRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CiPipelineMaterial); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchScmChangesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MaterialChangeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GitCommit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileStat); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetHeadForPipelineMaterialsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CiPipelineMaterialBean); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitMetadataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshGitMaterialRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RefreshGitMaterialResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReloadMaterialRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenericResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReleaseChangeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Hash); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Author); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Committer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Commit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GitChanges); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookAndCiData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookEventConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookEventSelectors); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookEventConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookEventConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookPayloadDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookPayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookPayloadDataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookPayloadFilterDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookPayloadFilterDataSelectorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitSensor_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebhookPayloadFilterDataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gitSensor_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 43, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_gitSensor_service_proto_goTypes, + DependencyIndexes: file_gitSensor_service_proto_depIdxs, + MessageInfos: file_gitSensor_service_proto_msgTypes, + }.Build() + File_gitSensor_service_proto = out.File + file_gitSensor_service_proto_rawDesc = nil + file_gitSensor_service_proto_goTypes = nil + file_gitSensor_service_proto_depIdxs = nil +} diff --git a/vendor/github.com/devtron-labs/protos/gitSensor/service.proto b/vendor/github.com/devtron-labs/protos/gitSensor/service.proto new file mode 100644 index 0000000000..27dd413460 --- /dev/null +++ b/vendor/github.com/devtron-labs/protos/gitSensor/service.proto @@ -0,0 +1,325 @@ +syntax = "proto3"; + +package gitService; + +option go_package = "github.com/devtron-labs/protos/gitSensor"; + +import "google/protobuf/timestamp.proto"; + +message AddRepoRequest { + repeated GitMaterial gitMaterialList = 1; +} + +message GitProvider { + int64 id = 1; + string name = 2; + string url = 3; + string userName = 4; + string password = 5; + string sshPrivateKey = 6; + string accessToken = 7; + string authMode = 8; + bool active = 9; +} + +message GitMaterial { + int64 id = 1; + int64 gitProviderId = 2; + string url = 3; + bool fetchSubmodules = 4; + string name = 5; + string checkoutLocation = 6; + bool checkoutStatus = 7; + string checkoutMsgAny = 8; + bool deleted = 9; +} + +message SavePipelineMaterialRequest { + repeated CiPipelineMaterial ciPipelineMaterials = 1; +} + +message CiPipelineMaterial { + int64 id = 1; + int64 gitMaterialId = 2; + string type = 3; + string value= 4; + bool active = 5; + string lastSeenHash = 6; + string commitAuthor = 7; + google.protobuf.Timestamp commitDate = 8; + string commitHistory = 9; + bool errored = 10; + string errorMsg = 11; +} + +message FetchScmChangesRequest { + int64 pipelineMaterialId = 1; + string from = 2; + string to = 3; + int64 count = 4; +} + +message MaterialChangeResponse { + repeated GitCommit commits = 1; + google.protobuf.Timestamp lastFetchTime = 2; + bool isRepoError = 3; + string repoErrorMsg = 4; + bool isBranchError = 5; + string branchErrorMsg = 6; +} + +message GitCommit { + string Commit = 1; + string Author = 2; + google.protobuf.Timestamp Date = 3; + string Message = 4; + repeated string Changes = 5; + repeated FileStat FileStats = 6; + WebhookData WebhookData = 7; +} + +message FileStat { + string Name = 1; + int64 Addition = 2; + int64 Deletion = 3; +} + +message WebhookData { + int64 id = 1; + string eventActionType = 2; + map data = 3; +} + +message HeadRequest { + repeated int64 materialIds = 1; +} + +message GetHeadForPipelineMaterialsResponse { + repeated CiPipelineMaterialBean materials = 1; +} + +message CiPipelineMaterialBean { + int64 Id = 1; + int64 GitMaterialId = 2; + string Type = 3; + string Value = 4; + bool Active = 5; + GitCommit GitCommit = 6; + map ExtraEnvironmentVariables = 7; +} + +message CommitMetadataRequest { + int64 pipelineMaterialId = 1; + string gitHash = 2; + string gitTag = 3; + string branchName = 4; +} + +message RefreshGitMaterialRequest { + int64 gitMaterialId = 1; +} + +message RefreshGitMaterialResponse { + string message = 1; + string errorMsg = 2; + google.protobuf.Timestamp lastFetchTime = 3; +} + +message ReloadMaterialRequest { + int64 materialId = 1; +} + +message GenericResponse { + string message = 1; +} + +message Empty { +} + +message ReleaseChangeRequest { + int64 pipelineMaterialId = 1; + string oldCommit = 2; + string newCommit = 3; +} + +message Hash { + string Long = 1; + string Short = 2; +} + +message Tree { + string Long = 1; + string Short = 2; +} + +message Author { + string Name = 1; + string Email = 2; + google.protobuf.Timestamp Date = 3; +} + +message Committer { + string Name = 1; + string Email = 2; + google.protobuf.Timestamp Date = 3; +} + +message Tag { + string Name = 1; + google.protobuf.Timestamp Date = 2; +} + +message Commit { + Hash Hash = 1; + Tree Tree = 2; + Author Author = 3; + Committer Committer = 4; + Tag Tag = 5; + string Subject = 6; + string Body = 7; +} + +message GitChanges { + repeated Commit Commits = 1; + repeated FileStat FileStats = 2; +} + +message WebhookDataRequest { + int64 id = 1; + int64 ciPipelineMaterialId = 2; +} + +message WebhookAndCiData { + map extraEnvironmentVariables = 1; + WebhookData webhookData = 2; +} + +message WebhookEventConfigRequest { + int64 gitHostId = 1; + int64 eventId = 2; +} + +message WebhookEventSelectors { + int64 id = 1; + int64 eventId = 2; + string name = 3; + bool toShow = 4; + bool toShowInCiFilter = 5; + string fixValue = 6; + string possibleValues = 7; + bool isActive = 8; + google.protobuf.Timestamp createdOn = 9; + google.protobuf.Timestamp updatedOn = 10; +} + +message WebhookEventConfig { + int64 id = 1; + int64 gitHostId = 2; + string name = 3; + string eventTypesCsv = 4; + string actionType = 5; + bool isActive = 6; + google.protobuf.Timestamp createdOn = 7; + google.protobuf.Timestamp updatedOn = 8; + repeated WebhookEventSelectors selectors = 9; +} + +message WebhookEventConfigResponse { + repeated WebhookEventConfig webhookEventConfig = 1; +} + +message WebhookPayloadDataRequest { + int64 ciPipelineMaterialId = 1; + int64 limit = 2; + int64 offset = 3; + string eventTimeSortOrder = 4; +} + +message WebhookPayload { + int64 parsedDataId = 1; + google.protobuf.Timestamp eventTime = 2; + int64 matchedFiltersCount = 3; + int64 failedFiltersCount = 4; + bool matchedFilters = 5; +} + +message WebhookPayloadDataResponse { + map filters = 1; + string repositoryUrl = 2; + repeated WebhookPayload payloads = 3; +} + +message WebhookPayloadFilterDataRequest { + int64 ciPipelineMaterialId = 1; + int64 parsedDataId = 2; +} + +message WebhookPayloadFilterDataSelectorResponse { + string selectorName = 1; + string selectorCondition = 2; + string selectorValue = 3; + bool match = 4; +} + +message WebhookPayloadFilterDataResponse { + int64 payloadId = 1; + repeated WebhookPayloadFilterDataSelectorResponse selectorsData = 2; + string payloadJson = 3; +} + +service GitSensorService { + + // Saves Git credentials + rpc SaveGitProvider(GitProvider) returns (Empty); + + // Add Repo + rpc AddRepo(AddRepoRequest) returns (Empty); + + // Update Repo + rpc UpdateRepo(GitMaterial) returns (Empty); + + // Save CI pipeline material + rpc SavePipelineMaterial(SavePipelineMaterialRequest) returns (Empty); + + // Fetch SCM changes + rpc FetchChanges(FetchScmChangesRequest) returns (MaterialChangeResponse); + + // Get Head for pipeline materials + rpc GetHeadForPipelineMaterials(HeadRequest) returns (GetHeadForPipelineMaterialsResponse); + + // Get commit metadata + rpc GetCommitMetadata(CommitMetadataRequest) returns (GitCommit); + + // Get commit metadata for pipeline material + rpc GetCommitMetadataForPipelineMaterial(CommitMetadataRequest) returns (GitCommit); + + // Get commit info for Tag + rpc GetCommitInfoForTag(CommitMetadataRequest) returns (GitCommit); + + // Refresh git material + rpc RefreshGitMaterial(RefreshGitMaterialRequest) returns (RefreshGitMaterialResponse); + + // Reload all material + rpc ReloadAllMaterial(Empty) returns (Empty); + + // Reload a specific material + rpc ReloadMaterial(ReloadMaterialRequest) returns (GenericResponse); + + // Get changes in release + rpc GetChangesInRelease(ReleaseChangeRequest) returns (GitChanges); + + // Get webhook data + rpc GetWebhookData(WebhookDataRequest) returns (WebhookAndCiData); + + // Get all webhook event config for host + rpc GetAllWebhookEventConfigForHost(WebhookEventConfigRequest) returns (WebhookEventConfigResponse); + + // Get webhook event config + rpc GetWebhookEventConfig(WebhookEventConfigRequest) returns (WebhookEventConfig); + + // Get webhook payload data by pipeline material id + rpc GetWebhookPayloadDataForPipelineMaterialId(WebhookPayloadDataRequest) returns (WebhookPayloadDataResponse); + + // Get webhook payload data by pipeline material id with filter + rpc GetWebhookPayloadFilterDataForPipelineMaterialId(WebhookPayloadFilterDataRequest) returns (WebhookPayloadFilterDataResponse); +} \ No newline at end of file diff --git a/vendor/github.com/devtron-labs/protos/gitSensor/service_grpc.pb.go b/vendor/github.com/devtron-labs/protos/gitSensor/service_grpc.pb.go new file mode 100644 index 0000000000..685dbd7ece --- /dev/null +++ b/vendor/github.com/devtron-labs/protos/gitSensor/service_grpc.pb.go @@ -0,0 +1,753 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.21.12 +// source: gitSensor/service.proto + +package gitSensor + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// GitSensorServiceClient is the client API for GitSensorService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GitSensorServiceClient interface { + // Saves Git credentials + SaveGitProvider(ctx context.Context, in *GitProvider, opts ...grpc.CallOption) (*Empty, error) + // Add Repo + AddRepo(ctx context.Context, in *AddRepoRequest, opts ...grpc.CallOption) (*Empty, error) + // Update Repo + UpdateRepo(ctx context.Context, in *GitMaterial, opts ...grpc.CallOption) (*Empty, error) + // Save CI pipeline material + SavePipelineMaterial(ctx context.Context, in *SavePipelineMaterialRequest, opts ...grpc.CallOption) (*Empty, error) + // Fetch SCM changes + FetchChanges(ctx context.Context, in *FetchScmChangesRequest, opts ...grpc.CallOption) (*MaterialChangeResponse, error) + // Get Head for pipeline materials + GetHeadForPipelineMaterials(ctx context.Context, in *HeadRequest, opts ...grpc.CallOption) (*GetHeadForPipelineMaterialsResponse, error) + // Get commit metadata + GetCommitMetadata(ctx context.Context, in *CommitMetadataRequest, opts ...grpc.CallOption) (*GitCommit, error) + // Get commit metadata for pipeline material + GetCommitMetadataForPipelineMaterial(ctx context.Context, in *CommitMetadataRequest, opts ...grpc.CallOption) (*GitCommit, error) + // Get commit info for Tag + GetCommitInfoForTag(ctx context.Context, in *CommitMetadataRequest, opts ...grpc.CallOption) (*GitCommit, error) + // Refresh git material + RefreshGitMaterial(ctx context.Context, in *RefreshGitMaterialRequest, opts ...grpc.CallOption) (*RefreshGitMaterialResponse, error) + // Reload all material + ReloadAllMaterial(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) + // Reload a specific material + ReloadMaterial(ctx context.Context, in *ReloadMaterialRequest, opts ...grpc.CallOption) (*GenericResponse, error) + // Get changes in release + GetChangesInRelease(ctx context.Context, in *ReleaseChangeRequest, opts ...grpc.CallOption) (*GitChanges, error) + // Get webhook data + GetWebhookData(ctx context.Context, in *WebhookDataRequest, opts ...grpc.CallOption) (*WebhookAndCiData, error) + // Get all webhook event config for host + GetAllWebhookEventConfigForHost(ctx context.Context, in *WebhookEventConfigRequest, opts ...grpc.CallOption) (*WebhookEventConfigResponse, error) + // Get webhook event config + GetWebhookEventConfig(ctx context.Context, in *WebhookEventConfigRequest, opts ...grpc.CallOption) (*WebhookEventConfig, error) + // Get webhook payload data by pipeline material id + GetWebhookPayloadDataForPipelineMaterialId(ctx context.Context, in *WebhookPayloadDataRequest, opts ...grpc.CallOption) (*WebhookPayloadDataResponse, error) + // Get webhook payload data by pipeline material id with filter + GetWebhookPayloadFilterDataForPipelineMaterialId(ctx context.Context, in *WebhookPayloadFilterDataRequest, opts ...grpc.CallOption) (*WebhookPayloadFilterDataResponse, error) +} + +type gitSensorServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewGitSensorServiceClient(cc grpc.ClientConnInterface) GitSensorServiceClient { + return &gitSensorServiceClient{cc} +} + +func (c *gitSensorServiceClient) SaveGitProvider(ctx context.Context, in *GitProvider, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/SaveGitProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) AddRepo(ctx context.Context, in *AddRepoRequest, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/AddRepo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) UpdateRepo(ctx context.Context, in *GitMaterial, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/UpdateRepo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) SavePipelineMaterial(ctx context.Context, in *SavePipelineMaterialRequest, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/SavePipelineMaterial", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) FetchChanges(ctx context.Context, in *FetchScmChangesRequest, opts ...grpc.CallOption) (*MaterialChangeResponse, error) { + out := new(MaterialChangeResponse) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/FetchChanges", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) GetHeadForPipelineMaterials(ctx context.Context, in *HeadRequest, opts ...grpc.CallOption) (*GetHeadForPipelineMaterialsResponse, error) { + out := new(GetHeadForPipelineMaterialsResponse) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/GetHeadForPipelineMaterials", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) GetCommitMetadata(ctx context.Context, in *CommitMetadataRequest, opts ...grpc.CallOption) (*GitCommit, error) { + out := new(GitCommit) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/GetCommitMetadata", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) GetCommitMetadataForPipelineMaterial(ctx context.Context, in *CommitMetadataRequest, opts ...grpc.CallOption) (*GitCommit, error) { + out := new(GitCommit) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/GetCommitMetadataForPipelineMaterial", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) GetCommitInfoForTag(ctx context.Context, in *CommitMetadataRequest, opts ...grpc.CallOption) (*GitCommit, error) { + out := new(GitCommit) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/GetCommitInfoForTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) RefreshGitMaterial(ctx context.Context, in *RefreshGitMaterialRequest, opts ...grpc.CallOption) (*RefreshGitMaterialResponse, error) { + out := new(RefreshGitMaterialResponse) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/RefreshGitMaterial", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) ReloadAllMaterial(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/ReloadAllMaterial", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) ReloadMaterial(ctx context.Context, in *ReloadMaterialRequest, opts ...grpc.CallOption) (*GenericResponse, error) { + out := new(GenericResponse) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/ReloadMaterial", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) GetChangesInRelease(ctx context.Context, in *ReleaseChangeRequest, opts ...grpc.CallOption) (*GitChanges, error) { + out := new(GitChanges) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/GetChangesInRelease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) GetWebhookData(ctx context.Context, in *WebhookDataRequest, opts ...grpc.CallOption) (*WebhookAndCiData, error) { + out := new(WebhookAndCiData) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/GetWebhookData", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) GetAllWebhookEventConfigForHost(ctx context.Context, in *WebhookEventConfigRequest, opts ...grpc.CallOption) (*WebhookEventConfigResponse, error) { + out := new(WebhookEventConfigResponse) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/GetAllWebhookEventConfigForHost", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) GetWebhookEventConfig(ctx context.Context, in *WebhookEventConfigRequest, opts ...grpc.CallOption) (*WebhookEventConfig, error) { + out := new(WebhookEventConfig) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/GetWebhookEventConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) GetWebhookPayloadDataForPipelineMaterialId(ctx context.Context, in *WebhookPayloadDataRequest, opts ...grpc.CallOption) (*WebhookPayloadDataResponse, error) { + out := new(WebhookPayloadDataResponse) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/GetWebhookPayloadDataForPipelineMaterialId", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gitSensorServiceClient) GetWebhookPayloadFilterDataForPipelineMaterialId(ctx context.Context, in *WebhookPayloadFilterDataRequest, opts ...grpc.CallOption) (*WebhookPayloadFilterDataResponse, error) { + out := new(WebhookPayloadFilterDataResponse) + err := c.cc.Invoke(ctx, "/gitService.GitSensorService/GetWebhookPayloadFilterDataForPipelineMaterialId", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GitSensorServiceServer is the server API for GitSensorService service. +// All implementations must embed UnimplementedGitSensorServiceServer +// for forward compatibility +type GitSensorServiceServer interface { + // Saves Git credentials + SaveGitProvider(context.Context, *GitProvider) (*Empty, error) + // Add Repo + AddRepo(context.Context, *AddRepoRequest) (*Empty, error) + // Update Repo + UpdateRepo(context.Context, *GitMaterial) (*Empty, error) + // Save CI pipeline material + SavePipelineMaterial(context.Context, *SavePipelineMaterialRequest) (*Empty, error) + // Fetch SCM changes + FetchChanges(context.Context, *FetchScmChangesRequest) (*MaterialChangeResponse, error) + // Get Head for pipeline materials + GetHeadForPipelineMaterials(context.Context, *HeadRequest) (*GetHeadForPipelineMaterialsResponse, error) + // Get commit metadata + GetCommitMetadata(context.Context, *CommitMetadataRequest) (*GitCommit, error) + // Get commit metadata for pipeline material + GetCommitMetadataForPipelineMaterial(context.Context, *CommitMetadataRequest) (*GitCommit, error) + // Get commit info for Tag + GetCommitInfoForTag(context.Context, *CommitMetadataRequest) (*GitCommit, error) + // Refresh git material + RefreshGitMaterial(context.Context, *RefreshGitMaterialRequest) (*RefreshGitMaterialResponse, error) + // Reload all material + ReloadAllMaterial(context.Context, *Empty) (*Empty, error) + // Reload a specific material + ReloadMaterial(context.Context, *ReloadMaterialRequest) (*GenericResponse, error) + // Get changes in release + GetChangesInRelease(context.Context, *ReleaseChangeRequest) (*GitChanges, error) + // Get webhook data + GetWebhookData(context.Context, *WebhookDataRequest) (*WebhookAndCiData, error) + // Get all webhook event config for host + GetAllWebhookEventConfigForHost(context.Context, *WebhookEventConfigRequest) (*WebhookEventConfigResponse, error) + // Get webhook event config + GetWebhookEventConfig(context.Context, *WebhookEventConfigRequest) (*WebhookEventConfig, error) + // Get webhook payload data by pipeline material id + GetWebhookPayloadDataForPipelineMaterialId(context.Context, *WebhookPayloadDataRequest) (*WebhookPayloadDataResponse, error) + // Get webhook payload data by pipeline material id with filter + GetWebhookPayloadFilterDataForPipelineMaterialId(context.Context, *WebhookPayloadFilterDataRequest) (*WebhookPayloadFilterDataResponse, error) + mustEmbedUnimplementedGitSensorServiceServer() +} + +// UnimplementedGitSensorServiceServer must be embedded to have forward compatible implementations. +type UnimplementedGitSensorServiceServer struct { +} + +func (UnimplementedGitSensorServiceServer) SaveGitProvider(context.Context, *GitProvider) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SaveGitProvider not implemented") +} +func (UnimplementedGitSensorServiceServer) AddRepo(context.Context, *AddRepoRequest) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddRepo not implemented") +} +func (UnimplementedGitSensorServiceServer) UpdateRepo(context.Context, *GitMaterial) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRepo not implemented") +} +func (UnimplementedGitSensorServiceServer) SavePipelineMaterial(context.Context, *SavePipelineMaterialRequest) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SavePipelineMaterial not implemented") +} +func (UnimplementedGitSensorServiceServer) FetchChanges(context.Context, *FetchScmChangesRequest) (*MaterialChangeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchChanges not implemented") +} +func (UnimplementedGitSensorServiceServer) GetHeadForPipelineMaterials(context.Context, *HeadRequest) (*GetHeadForPipelineMaterialsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHeadForPipelineMaterials not implemented") +} +func (UnimplementedGitSensorServiceServer) GetCommitMetadata(context.Context, *CommitMetadataRequest) (*GitCommit, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCommitMetadata not implemented") +} +func (UnimplementedGitSensorServiceServer) GetCommitMetadataForPipelineMaterial(context.Context, *CommitMetadataRequest) (*GitCommit, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCommitMetadataForPipelineMaterial not implemented") +} +func (UnimplementedGitSensorServiceServer) GetCommitInfoForTag(context.Context, *CommitMetadataRequest) (*GitCommit, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCommitInfoForTag not implemented") +} +func (UnimplementedGitSensorServiceServer) RefreshGitMaterial(context.Context, *RefreshGitMaterialRequest) (*RefreshGitMaterialResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RefreshGitMaterial not implemented") +} +func (UnimplementedGitSensorServiceServer) ReloadAllMaterial(context.Context, *Empty) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReloadAllMaterial not implemented") +} +func (UnimplementedGitSensorServiceServer) ReloadMaterial(context.Context, *ReloadMaterialRequest) (*GenericResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReloadMaterial not implemented") +} +func (UnimplementedGitSensorServiceServer) GetChangesInRelease(context.Context, *ReleaseChangeRequest) (*GitChanges, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChangesInRelease not implemented") +} +func (UnimplementedGitSensorServiceServer) GetWebhookData(context.Context, *WebhookDataRequest) (*WebhookAndCiData, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWebhookData not implemented") +} +func (UnimplementedGitSensorServiceServer) GetAllWebhookEventConfigForHost(context.Context, *WebhookEventConfigRequest) (*WebhookEventConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAllWebhookEventConfigForHost not implemented") +} +func (UnimplementedGitSensorServiceServer) GetWebhookEventConfig(context.Context, *WebhookEventConfigRequest) (*WebhookEventConfig, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWebhookEventConfig not implemented") +} +func (UnimplementedGitSensorServiceServer) GetWebhookPayloadDataForPipelineMaterialId(context.Context, *WebhookPayloadDataRequest) (*WebhookPayloadDataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWebhookPayloadDataForPipelineMaterialId not implemented") +} +func (UnimplementedGitSensorServiceServer) GetWebhookPayloadFilterDataForPipelineMaterialId(context.Context, *WebhookPayloadFilterDataRequest) (*WebhookPayloadFilterDataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWebhookPayloadFilterDataForPipelineMaterialId not implemented") +} +func (UnimplementedGitSensorServiceServer) mustEmbedUnimplementedGitSensorServiceServer() {} + +// UnsafeGitSensorServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GitSensorServiceServer will +// result in compilation errors. +type UnsafeGitSensorServiceServer interface { + mustEmbedUnimplementedGitSensorServiceServer() +} + +func RegisterGitSensorServiceServer(s grpc.ServiceRegistrar, srv GitSensorServiceServer) { + s.RegisterService(&GitSensorService_ServiceDesc, srv) +} + +func _GitSensorService_SaveGitProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GitProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).SaveGitProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/SaveGitProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).SaveGitProvider(ctx, req.(*GitProvider)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_AddRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddRepoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).AddRepo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/AddRepo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).AddRepo(ctx, req.(*AddRepoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_UpdateRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GitMaterial) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).UpdateRepo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/UpdateRepo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).UpdateRepo(ctx, req.(*GitMaterial)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_SavePipelineMaterial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SavePipelineMaterialRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).SavePipelineMaterial(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/SavePipelineMaterial", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).SavePipelineMaterial(ctx, req.(*SavePipelineMaterialRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_FetchChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchScmChangesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).FetchChanges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/FetchChanges", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).FetchChanges(ctx, req.(*FetchScmChangesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_GetHeadForPipelineMaterials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HeadRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).GetHeadForPipelineMaterials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/GetHeadForPipelineMaterials", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).GetHeadForPipelineMaterials(ctx, req.(*HeadRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_GetCommitMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CommitMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).GetCommitMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/GetCommitMetadata", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).GetCommitMetadata(ctx, req.(*CommitMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_GetCommitMetadataForPipelineMaterial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CommitMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).GetCommitMetadataForPipelineMaterial(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/GetCommitMetadataForPipelineMaterial", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).GetCommitMetadataForPipelineMaterial(ctx, req.(*CommitMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_GetCommitInfoForTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CommitMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).GetCommitInfoForTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/GetCommitInfoForTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).GetCommitInfoForTag(ctx, req.(*CommitMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_RefreshGitMaterial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RefreshGitMaterialRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).RefreshGitMaterial(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/RefreshGitMaterial", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).RefreshGitMaterial(ctx, req.(*RefreshGitMaterialRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_ReloadAllMaterial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).ReloadAllMaterial(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/ReloadAllMaterial", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).ReloadAllMaterial(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_ReloadMaterial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReloadMaterialRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).ReloadMaterial(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/ReloadMaterial", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).ReloadMaterial(ctx, req.(*ReloadMaterialRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_GetChangesInRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReleaseChangeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).GetChangesInRelease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/GetChangesInRelease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).GetChangesInRelease(ctx, req.(*ReleaseChangeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_GetWebhookData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WebhookDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).GetWebhookData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/GetWebhookData", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).GetWebhookData(ctx, req.(*WebhookDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_GetAllWebhookEventConfigForHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WebhookEventConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).GetAllWebhookEventConfigForHost(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/GetAllWebhookEventConfigForHost", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).GetAllWebhookEventConfigForHost(ctx, req.(*WebhookEventConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_GetWebhookEventConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WebhookEventConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).GetWebhookEventConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/GetWebhookEventConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).GetWebhookEventConfig(ctx, req.(*WebhookEventConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_GetWebhookPayloadDataForPipelineMaterialId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WebhookPayloadDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).GetWebhookPayloadDataForPipelineMaterialId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/GetWebhookPayloadDataForPipelineMaterialId", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).GetWebhookPayloadDataForPipelineMaterialId(ctx, req.(*WebhookPayloadDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GitSensorService_GetWebhookPayloadFilterDataForPipelineMaterialId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WebhookPayloadFilterDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GitSensorServiceServer).GetWebhookPayloadFilterDataForPipelineMaterialId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitService.GitSensorService/GetWebhookPayloadFilterDataForPipelineMaterialId", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GitSensorServiceServer).GetWebhookPayloadFilterDataForPipelineMaterialId(ctx, req.(*WebhookPayloadFilterDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// GitSensorService_ServiceDesc is the grpc.ServiceDesc for GitSensorService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var GitSensorService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "gitService.GitSensorService", + HandlerType: (*GitSensorServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SaveGitProvider", + Handler: _GitSensorService_SaveGitProvider_Handler, + }, + { + MethodName: "AddRepo", + Handler: _GitSensorService_AddRepo_Handler, + }, + { + MethodName: "UpdateRepo", + Handler: _GitSensorService_UpdateRepo_Handler, + }, + { + MethodName: "SavePipelineMaterial", + Handler: _GitSensorService_SavePipelineMaterial_Handler, + }, + { + MethodName: "FetchChanges", + Handler: _GitSensorService_FetchChanges_Handler, + }, + { + MethodName: "GetHeadForPipelineMaterials", + Handler: _GitSensorService_GetHeadForPipelineMaterials_Handler, + }, + { + MethodName: "GetCommitMetadata", + Handler: _GitSensorService_GetCommitMetadata_Handler, + }, + { + MethodName: "GetCommitMetadataForPipelineMaterial", + Handler: _GitSensorService_GetCommitMetadataForPipelineMaterial_Handler, + }, + { + MethodName: "GetCommitInfoForTag", + Handler: _GitSensorService_GetCommitInfoForTag_Handler, + }, + { + MethodName: "RefreshGitMaterial", + Handler: _GitSensorService_RefreshGitMaterial_Handler, + }, + { + MethodName: "ReloadAllMaterial", + Handler: _GitSensorService_ReloadAllMaterial_Handler, + }, + { + MethodName: "ReloadMaterial", + Handler: _GitSensorService_ReloadMaterial_Handler, + }, + { + MethodName: "GetChangesInRelease", + Handler: _GitSensorService_GetChangesInRelease_Handler, + }, + { + MethodName: "GetWebhookData", + Handler: _GitSensorService_GetWebhookData_Handler, + }, + { + MethodName: "GetAllWebhookEventConfigForHost", + Handler: _GitSensorService_GetAllWebhookEventConfigForHost_Handler, + }, + { + MethodName: "GetWebhookEventConfig", + Handler: _GitSensorService_GetWebhookEventConfig_Handler, + }, + { + MethodName: "GetWebhookPayloadDataForPipelineMaterialId", + Handler: _GitSensorService_GetWebhookPayloadDataForPipelineMaterialId_Handler, + }, + { + MethodName: "GetWebhookPayloadFilterDataForPipelineMaterialId", + Handler: _GitSensorService_GetWebhookPayloadFilterDataForPipelineMaterialId_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gitSensor/service.proto", +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 99d7543aee..70ef0c5755 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -332,6 +332,9 @@ github.com/devtron-labs/authenticator/password github.com/devtron-labs/common-lib/blob-storage github.com/devtron-labs/common-lib/pubsub-lib github.com/devtron-labs/common-lib/utils +# github.com/devtron-labs/protos v0.0.0-20230307051313-ecb763b443a8 +## explicit; go 1.17 +github.com/devtron-labs/protos/gitSensor # github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f ## explicit github.com/dgryski/go-rendezvous diff --git a/wire_gen.go b/wire_gen.go index dd73964b27..524610a629 100644 --- a/wire_gen.go +++ b/wire_gen.go @@ -369,15 +369,15 @@ func InitializeApp() (*App, error) { prePostCdScriptHistoryRepositoryImpl := repository6.NewPrePostCdScriptHistoryRepositoryImpl(sugaredLogger, db) prePostCdScriptHistoryServiceImpl := history.NewPrePostCdScriptHistoryServiceImpl(sugaredLogger, prePostCdScriptHistoryRepositoryImpl, configMapRepositoryImpl, configMapHistoryServiceImpl) ciTemplateRepositoryImpl := pipelineConfig.NewCiTemplateRepositoryImpl(db, sugaredLogger) - gitSensorConfig, err := gitSensor.GetGitSensorConfig() + clientConfig, err := gitSensor.GetConfig() if err != nil { return nil, err } - gitSensorClientImpl, err := gitSensor.NewGitSensorSession(gitSensorConfig, sugaredLogger) + clientImpl, err := gitSensor.NewGitSensorClient(sugaredLogger, clientConfig) if err != nil { return nil, err } - workflowDagExecutorImpl := pipeline.NewWorkflowDagExecutorImpl(sugaredLogger, pipelineRepositoryImpl, cdWorkflowRepositoryImpl, pubSubClientServiceImpl, appServiceImpl, cdWorkflowServiceImpl, cdConfig, ciArtifactRepositoryImpl, ciPipelineRepositoryImpl, materialRepositoryImpl, pipelineOverrideRepositoryImpl, userServiceImpl, deploymentGroupRepositoryImpl, environmentRepositoryImpl, enforcerImpl, enforcerUtilImpl, tokenCache, acdAuthConfig, eventSimpleFactoryImpl, eventRESTClientImpl, cvePolicyRepositoryImpl, imageScanResultRepositoryImpl, appWorkflowRepositoryImpl, prePostCdScriptHistoryServiceImpl, argoUserServiceImpl, pipelineStatusTimelineRepositoryImpl, pipelineStatusTimelineServiceImpl, ciTemplateRepositoryImpl, ciWorkflowRepositoryImpl, appLabelRepositoryImpl, gitSensorClientImpl) + workflowDagExecutorImpl := pipeline.NewWorkflowDagExecutorImpl(sugaredLogger, pipelineRepositoryImpl, cdWorkflowRepositoryImpl, pubSubClientServiceImpl, appServiceImpl, cdWorkflowServiceImpl, cdConfig, ciArtifactRepositoryImpl, ciPipelineRepositoryImpl, materialRepositoryImpl, pipelineOverrideRepositoryImpl, userServiceImpl, deploymentGroupRepositoryImpl, environmentRepositoryImpl, enforcerImpl, enforcerUtilImpl, tokenCache, acdAuthConfig, eventSimpleFactoryImpl, eventRESTClientImpl, cvePolicyRepositoryImpl, imageScanResultRepositoryImpl, appWorkflowRepositoryImpl, prePostCdScriptHistoryServiceImpl, argoUserServiceImpl, pipelineStatusTimelineRepositoryImpl, pipelineStatusTimelineServiceImpl, ciTemplateRepositoryImpl, ciWorkflowRepositoryImpl, appLabelRepositoryImpl, clientImpl) deploymentGroupAppRepositoryImpl := repository.NewDeploymentGroupAppRepositoryImpl(sugaredLogger, db) deploymentGroupServiceImpl := deploymentGroup.NewDeploymentGroupServiceImpl(appRepositoryImpl, sugaredLogger, pipelineRepositoryImpl, ciPipelineRepositoryImpl, deploymentGroupRepositoryImpl, environmentRepositoryImpl, deploymentGroupAppRepositoryImpl, ciArtifactRepositoryImpl, appWorkflowRepositoryImpl, workflowDagExecutorImpl) deploymentConfigServiceImpl := pipeline.NewDeploymentConfigServiceImpl(sugaredLogger, envConfigOverrideRepositoryImpl, chartRepositoryImpl, pipelineRepositoryImpl, envLevelAppMetricsRepositoryImpl, appLevelMetricsRepositoryImpl, pipelineConfigRepositoryImpl, configMapRepositoryImpl, configMapHistoryServiceImpl, chartRefRepositoryImpl) @@ -401,7 +401,7 @@ func InitializeApp() (*App, error) { ciBuildConfigRepositoryImpl := pipelineConfig.NewCiBuildConfigRepositoryImpl(db, sugaredLogger) ciBuildConfigServiceImpl := pipeline.NewCiBuildConfigServiceImpl(sugaredLogger, ciBuildConfigRepositoryImpl) ciTemplateServiceImpl := pipeline.NewCiTemplateServiceImpl(sugaredLogger, ciBuildConfigServiceImpl, ciTemplateRepositoryImpl, ciTemplateOverrideRepositoryImpl) - ciCdPipelineOrchestratorImpl := pipeline.NewCiCdPipelineOrchestrator(appRepositoryImpl, sugaredLogger, materialRepositoryImpl, pipelineRepositoryImpl, ciPipelineRepositoryImpl, ciPipelineMaterialRepositoryImpl, gitSensorClientImpl, ciConfig, appWorkflowRepositoryImpl, environmentRepositoryImpl, attributesServiceImpl, appListingRepositoryImpl, appCrudOperationServiceImpl, userAuthServiceImpl, prePostCdScriptHistoryServiceImpl, prePostCiScriptHistoryServiceImpl, pipelineStageServiceImpl, ciTemplateOverrideRepositoryImpl, gitMaterialHistoryServiceImpl, ciPipelineHistoryServiceImpl, ciTemplateServiceImpl, dockerArtifactStoreRepositoryImpl) + ciCdPipelineOrchestratorImpl := pipeline.NewCiCdPipelineOrchestrator(appRepositoryImpl, sugaredLogger, materialRepositoryImpl, pipelineRepositoryImpl, ciPipelineRepositoryImpl, ciPipelineMaterialRepositoryImpl, clientImpl, ciConfig, appWorkflowRepositoryImpl, environmentRepositoryImpl, attributesServiceImpl, appListingRepositoryImpl, appCrudOperationServiceImpl, userAuthServiceImpl, prePostCdScriptHistoryServiceImpl, prePostCiScriptHistoryServiceImpl, pipelineStageServiceImpl, ciTemplateOverrideRepositoryImpl, gitMaterialHistoryServiceImpl, ciPipelineHistoryServiceImpl, ciTemplateServiceImpl, dockerArtifactStoreRepositoryImpl) propertiesConfigServiceImpl := pipeline.NewPropertiesConfigServiceImpl(sugaredLogger, envConfigOverrideRepositoryImpl, chartRepositoryImpl, utilMergeUtil, environmentRepositoryImpl, ciCdPipelineOrchestratorImpl, applicationServiceClientImpl, envLevelAppMetricsRepositoryImpl, appLevelMetricsRepositoryImpl, deploymentTemplateHistoryServiceImpl) ecrConfig, err := pipeline.GetEcrConfig() if err != nil { @@ -420,8 +420,8 @@ func InitializeApp() (*App, error) { workflowServiceImpl := pipeline.NewWorkflowServiceImpl(sugaredLogger, ciConfig, globalCMCSServiceImpl) ciServiceImpl := pipeline.NewCiServiceImpl(sugaredLogger, workflowServiceImpl, ciPipelineMaterialRepositoryImpl, ciWorkflowRepositoryImpl, ciConfig, eventRESTClientImpl, eventSimpleFactoryImpl, mergeUtil, ciPipelineRepositoryImpl, prePostCiScriptHistoryServiceImpl, pipelineStageServiceImpl, userServiceImpl, ciTemplateServiceImpl, appCrudOperationServiceImpl) ciLogServiceImpl := pipeline.NewCiLogServiceImpl(sugaredLogger, ciServiceImpl, ciConfig) - ciHandlerImpl := pipeline.NewCiHandlerImpl(sugaredLogger, ciServiceImpl, ciPipelineMaterialRepositoryImpl, gitSensorClientImpl, ciWorkflowRepositoryImpl, workflowServiceImpl, ciLogServiceImpl, ciConfig, ciArtifactRepositoryImpl, userServiceImpl, eventRESTClientImpl, eventSimpleFactoryImpl, ciPipelineRepositoryImpl, appListingRepositoryImpl, k8sUtil, pipelineRepositoryImpl, enforcerUtilImpl) - gitRegistryConfigImpl := pipeline.NewGitRegistryConfigImpl(sugaredLogger, gitProviderRepositoryImpl, gitSensorClientImpl) + ciHandlerImpl := pipeline.NewCiHandlerImpl(sugaredLogger, ciServiceImpl, ciPipelineMaterialRepositoryImpl, clientImpl, ciWorkflowRepositoryImpl, workflowServiceImpl, ciLogServiceImpl, ciConfig, ciArtifactRepositoryImpl, userServiceImpl, eventRESTClientImpl, eventSimpleFactoryImpl, ciPipelineRepositoryImpl, appListingRepositoryImpl, k8sUtil, pipelineRepositoryImpl, enforcerUtilImpl) + gitRegistryConfigImpl := pipeline.NewGitRegistryConfigImpl(sugaredLogger, gitProviderRepositoryImpl, clientImpl) dockerRegistryConfigImpl := pipeline.NewDockerRegistryConfigImpl(sugaredLogger, dockerArtifactStoreRepositoryImpl, dockerRegistryIpsConfigRepositoryImpl) appListingViewBuilderImpl := app2.NewAppListingViewBuilderImpl(sugaredLogger) linkoutsRepositoryImpl := repository.NewLinkoutsRepositoryImpl(sugaredLogger, db) @@ -434,11 +434,11 @@ func InitializeApp() (*App, error) { imageScanObjectMetaRepositoryImpl := security.NewImageScanObjectMetaRepositoryImpl(db, sugaredLogger) cveStoreRepositoryImpl := security.NewCveStoreRepositoryImpl(db, sugaredLogger) policyServiceImpl := security2.NewPolicyServiceImpl(environmentServiceImpl, sugaredLogger, appRepositoryImpl, pipelineOverrideRepositoryImpl, cvePolicyRepositoryImpl, clusterServiceImplExtended, pipelineRepositoryImpl, imageScanResultRepositoryImpl, imageScanDeployInfoRepositoryImpl, imageScanObjectMetaRepositoryImpl, httpClient, ciArtifactRepositoryImpl, ciConfig, imageScanHistoryRepositoryImpl, cveStoreRepositoryImpl, ciTemplateRepositoryImpl) - pipelineConfigRestHandlerImpl := app3.NewPipelineRestHandlerImpl(pipelineBuilderImpl, sugaredLogger, chartServiceImpl, propertiesConfigServiceImpl, dbMigrationServiceImpl, applicationServiceClientImpl, userServiceImpl, teamServiceImpl, enforcerImpl, ciHandlerImpl, validate, gitSensorClientImpl, ciPipelineRepositoryImpl, pipelineRepositoryImpl, enforcerUtilImpl, environmentServiceImpl, gitRegistryConfigImpl, dockerRegistryConfigImpl, cdHandlerImpl, appCloneServiceImpl, appWorkflowServiceImpl, materialRepositoryImpl, policyServiceImpl, imageScanResultRepositoryImpl, gitProviderRepositoryImpl, argoUserServiceImpl, ciPipelineMaterialRepositoryImpl) + pipelineConfigRestHandlerImpl := app3.NewPipelineRestHandlerImpl(pipelineBuilderImpl, sugaredLogger, chartServiceImpl, propertiesConfigServiceImpl, dbMigrationServiceImpl, applicationServiceClientImpl, userServiceImpl, teamServiceImpl, enforcerImpl, ciHandlerImpl, validate, clientImpl, ciPipelineRepositoryImpl, pipelineRepositoryImpl, enforcerUtilImpl, environmentServiceImpl, gitRegistryConfigImpl, dockerRegistryConfigImpl, cdHandlerImpl, appCloneServiceImpl, appWorkflowServiceImpl, materialRepositoryImpl, policyServiceImpl, imageScanResultRepositoryImpl, gitProviderRepositoryImpl, argoUserServiceImpl, ciPipelineMaterialRepositoryImpl) appWorkflowRestHandlerImpl := restHandler.NewAppWorkflowRestHandlerImpl(sugaredLogger, userServiceImpl, appWorkflowServiceImpl, teamServiceImpl, enforcerImpl, pipelineBuilderImpl, appRepositoryImpl, enforcerUtilImpl) webhookEventDataRepositoryImpl := repository.NewWebhookEventDataRepositoryImpl(db) webhookEventDataConfigImpl := pipeline.NewWebhookEventDataConfigImpl(sugaredLogger, webhookEventDataRepositoryImpl) - webhookDataRestHandlerImpl := restHandler.NewWebhookDataRestHandlerImpl(sugaredLogger, userServiceImpl, ciPipelineMaterialRepositoryImpl, enforcerUtilImpl, enforcerImpl, gitSensorClientImpl, webhookEventDataConfigImpl) + webhookDataRestHandlerImpl := restHandler.NewWebhookDataRestHandlerImpl(sugaredLogger, userServiceImpl, ciPipelineMaterialRepositoryImpl, enforcerUtilImpl, enforcerImpl, clientImpl, webhookEventDataConfigImpl) deployedConfigurationHistoryServiceImpl := history.NewDeployedConfigurationHistoryServiceImpl(sugaredLogger, userServiceImpl, deploymentTemplateHistoryServiceImpl, pipelineStrategyHistoryServiceImpl, configMapHistoryServiceImpl, cdWorkflowRepositoryImpl) pipelineHistoryRestHandlerImpl := restHandler.NewPipelineHistoryRestHandlerImpl(sugaredLogger, userServiceImpl, enforcerImpl, pipelineStrategyHistoryServiceImpl, deploymentTemplateHistoryServiceImpl, configMapHistoryServiceImpl, prePostCiScriptHistoryServiceImpl, prePostCdScriptHistoryServiceImpl, enforcerUtilImpl, deployedConfigurationHistoryServiceImpl) pipelineStatusTimelineRestHandlerImpl := restHandler.NewPipelineStatusTimelineRestHandlerImpl(sugaredLogger, pipelineStatusTimelineServiceImpl, enforcerUtilImpl, enforcerImpl) @@ -508,7 +508,7 @@ func InitializeApp() (*App, error) { gitProviderRouterImpl := router.NewGitProviderRouterImpl(gitProviderRestHandlerImpl) gitHostRepositoryImpl := repository.NewGitHostRepositoryImpl(db) gitHostConfigImpl := pipeline.NewGitHostConfigImpl(gitHostRepositoryImpl, sugaredLogger, attributesServiceImpl) - gitHostRestHandlerImpl := restHandler.NewGitHostRestHandlerImpl(sugaredLogger, gitHostConfigImpl, userServiceImpl, validate, enforcerImpl, gitSensorClientImpl, gitRegistryConfigImpl) + gitHostRestHandlerImpl := restHandler.NewGitHostRestHandlerImpl(sugaredLogger, gitHostConfigImpl, userServiceImpl, validate, enforcerImpl, clientImpl, gitRegistryConfigImpl) gitHostRouterImpl := router.NewGitHostRouterImpl(gitHostRestHandlerImpl) dockerRegRestHandlerImpl := restHandler.NewDockerRegRestHandlerImpl(dockerRegistryConfigImpl, sugaredLogger, gitRegistryConfigImpl, dbConfigServiceImpl, userServiceImpl, validate, enforcerImpl, teamServiceImpl, deleteServiceFullModeImpl) dockerRegRouterImpl := router.NewDockerRegRouterImpl(dockerRegRestHandlerImpl) @@ -618,7 +618,7 @@ func InitializeApp() (*App, error) { if err != nil { return nil, err } - bulkUpdateRestHandlerImpl := restHandler.NewBulkUpdateRestHandlerImpl(pipelineBuilderImpl, sugaredLogger, bulkUpdateServiceImpl, chartServiceImpl, propertiesConfigServiceImpl, dbMigrationServiceImpl, applicationServiceClientImpl, userServiceImpl, teamServiceImpl, enforcerImpl, ciHandlerImpl, validate, gitSensorClientImpl, ciPipelineRepositoryImpl, pipelineRepositoryImpl, enforcerUtilImpl, environmentServiceImpl, gitRegistryConfigImpl, dockerRegistryConfigImpl, cdHandlerImpl, appCloneServiceImpl, appWorkflowServiceImpl, materialRepositoryImpl, policyServiceImpl, imageScanResultRepositoryImpl, argoUserServiceImpl) + bulkUpdateRestHandlerImpl := restHandler.NewBulkUpdateRestHandlerImpl(pipelineBuilderImpl, sugaredLogger, bulkUpdateServiceImpl, chartServiceImpl, propertiesConfigServiceImpl, dbMigrationServiceImpl, applicationServiceClientImpl, userServiceImpl, teamServiceImpl, enforcerImpl, ciHandlerImpl, validate, clientImpl, ciPipelineRepositoryImpl, pipelineRepositoryImpl, enforcerUtilImpl, environmentServiceImpl, gitRegistryConfigImpl, dockerRegistryConfigImpl, cdHandlerImpl, appCloneServiceImpl, appWorkflowServiceImpl, materialRepositoryImpl, policyServiceImpl, imageScanResultRepositoryImpl, argoUserServiceImpl) bulkUpdateRouterImpl := router.NewBulkUpdateRouterImpl(bulkUpdateRestHandlerImpl) webhookSecretValidatorImpl := git.NewWebhookSecretValidatorImpl(sugaredLogger) webhookEventHandlerImpl := restHandler.NewWebhookEventHandlerImpl(sugaredLogger, gitHostConfigImpl, eventRESTClientImpl, webhookSecretValidatorImpl, webhookEventDataConfigImpl)