Documentation ¶
Index ¶
- type CiPipelineMaterial
- type ClientRequest
- type CommitMetadataRequest
- type FetchScmChangesRequest
- type GitCommit
- type GitMaterial
- type GitProvider
- type GitSensorApiError
- type GitSensorClient
- type GitSensorClientImpl
- func (session GitSensorClientImpl) AddRepo(material []*GitMaterial) (materialRes []*GitMaterial, err error)
- func (session GitSensorClientImpl) FetchChanges(changeRequest *FetchScmChangesRequest) (materialChangeResp *MaterialChangeResp, err error)
- func (session GitSensorClientImpl) GetAllWebhookEventConfigForHost(req *WebhookEventConfigRequest) (webhookEvents []*WebhookEventConfig, err error)
- func (session GitSensorClientImpl) GetCommitMetadata(commitMetadataRequest *CommitMetadataRequest) (*GitCommit, error)
- func (session GitSensorClientImpl) GetCommitMetadataForPipelineMaterial(commitMetadataRequest *CommitMetadataRequest) (commit *GitCommit, err error)
- func (session GitSensorClientImpl) GetHeadForPipelineMaterials(req *HeadRequest) (material []*CiPipelineMaterial, err error)
- func (session GitSensorClientImpl) GetWebhookData(req *WebhookDataRequest) (*WebhookData, error)
- func (session GitSensorClientImpl) GetWebhookEventConfig(req *WebhookEventConfigRequest) (webhookEvent *WebhookEventConfig, err error)
- func (session GitSensorClientImpl) GetWebhookPayloadDataForPipelineMaterialId(req *WebhookPayloadDataRequest) (response *WebhookPayloadDataResponse, err error)
- func (session GitSensorClientImpl) GetWebhookPayloadFilterDataForPipelineMaterialId(req *WebhookPayloadFilterDataRequest) (response *WebhookPayloadFilterDataResponse, err error)
- func (session GitSensorClientImpl) RefreshGitMaterial(req *RefreshGitMaterialRequest) (refreshRes *RefreshGitMaterialResponse, err error)
- func (session GitSensorClientImpl) SaveGitProvider(provider *GitProvider) (providerRes *GitProvider, err error)
- func (session GitSensorClientImpl) SavePipelineMaterial(material []*CiPipelineMaterial) (materialRes []*CiPipelineMaterial, err error)
- func (session GitSensorClientImpl) UpdateRepo(material *GitMaterial) (materialRes *GitMaterial, err error)
- type GitSensorConfig
- type GitSensorResponse
- type HeadRequest
- type MaterialChangeResp
- type RefreshGitMaterialRequest
- type RefreshGitMaterialResponse
- type SourceType
- type StatusCode
- type WebhookData
- type WebhookDataRequest
- type WebhookEventConfig
- type WebhookEventConfigRequest
- type WebhookEventSelectors
- type WebhookPayloadDataPayloadsResponse
- type WebhookPayloadDataRequest
- type WebhookPayloadDataResponse
- type WebhookPayloadFilterDataRequest
- type WebhookPayloadFilterDataResponse
- type WebhookPayloadFilterDataSelectorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CiPipelineMaterial ¶
type ClientRequest ¶
type CommitMetadataRequest ¶
type FetchScmChangesRequest ¶
type FetchScmChangesRequest struct { PipelineMaterialId int `json:"pipelineMaterialId"` From string `json:"from"` To string `json:"to"` }
---------------
type GitMaterial ¶
type GitProvider ¶
type GitSensorApiError ¶
type GitSensorClient ¶
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) GetWebhookData(req *WebhookDataRequest) (*WebhookData, error) 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) }
type GitSensorClientImpl ¶
type GitSensorClientImpl struct {
// contains filtered or unexported fields
}
func NewGitSensorSession ¶
func NewGitSensorSession(config *GitSensorConfig, logger *zap.SugaredLogger) (session *GitSensorClientImpl, err error)
func (GitSensorClientImpl) AddRepo ¶
func (session GitSensorClientImpl) AddRepo(material []*GitMaterial) (materialRes []*GitMaterial, err error)
func (GitSensorClientImpl) FetchChanges ¶
func (session GitSensorClientImpl) FetchChanges(changeRequest *FetchScmChangesRequest) (materialChangeResp *MaterialChangeResp, err error)
func (GitSensorClientImpl) GetAllWebhookEventConfigForHost ¶ added in v0.2.22
func (session GitSensorClientImpl) GetAllWebhookEventConfigForHost(req *WebhookEventConfigRequest) (webhookEvents []*WebhookEventConfig, err error)
func (GitSensorClientImpl) GetCommitMetadata ¶
func (session GitSensorClientImpl) GetCommitMetadata(commitMetadataRequest *CommitMetadataRequest) (*GitCommit, error)
func (GitSensorClientImpl) GetCommitMetadataForPipelineMaterial ¶ added in v0.4.28
func (session GitSensorClientImpl) GetCommitMetadataForPipelineMaterial(commitMetadataRequest *CommitMetadataRequest) (commit *GitCommit, err error)
func (GitSensorClientImpl) GetHeadForPipelineMaterials ¶
func (session GitSensorClientImpl) GetHeadForPipelineMaterials(req *HeadRequest) (material []*CiPipelineMaterial, err error)
func (GitSensorClientImpl) GetWebhookData ¶ added in v0.2.22
func (session GitSensorClientImpl) GetWebhookData(req *WebhookDataRequest) (*WebhookData, error)
func (GitSensorClientImpl) GetWebhookEventConfig ¶ added in v0.2.22
func (session GitSensorClientImpl) GetWebhookEventConfig(req *WebhookEventConfigRequest) (webhookEvent *WebhookEventConfig, err error)
func (GitSensorClientImpl) GetWebhookPayloadDataForPipelineMaterialId ¶ added in v0.2.27
func (session GitSensorClientImpl) GetWebhookPayloadDataForPipelineMaterialId(req *WebhookPayloadDataRequest) (response *WebhookPayloadDataResponse, err error)
func (GitSensorClientImpl) GetWebhookPayloadFilterDataForPipelineMaterialId ¶ added in v0.2.27
func (session GitSensorClientImpl) GetWebhookPayloadFilterDataForPipelineMaterialId(req *WebhookPayloadFilterDataRequest) (response *WebhookPayloadFilterDataResponse, err error)
func (GitSensorClientImpl) RefreshGitMaterial ¶
func (session GitSensorClientImpl) RefreshGitMaterial(req *RefreshGitMaterialRequest) (refreshRes *RefreshGitMaterialResponse, err error)
func (GitSensorClientImpl) SaveGitProvider ¶
func (session GitSensorClientImpl) SaveGitProvider(provider *GitProvider) (providerRes *GitProvider, err error)
func (GitSensorClientImpl) SavePipelineMaterial ¶
func (session GitSensorClientImpl) SavePipelineMaterial(material []*CiPipelineMaterial) (materialRes []*CiPipelineMaterial, err error)
func (GitSensorClientImpl) UpdateRepo ¶
func (session GitSensorClientImpl) UpdateRepo(material *GitMaterial) (materialRes *GitMaterial, err error)
type GitSensorConfig ¶
type GitSensorConfig struct { Url string `env:"GIT_SENSOR_URL" envDefault:"http://localhost:9999"` Timeout int `env:"GIT_SENSOR_TIMEOUT" envDefault:"0"` // in seconds }
----------------------impl
func GetGitSensorConfig ¶
func GetGitSensorConfig() (*GitSensorConfig, error)
type GitSensorResponse ¶
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 HeadRequest ¶
type HeadRequest struct {
MaterialIds []int `json:"materialIds"`
}
type MaterialChangeResp ¶
type RefreshGitMaterialRequest ¶
type RefreshGitMaterialRequest struct {
GitMaterialId int `json:"gitMaterialId"`
}
type SourceType ¶
type SourceType string
type StatusCode ¶
type StatusCode int
func (StatusCode) IsSuccess ¶
func (code StatusCode) IsSuccess() bool
type WebhookData ¶ added in v0.2.22
type WebhookDataRequest ¶ added in v0.2.22
type WebhookDataRequest struct {
Id int `json:"id"`
}
type WebhookEventConfig ¶ added in v0.2.22
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 WebhookEventConfigRequest ¶ added in v0.2.22
type WebhookEventSelectors ¶ added in v0.2.22
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 WebhookPayloadDataPayloadsResponse ¶ added in v0.2.27
type WebhookPayloadDataRequest ¶ added in v0.2.27
type WebhookPayloadDataResponse ¶ added in v0.2.27
type WebhookPayloadDataResponse struct { Filters map[string]string `json:"filters"` RepositoryUrl string `json:"repositoryUrl"` Payloads []*WebhookPayloadDataPayloadsResponse `json:"payloads"` }
type WebhookPayloadFilterDataRequest ¶ added in v0.2.27
type WebhookPayloadFilterDataResponse ¶ added in v0.2.27
type WebhookPayloadFilterDataResponse struct { PayloadId int `json:"payloadId"` PayloadJson string `json:"payloadJson"` SelectorsData []*WebhookPayloadFilterDataSelectorResponse `json:"selectorsData"` }
Click to show internal directories.
Click to hide internal directories.