 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type CiPipelineMaterialResponse
- type Event
- type EventClient
- type EventClientConfig
- type EventFactory
- type EventRESTClientImpl
- func (impl *EventRESTClientImpl) SendEvent(event Event) (bool, error)
- func (impl *EventRESTClientImpl) SendTestSuite(reqBody []byte) (bool, error)
- func (impl *EventRESTClientImpl) WriteEvent(event Event) (bool, error)
- func (impl *EventRESTClientImpl) WriteNatsEvent(channel string, payload interface{}) error
 
- type EventSimpleFactoryImpl
- func (impl *EventSimpleFactoryImpl) Build(eventType util.EventType, sourceId *int, appId int, envId *int, ...) Event
- func (impl *EventSimpleFactoryImpl) BuildExtraCDData(event Event, wfr *pipelineConfig.CdWorkflowRunner, pipelineOverrideId int, ...) Event
- func (impl *EventSimpleFactoryImpl) BuildExtraCIData(event Event, material *MaterialTriggerInfo, dockerImage string) Event
 
- type MaterialTriggerInfo
- type Payload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CiPipelineMaterialResponse ¶
type CiPipelineMaterialResponse struct {
	Id              int                    `json:"id"`
	GitMaterialId   int                    `json:"gitMaterialId"`
	GitMaterialUrl  string                 `json:"gitMaterialUrl"`
	GitMaterialName string                 `json:"gitMaterialName"`
	Type            string                 `json:"type"`
	Value           string                 `json:"value"`
	Active          bool                   `json:"active"`
	History         []*gitSensor.GitCommit `json:"history,omitempty"`
	LastFetchTime   time.Time              `json:"lastFetchTime"`
	IsRepoError     bool                   `json:"isRepoError"`
	RepoErrorMsg    string                 `json:"repoErrorMsg"`
	IsBranchError   bool                   `json:"isBranchError"`
	BranchErrorMsg  string                 `json:"branchErrorMsg"`
	Url             string                 `json:"url"`
}
    type Event ¶
type Event struct {
	EventTypeId        int                 `json:"eventTypeId"`
	EventName          string              `json:"eventName"`
	PipelineId         int                 `json:"pipelineId"`
	PipelineType       string              `json:"pipelineType"`
	CorrelationId      string              `json:"correlationId"`
	Payload            *Payload            `json:"payload"`
	EventTime          string              `json:"eventTime"`
	TeamId             int                 `json:"teamId"`
	AppId              int                 `json:"appId"`
	EnvId              int                 `json:"envId"`
	CdWorkflowType     bean.CdWorkflowType `json:"cdWorkflowType,omitempty"`
	CdWorkflowRunnerId int                 `json:"cdWorkflowRunnerId"`
	CiWorkflowRunnerId int                 `json:"ciWorkflowRunnerId"`
	CiArtifactId       int                 `json:"ciArtifactId"`
	BaseUrl            string              `json:"baseUrl"`
	UserId             int                 `json:"-"`
}
    type EventClient ¶
type EventClientConfig ¶
type EventClientConfig struct {
	DestinationURL string `env:"EVENT_URL" envDefault:"http://localhost:3000/notify"`
	TestSuitURL    string `env:"TEST_SUIT_URL" envDefault:"http://localhost:3000"`
}
    func GetEventClientConfig ¶
func GetEventClientConfig() (*EventClientConfig, error)
type EventFactory ¶
type EventFactory interface {
	Build(eventType util.EventType, sourceId *int, appId int, envId *int, pipelineType util.PipelineType) Event
	BuildExtraCDData(event Event, wfr *pipelineConfig.CdWorkflowRunner, pipelineOverrideId int, stage bean2.CdWorkflowType) Event
	BuildExtraCIData(event Event, material *MaterialTriggerInfo, dockerImage string) Event
}
    type EventRESTClientImpl ¶
type EventRESTClientImpl struct {
	// contains filtered or unexported fields
}
    func NewEventRESTClientImpl ¶
func NewEventRESTClientImpl(logger *zap.SugaredLogger, client *http.Client, config *EventClientConfig, pubsubClient *pubsub.PubSubClient, ciPipelineRepository pipelineConfig.CiPipelineRepository, pipelineRepository pipelineConfig.PipelineRepository, attributesRepository repository.AttributesRepository) *EventRESTClientImpl
func (*EventRESTClientImpl) SendEvent ¶
func (impl *EventRESTClientImpl) SendEvent(event Event) (bool, error)
func (*EventRESTClientImpl) SendTestSuite ¶
func (impl *EventRESTClientImpl) SendTestSuite(reqBody []byte) (bool, error)
func (*EventRESTClientImpl) WriteEvent ¶
func (impl *EventRESTClientImpl) WriteEvent(event Event) (bool, error)
func (*EventRESTClientImpl) WriteNatsEvent ¶
func (impl *EventRESTClientImpl) WriteNatsEvent(channel string, payload interface{}) error
type EventSimpleFactoryImpl ¶
type EventSimpleFactoryImpl struct {
	// contains filtered or unexported fields
}
    func NewEventSimpleFactoryImpl ¶
func NewEventSimpleFactoryImpl(logger *zap.SugaredLogger, cdWorkflowRepository pipelineConfig.CdWorkflowRepository, pipelineOverrideRepository chartConfig.PipelineOverrideRepository, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, pipelineRepository pipelineConfig.PipelineRepository, userRepository repository.UserRepository) *EventSimpleFactoryImpl
func (*EventSimpleFactoryImpl) Build ¶
func (impl *EventSimpleFactoryImpl) Build(eventType util.EventType, sourceId *int, appId int, envId *int, pipelineType util.PipelineType) Event
func (*EventSimpleFactoryImpl) BuildExtraCDData ¶
func (impl *EventSimpleFactoryImpl) BuildExtraCDData(event Event, wfr *pipelineConfig.CdWorkflowRunner, pipelineOverrideId int, stage bean2.CdWorkflowType) Event
func (*EventSimpleFactoryImpl) BuildExtraCIData ¶
func (impl *EventSimpleFactoryImpl) BuildExtraCIData(event Event, material *MaterialTriggerInfo, dockerImage string) Event
type MaterialTriggerInfo ¶
type MaterialTriggerInfo struct {
	GitTriggers map[int]pipelineConfig.GitCommit `json:"gitTriggers"`
	CiMaterials []CiPipelineMaterialResponse     `json:"ciMaterials"`
}
    type Payload ¶
type Payload struct {
	AppName               string               `json:"appName"`
	EnvName               string               `json:"envName"`
	PipelineName          string               `json:"pipelineName"`
	Source                string               `json:"source"`
	DockerImageUrl        string               `json:"dockerImageUrl"`
	TriggeredBy           string               `json:"triggeredBy"`
	Stage                 string               `json:"stage"`
	DeploymentHistoryLink string               `json:"deploymentHistoryLink"`
	AppDetailLink         string               `json:"appDetailLink"`
	DownloadLink          string               `json:"downloadLink"`
	BuildHistoryLink      string               `json:"buildHistoryLink"`
	MaterialTriggerInfo   *MaterialTriggerInfo `json:"material"`
}
     Click to show internal directories. 
   Click to hide internal directories.