Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Subject is a string: // Successful or Errored: <service name>. Subject = "%s: %s" // From defines the address of the sender. From = "Caicloud CI <%s>" // ContentType defines the contentType of the email. ContentType = "text/html" // WebServiceURL defines the url of cyclone. // TODO: Move the definitions of cyclone Port in main to utils package and remove this const var. WebServiceURL = "http://localhost:7099" // SUCCESSTEMPLATE defines the env var, which points to the template. SUCCESSTEMPLATE = "SUCCESSTEMPLATE" // ERRORTEMPLATE defines the env var, which points to the template. ERRORTEMPLATE = "ERRORTEMPLATE" // UsernameVarName defines the username in the template. UsernameVarName = "$$USERNAME" // ServiceNameVarName defines the service name in the template. ServiceNameVarName = "$$SERVICENAME" // RepoURLVarName defines the URL of the repo in the template. RepoURLVarName = "$$REPOURL" // CommitIDVarName defines the commitID in the template. CommitIDVarName = "$$COMMITID" // LogVarName defines the log name in the template. LogVarName = "$$LOG" // DeployStatusVarName defines the deploy status in the template. DeployStatusVarName = "$$DEPLOYSTATUS" // DeployPlanStatusVarName defines the deploy plan status in the template. DeployPlanStatusVarName = "$$DEPLOYPLANSTATUS" )
Variables ¶
View Source
var ( // SuccessFilename is the file name for SUCCESSTEMPLATE. SuccessFilename string // ErrorFilename is the file name for ERRORTEMPLATE. ErrorFilename string // SuccessfulBody defines the body of the email when the version is successful. SuccessfulBody string // ErroredBody defines the body of the email when the version is failed. ErroredBody string )
Functions ¶
This section is empty.
Types ¶
type EmailNotifier ¶
type EmailNotifier struct { SMTPServer string SMTPPort int SMTPUsername string SMTPPassWord string }
EmailNotifier is the email Notifier, which uses the Paging Client to send emails to users.
func NewEmailNotifier ¶
func NewEmailNotifier(SMTPServer string, SMTPPort int, SMTPUsername, SMTPPassword string) (*EmailNotifier, error)
NewEmailNotifier returns a new EmailNotifier.
Click to show internal directories.
Click to hide internal directories.