beans

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const SES_CONFIG_TYPE = "ses"
View Source
const SLACK_CONFIG_TYPE = "slack"
View Source
const SLACK_URL = "https://hooks.slack.com/"
View Source
const SMTP_CONFIG_TYPE = "smtp"
View Source
const WEBHOOK_CONFIG_TYPE = "webhook"
View Source
const WEBHOOK_URL = "https://"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppResponse

type AppResponse struct {
	Id   *int   `json:"id"`
	Name string `json:"name"`
}

type ClusterResponse

type ClusterResponse struct {
	Id   *int   `json:"id"`
	Name string `json:"name"`
}

type EnvResponse

type EnvResponse struct {
	Id   *int   `json:"id"`
	Name string `json:"name"`
}

type LocalRequest

type LocalRequest struct {
	Id         int  `json:"id"`
	TeamId     *int `json:"teamId"`
	AppId      *int `json:"appId"`
	EnvId      *int `json:"envId"`
	PipelineId *int `json:"pipelineId"`
	ClusterId  *int `json:"clusterId"`
}

type NSConfig

type NSConfig struct {
	TeamId       []*int            `json:"teamId"`
	AppId        []*int            `json:"appId"`
	EnvId        []*int            `json:"envId"`
	PipelineId   *int              `json:"pipelineId"`
	ClusterId    []*int            `json:"clusterId"`
	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 NotificationChannelAutoResponse

type NotificationChannelAutoResponse struct {
	ConfigName string `json:"configName"`
	Id         int    `json:"id"`
	TeamId     int    `json:"-"`
}

type NotificationConfigRequest

type NotificationConfigRequest struct {
	Id int `json:"id"`

	TeamId    []*int `json:"teamId"`
	AppId     []*int `json:"appId"`
	EnvId     []*int `json:"envId"`
	ClusterId []*int `json:"clusterId"`

	PipelineId   *int              `json:"pipelineId"`
	PipelineType util.PipelineType `json:"pipelineType" validate:"required"`
	EventTypeIds []int             `json:"eventTypeIds" validate:"required"`
	Providers    []*Provider       `json:"providers"`
}

func (*NotificationConfigRequest) GenerateSettingCombinations

func (notificationConfigRequest *NotificationConfigRequest) GenerateSettingCombinations() []*LocalRequest

GenerateSettingCombinations if new criteria is added , add a similar condition for that criteria index below

func (*NotificationConfigRequest) GenerateSettingCombinationsV1

func (notificationSettingsRequest *NotificationConfigRequest) GenerateSettingCombinationsV1() []*LocalRequest

func (*NotificationConfigRequest) GetIdsByTypeIndex

func (notificationConfigRequest *NotificationConfigRequest) GetIdsByTypeIndex(index selectorIndex) []*int

GetIdsByTypeIndex if new criteria fields are added, add a case to this function

type NotificationRecipientListingResponse

type NotificationRecipientListingResponse struct {
	Dest      util.Channel `json:"dest"`
	ConfigId  int          `json:"configId"`
	Recipient string       `json:"recipient"`
}

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"`
	ClusterResponse  []*ClusterResponse `json:"cluster"`
	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 PipelineResponse struct {
	Id              *int     `json:"id"`
	Name            string   `json:"name"`
	EnvironmentName string   `json:"environmentName,omitempty"`
	AppName         string   `json:"appName,omitempty"`
	Branches        []string `json:"branches,omitempty"`
	ClusterName     string   `json:"clusterName"`
}

type Provider

type Provider struct {
	Destination util.Channel `json:"dest"`
	Rule        string       `json:"rule"`
	ConfigId    int          `json:"configId"`
	Recipient   string       `json:"recipient"`
}

type Providers

type Providers struct {
	Providers []Provider `json:"providers"`
}

type ProvidersConfig

type ProvidersConfig struct {
	Id         int    `json:"id"`
	Dest       string `json:"dest"`
	ConfigName string `json:"name"`
	Recipient  string `json:"recipient"`
}

type SESChannelConfig

type SESChannelConfig struct {
	Channel       util.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 SMTPChannelConfig

type SMTPChannelConfig struct {
	Channel        util.Channel     `json:"channel" validate:"required"`
	SMTPConfigDtos []*SMTPConfigDto `json:"configs"`
}

type SMTPConfigDto

type SMTPConfigDto struct {
	Id           int    `json:"id"`
	Port         string `json:"port"`
	Host         string `json:"host"`
	AuthType     string `json:"authType"`
	AuthUser     string `json:"authUser"`
	AuthPassword string `json:"authPassword"`
	FromEmail    string `json:"fromEmail"`
	ConfigName   string `json:"configName"`
	Description  string `json:"description"`
	OwnerId      int32  `json:"ownerId"`
	Default      bool   `json:"default"`
	Deleted      bool   `json:"deleted"`
}

type SearchFilterResponse

type SearchFilterResponse struct {
	TeamResponse     []*TeamResponse    `json:"team"`
	AppResponse      []*AppResponse     `json:"app"`
	EnvResponse      []*EnvResponse     `json:"environment"`
	ClusterResponse  []*ClusterResponse `json:"cluster"`
	PipelineResponse *PipelineResponse  `json:"pipeline"`
	PipelineType     string             `json:"pipelineType"`
}

type SlackChannelConfig

type SlackChannelConfig struct {
	Channel         util.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 TeamResponse

type TeamResponse struct {
	Id   *int   `json:"id"`
	Name string `json:"name"`
}

type WebhookChannelConfig

type WebhookChannelConfig struct {
	Channel           util.Channel        `json:"channel" validate:"required"`
	WebhookConfigDtos *[]WebhookConfigDto `json:"configs"`
}

type WebhookConfigDto

type WebhookConfigDto struct {
	OwnerId     int32                  `json:"userId" validate:"number"`
	WebhookUrl  string                 `json:"webhookUrl" validate:"required"`
	ConfigName  string                 `json:"configName" validate:"required"`
	Header      map[string]interface{} `json:"header"`
	Payload     string                 `json:"payload"`
	Description string                 `json:"description"`
	Id          int                    `json:"id" validate:"number"`
}

type WebhookVariable

type WebhookVariable string
const (
	// these fields will be configurable in future
	DevtronContainerImageTag  WebhookVariable = "{{devtronContainerImageTag}}"
	DevtronContainerImageRepo WebhookVariable = "{{devtronContainerImageRepo}}"
	DevtronAppName            WebhookVariable = "{{devtronAppName}}"
	DevtronAppId              WebhookVariable = "{{devtronAppId}}"
	DevtronEnvName            WebhookVariable = "{{devtronEnvName}}"
	DevtronEnvId              WebhookVariable = "{{devtronEnvId}}"
	DevtronCiPipelineId       WebhookVariable = "{{devtronCiPipelineId}}"
	DevtronCdPipelineId       WebhookVariable = "{{devtronCdPipelineId}}"
	DevtronTriggeredByEmail   WebhookVariable = "{{devtronTriggeredByEmail}}"
	EventType                 WebhookVariable = "{{eventType}}"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL