notification

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: BSD-3-Clause Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteNotification

func DeleteNotification(db database.QueryExecuter, appID, pipID, envID int64) error

DeleteNotification Delete a notifications for the given application/pipeline/environment

func GetUserEvents added in v0.4.0

func GetUserEvents(db database.QueryExecuter, pb *sdk.PipelineBuild, previous *sdk.PipelineBuild) []sdk.EventNotif

GetUserEvents returns event from user notification

func InsertOrUpdateUserNotificationSettings

func InsertOrUpdateUserNotificationSettings(db database.QueryExecuter, appID, pipID, envID int64, notif *sdk.UserNotification) error

InsertOrUpdateUserNotificationSettings insert or update value in application_pipeline_notif

func LoadAllUserNotificationSettings

func LoadAllUserNotificationSettings(db database.Querier, appID int64) ([]sdk.UserNotification, error)

LoadAllUserNotificationSettings load data from application_pipeline_notif

func LoadUserNotificationSettings

func LoadUserNotificationSettings(db database.Querier, appID, pipID, envID int64) (*sdk.UserNotification, error)

LoadUserNotificationSettings load data from application_pipeline_notif

func ParseUserNotification

func ParseUserNotification(body []byte) (*sdk.UserNotification, error)

ParseUserNotification transform jsons to UserNotificationSettings map

func ParseUserNotificationSettings

func ParseUserNotificationSettings(settings []byte) (map[sdk.UserNotificationSettingsType]sdk.UserNotificationSettings, error)

ParseUserNotificationSettings transforms json to UserNotificationSettings map

func SendMailNotif

func SendMailNotif(notif sdk.EventNotif)

SendMailNotif Send user notification by mail

func ShouldSendUserNotification

func ShouldSendUserNotification(notif sdk.UserNotificationSettings, current *sdk.PipelineBuild, previous *sdk.PipelineBuild) bool

ShouldSendUserNotification check if user notification has to be sent

Types

type UserNotificationInput

type UserNotificationInput struct {
	Notifications         map[string]interface{} `json:"notifications"`
	ApplicationPipelineID int64                  `json:"application_pipeline_id"`
	Environment           sdk.Environment        `json:"environment"`
	Pipeline              sdk.Pipeline           `json:"pipeline"`
}

UserNotificationInput is a way to parse notification

Jump to

Keyboard shortcuts

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