Documentation ¶
Index ¶
- type AppResponse
- type EnvResponse
- type NSConfig
- type NSDeleteRequest
- type NSViewResponse
- type NotificationChannelAutoResponse
- type NotificationConfigBuilder
- type NotificationConfigBuilderImpl
- func (impl NotificationConfigBuilderImpl) BuildNewNotificationSettings(notificationSettingsRequest *NotificationConfigRequest, ...) ([]repository.NotificationSettings, error)
- func (impl NotificationConfigBuilderImpl) BuildNotificationSettingWithPipeline(teamId *int, envId *int, appId *int, pipelineId *int, ...) (repository.NotificationSettings, error)
- func (impl NotificationConfigBuilderImpl) BuildNotificationSettingsConfig(notificationSettingsRequest *NotificationConfigRequest, ...) (*repository.NotificationSettingsView, error)
- type NotificationConfigRequest
- type NotificationConfigService
- type NotificationConfigServiceImpl
- func (impl *NotificationConfigServiceImpl) BuildNotificationSettingsResponse(notificationSettingViews []*repository.NotificationSettingsViewWithAppEnv) ([]*NotificationSettingsResponse, int, error)
- func (impl *NotificationConfigServiceImpl) CreateOrUpdateNotificationSettings(notificationSettingsRequest *NotificationRequest, userId int32) (int, error)
- func (impl *NotificationConfigServiceImpl) DeleteNotificationSettings(request NSDeleteRequest) error
- func (impl *NotificationConfigServiceImpl) FetchNSViewByIds(ids []*int) ([]*NSConfig, error)
- func (impl *NotificationConfigServiceImpl) FindAll(offset int, size int) ([]*repository.NotificationSettingsViewWithAppEnv, int, error)
- func (impl *NotificationConfigServiceImpl) FindNotificationSettingOptions(settingRequest *repository.SearchRequest) ([]*SearchFilterResponse, error)
- func (impl *NotificationConfigServiceImpl) UpdateNotificationSettings(notificationSettingsRequest *NotificationUpdateRequest, userId int32) (int, error)
- type NotificationRecipientListingResponse
- type NotificationRequest
- type NotificationSettingRequest
- type NotificationSettingsResponse
- type NotificationUpdateRequest
- type PipelineResponse
- type Provider
- type Providers
- type ProvidersConfig
- type SESChannelConfig
- type SESConfigDto
- type SESNotificationService
- type SESNotificationServiceImpl
- func (impl *SESNotificationServiceImpl) FetchAllSESNotificationConfig() ([]*SESConfigDto, error)
- func (impl *SESNotificationServiceImpl) FetchAllSESNotificationConfigAutocomplete() ([]*NotificationChannelAutoResponse, error)
- func (impl *SESNotificationServiceImpl) FetchSESNotificationConfigById(id int) (*SESConfigDto, error)
- func (impl *SESNotificationServiceImpl) SaveOrEditNotificationConfig(channelReq []*SESConfigDto, userId int32) ([]int, error)
- type SearchFilterResponse
- type SlackChannelConfig
- type SlackConfigDto
- type SlackNotificationService
- type SlackNotificationServiceImpl
- func (impl *SlackNotificationServiceImpl) FetchAllSlackNotificationConfig() ([]*SlackConfigDto, error)
- func (impl *SlackNotificationServiceImpl) FetchAllSlackNotificationConfigAutocomplete() ([]*NotificationChannelAutoResponse, error)
- func (impl *SlackNotificationServiceImpl) FetchSlackNotificationConfigById(id int) (*SlackConfigDto, error)
- func (impl *SlackNotificationServiceImpl) RecipientListingSuggestion(value string) ([]*NotificationRecipientListingResponse, error)
- func (impl *SlackNotificationServiceImpl) SaveOrEditNotificationConfig(channelReq []SlackConfigDto, userId int32) ([]int, error)
- type TeamResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppResponse ¶
type EnvResponse ¶
type NSConfig ¶
type NSConfig struct { TeamId []*int `json:"teamId"` AppId []*int `json:"appId"` EnvId []*int `json:"envId"` PipelineId *int `json:"pipelineId"` PipelineType util.PipelineType `json:"pipelineType" validate:"required"` EventTypeIds []int `json:"eventTypeIds" validate:"required"` Providers []*Provider `json:"providers" validate:"required"` }
type NSDeleteRequest ¶
type NSDeleteRequest struct {
Id []*int `json:"id"`
}
type NSViewResponse ¶
type NSViewResponse struct { Total int `json:"total"` NotificationSettingsResponse []*NotificationSettingsResponse `json:"settings"` }
type NotificationConfigBuilder ¶
type NotificationConfigBuilder interface { BuildNotificationSettingsConfig(notificationSettingsRequest *NotificationConfigRequest, existingNotificationSettingsConfig *repository.NotificationSettingsView, userId int32) (*repository.NotificationSettingsView, error) BuildNewNotificationSettings(notificationSettingsRequest *NotificationConfigRequest, notificationSettingsView *repository.NotificationSettingsView) ([]repository.NotificationSettings, error) BuildNotificationSettingWithPipeline(teamId *int, envId *int, appId *int, pipelineId *int, pipelineType util.PipelineType, eventTypeId int, viewId int, providers []*Provider) (repository.NotificationSettings, error) }
type NotificationConfigBuilderImpl ¶
type NotificationConfigBuilderImpl struct {
// contains filtered or unexported fields
}
func NewNotificationConfigBuilderImpl ¶
func NewNotificationConfigBuilderImpl(logger *zap.SugaredLogger) *NotificationConfigBuilderImpl
func (NotificationConfigBuilderImpl) BuildNewNotificationSettings ¶
func (impl NotificationConfigBuilderImpl) BuildNewNotificationSettings(notificationSettingsRequest *NotificationConfigRequest, notificationSettingsView *repository.NotificationSettingsView) ([]repository.NotificationSettings, error)
func (NotificationConfigBuilderImpl) BuildNotificationSettingWithPipeline ¶
func (impl NotificationConfigBuilderImpl) BuildNotificationSettingWithPipeline(teamId *int, envId *int, appId *int, pipelineId *int, pipelineType util.PipelineType, eventTypeId int, viewId int, providers []*Provider) (repository.NotificationSettings, error)
func (NotificationConfigBuilderImpl) BuildNotificationSettingsConfig ¶
func (impl NotificationConfigBuilderImpl) BuildNotificationSettingsConfig(notificationSettingsRequest *NotificationConfigRequest, existingNotificationSettingsConfig *repository.NotificationSettingsView, userId int32) (*repository.NotificationSettingsView, error)
type NotificationConfigRequest ¶
type NotificationConfigRequest struct { Id int `json:"id"` TeamId []*int `json:"teamId"` AppId []*int `json:"appId"` EnvId []*int `json:"envId"` PipelineId *int `json:"pipelineId"` PipelineType util.PipelineType `json:"pipelineType" validate:"required"` EventTypeIds []int `json:"eventTypeIds" validate:"required"` Providers []*Provider `json:"providers"` }
type NotificationConfigService ¶
type NotificationConfigService interface { CreateOrUpdateNotificationSettings(notificationSettingsRequest *NotificationRequest, userId int32) (int, error) FindAll(offset int, size int) ([]*repository.NotificationSettingsViewWithAppEnv, int, error) BuildNotificationSettingsResponse(notificationSettings []*repository.NotificationSettingsViewWithAppEnv) ([]*NotificationSettingsResponse, int, error) DeleteNotificationSettings(request NSDeleteRequest) error FindNotificationSettingOptions(request *repository.SearchRequest) ([]*SearchFilterResponse, error) UpdateNotificationSettings(notificationSettingsRequest *NotificationUpdateRequest, userId int32) (int, error) FetchNSViewByIds(ids []*int) ([]*NSConfig, error) }
type NotificationConfigServiceImpl ¶
type NotificationConfigServiceImpl struct {
// contains filtered or unexported fields
}
func NewNotificationConfigServiceImpl ¶
func NewNotificationConfigServiceImpl(logger *zap.SugaredLogger, notificationSettingsRepository repository.NotificationSettingsRepository, notificationConfigBuilder NotificationConfigBuilder, ciPipelineRepository pipelineConfig.CiPipelineRepository, pipelineRepository pipelineConfig.PipelineRepository, slackRepository repository.SlackNotificationRepository, sesRepository repository.SESNotificationRepository, teamRepository team.TeamRepository, environmentRepository cluster.EnvironmentRepository, appRepository pipelineConfig.AppRepository, userRepository repository.UserRepository, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository) *NotificationConfigServiceImpl
func (*NotificationConfigServiceImpl) BuildNotificationSettingsResponse ¶
func (impl *NotificationConfigServiceImpl) BuildNotificationSettingsResponse(notificationSettingViews []*repository.NotificationSettingsViewWithAppEnv) ([]*NotificationSettingsResponse, int, error)
func (*NotificationConfigServiceImpl) CreateOrUpdateNotificationSettings ¶
func (impl *NotificationConfigServiceImpl) CreateOrUpdateNotificationSettings(notificationSettingsRequest *NotificationRequest, userId int32) (int, error)
func (*NotificationConfigServiceImpl) DeleteNotificationSettings ¶
func (impl *NotificationConfigServiceImpl) DeleteNotificationSettings(request NSDeleteRequest) error
func (*NotificationConfigServiceImpl) FetchNSViewByIds ¶
func (impl *NotificationConfigServiceImpl) FetchNSViewByIds(ids []*int) ([]*NSConfig, error)
func (*NotificationConfigServiceImpl) FindAll ¶
func (impl *NotificationConfigServiceImpl) FindAll(offset int, size int) ([]*repository.NotificationSettingsViewWithAppEnv, int, error)
func (*NotificationConfigServiceImpl) FindNotificationSettingOptions ¶
func (impl *NotificationConfigServiceImpl) FindNotificationSettingOptions(settingRequest *repository.SearchRequest) ([]*SearchFilterResponse, error)
func (*NotificationConfigServiceImpl) UpdateNotificationSettings ¶
func (impl *NotificationConfigServiceImpl) UpdateNotificationSettings(notificationSettingsRequest *NotificationUpdateRequest, userId int32) (int, error)
type NotificationRequest ¶
type NotificationRequest struct { UpdateType util.UpdateType `json:"updateType,omitempty"` SesConfigId int `json:"sesConfigId,omitempty"` Providers []*Provider `json:"providers"` NotificationConfigRequest []*NotificationConfigRequest `json:"notificationConfigRequest" validate:"required"` }
type NotificationSettingRequest ¶
type NotificationSettingRequest struct { Id int `json:"id"` TeamId int `json:"teamId"` AppId *int `json:"appId"` EnvId *int `json:"envId"` //Pipelines []int `json:"pipelineIds"` PipelineType util.PipelineType `json:"pipelineType" validate:"required"` EventTypeIds []int `json:"eventTypeIds" validate:"required"` Providers []Provider `json:"providers" validate:"required"` }
type NotificationSettingsResponse ¶
type NotificationSettingsResponse struct { Id int `json:"id"` ConfigName string `json:"configName"` TeamResponse []*TeamResponse `json:"team"` AppResponse []*AppResponse `json:"app"` EnvResponse []*EnvResponse `json:"environment"` PipelineResponse *PipelineResponse `json:"pipeline"` PipelineType string `json:"pipelineType"` ProvidersConfig []*ProvidersConfig `json:"providerConfigs"` EventTypes []int `json:"eventTypes"` }
type NotificationUpdateRequest ¶
type NotificationUpdateRequest struct { UpdateType util.UpdateType `json:"updateType,omitempty"` NotificationConfigRequest []*NotificationConfigRequest `json:"notificationConfigRequest" validate:"required"` }
type PipelineResponse ¶
type ProvidersConfig ¶
type SESChannelConfig ¶
type SESChannelConfig struct { Channel util2.Channel `json:"channel" validate:"required"` SESConfigDtos []*SESConfigDto `json:"configs"` }
type SESConfigDto ¶
type SESConfigDto struct { OwnerId int32 `json:"userId" validate:"number"` TeamId int `json:"teamId" validate:"number"` Region string `json:"region" validate:"required"` AccessKey string `json:"accessKey" validate:"required"` SecretKey string `json:"secretKey" validate:"required"` FromEmail string `json:"fromEmail" validate:"email,required"` ToEmail string `json:"toEmail"` SessionToken string `json:"sessionToken"` ConfigName string `json:"configName" validate:"required"` Description string `json:"description"` Id int `json:"id" validate:"number"` Default bool `json:"default,notnull"` }
type SESNotificationService ¶
type SESNotificationService interface { SaveOrEditNotificationConfig(channelReq []*SESConfigDto, userId int32) ([]int, error) FetchSESNotificationConfigById(id int) (*SESConfigDto, error) FetchAllSESNotificationConfig() ([]*SESConfigDto, error) FetchAllSESNotificationConfigAutocomplete() ([]*NotificationChannelAutoResponse, error) }
type SESNotificationServiceImpl ¶
type SESNotificationServiceImpl struct {
// contains filtered or unexported fields
}
func NewSESNotificationServiceImpl ¶
func NewSESNotificationServiceImpl(logger *zap.SugaredLogger, sesRepository repository.SESNotificationRepository, teamService team.TeamService) *SESNotificationServiceImpl
func (*SESNotificationServiceImpl) FetchAllSESNotificationConfig ¶
func (impl *SESNotificationServiceImpl) FetchAllSESNotificationConfig() ([]*SESConfigDto, error)
func (*SESNotificationServiceImpl) FetchAllSESNotificationConfigAutocomplete ¶
func (impl *SESNotificationServiceImpl) FetchAllSESNotificationConfigAutocomplete() ([]*NotificationChannelAutoResponse, error)
func (*SESNotificationServiceImpl) FetchSESNotificationConfigById ¶
func (impl *SESNotificationServiceImpl) FetchSESNotificationConfigById(id int) (*SESConfigDto, error)
func (*SESNotificationServiceImpl) SaveOrEditNotificationConfig ¶
func (impl *SESNotificationServiceImpl) SaveOrEditNotificationConfig(channelReq []*SESConfigDto, userId int32) ([]int, error)
type SearchFilterResponse ¶
type SearchFilterResponse struct { TeamResponse []*TeamResponse `json:"team"` AppResponse []*AppResponse `json:"app"` EnvResponse []*EnvResponse `json:"environment"` PipelineResponse *PipelineResponse `json:"pipeline"` PipelineType string `json:"pipelineType"` }
type SlackChannelConfig ¶
type SlackChannelConfig struct { Channel util2.Channel `json:"channel" validate:"required"` SlackConfigDtos []SlackConfigDto `json:"configs"` }
type SlackConfigDto ¶
type SlackConfigDto struct { OwnerId int32 `json:"userId" validate:"number"` TeamId int `json:"teamId" validate:"required"` WebhookUrl string `json:"webhookUrl" validate:"required"` ConfigName string `json:"configName" validate:"required"` Description string `json:"description"` Id int `json:"id" validate:"number"` }
type SlackNotificationService ¶
type SlackNotificationService interface { SaveOrEditNotificationConfig(channelReq []SlackConfigDto, userId int32) ([]int, error) FetchSlackNotificationConfigById(id int) (*SlackConfigDto, error) FetchAllSlackNotificationConfig() ([]*SlackConfigDto, error) FetchAllSlackNotificationConfigAutocomplete() ([]*NotificationChannelAutoResponse, error) RecipientListingSuggestion(value string) ([]*NotificationRecipientListingResponse, error) }
type SlackNotificationServiceImpl ¶
type SlackNotificationServiceImpl struct {
// contains filtered or unexported fields
}
func NewSlackNotificationServiceImpl ¶
func NewSlackNotificationServiceImpl(logger *zap.SugaredLogger, slackRepository repository.SlackNotificationRepository, teamService team.TeamService, userRepository repository.UserRepository, notificationSettingsRepository repository.NotificationSettingsRepository) *SlackNotificationServiceImpl
func (*SlackNotificationServiceImpl) FetchAllSlackNotificationConfig ¶
func (impl *SlackNotificationServiceImpl) FetchAllSlackNotificationConfig() ([]*SlackConfigDto, error)
func (*SlackNotificationServiceImpl) FetchAllSlackNotificationConfigAutocomplete ¶
func (impl *SlackNotificationServiceImpl) FetchAllSlackNotificationConfigAutocomplete() ([]*NotificationChannelAutoResponse, error)
func (*SlackNotificationServiceImpl) FetchSlackNotificationConfigById ¶
func (impl *SlackNotificationServiceImpl) FetchSlackNotificationConfigById(id int) (*SlackConfigDto, error)
func (*SlackNotificationServiceImpl) RecipientListingSuggestion ¶
func (impl *SlackNotificationServiceImpl) RecipientListingSuggestion(value string) ([]*NotificationRecipientListingResponse, error)
func (*SlackNotificationServiceImpl) SaveOrEditNotificationConfig ¶
func (impl *SlackNotificationServiceImpl) SaveOrEditNotificationConfig(channelReq []SlackConfigDto, userId int32) ([]int, error)
type TeamResponse ¶
Click to show internal directories.
Click to hide internal directories.