Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusDeployed string = "deployed" StatusFailed string = "failed" )
Variables ¶
This section is empty.
Functions ¶
func TokenToSlackIntegration ¶
func TokenToSlackIntegration(token *oauth2.Token) (*integrations.SlackIntegration, error)
Types ¶
type DeploymentStatus ¶
type DeploymentStatus string
type Notifier ¶
type Notifier interface {
Notify(opts *NotifyOpts) error
}
func NewSlackNotifier ¶
func NewSlackNotifier(conf *models.NotificationConfigExternal, slackInts ...*integrations.SlackIntegration) Notifier
type NotifyOpts ¶
type NotifyOpts struct { // ProjectID is the id of the Porter project that this deployment belongs to ProjectID uint // ClusterID is the id of the Porter cluster that this deployment belongs to ClusterID uint // ClusterName is the name of the cluster that this deployment was deployed in ClusterName string // Status is the current status of the deployment. Status string // Info is any additional information about this status, such as an error message if // the deployment failed. Info string // Name is the name of the deployment that this notification refers to. Name string // Namespace is the Kubernetes namespace of the deployment that this notification refers to. Namespace string URL string Version int }
type SlackBlock ¶
type SlackNotifier ¶
type SlackNotifier struct { Config *models.NotificationConfigExternal // contains filtered or unexported fields }
func (*SlackNotifier) Notify ¶
func (s *SlackNotifier) Notify(opts *NotifyOpts) error
type SlackPayload ¶
type SlackPayload struct {
Blocks []*SlackBlock `json:"blocks"`
}
Click to show internal directories.
Click to hide internal directories.