Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigService ¶
func GetConfigService(c context.Context) configInterface.Interface
GetConfigService returns an Interface based on the provided context values
func UpdateHandler ¶
UpdateHandler is the HTTP router handler for handling cron-triggered configuration update requests.
func WithConfigService ¶
WithConfigService sets a luci_notify config interface to be used for all config interaction.
Types ¶
type Builder ¶
type Builder struct { // ProjectKey is a datastore key to this Builder's project. Note that this key // is a parent key, effectively making the Builder a child of a specific project. ProjectKey *datastore.Key `gae:"$parent"` // ID is the builder's canonical ID (e.g. <bucket>/<name>). ID string `gae:"$id"` // Repository is the repository this builder is tracking and the repository that // Revision is valid for. Repository string // Notifications is Notifications proto message, containing Notification messages // associated with this builder. Each notification contains information about who // to notify, and different settings on how to notify them. Notifications notifypb.Notifications // Status is current status of the builder. // It is updated every time a new build has a new status and either // 1) the new build has a newer revision than StatusRevision, or // 2) the new build's revision == StatusRevision, but it has a newer // creation time. Status buildbucketpb.Status // BuildTime is computed as the creation time of the most recent build encountered. // It can be used to decide whether Status and this Builder should be updated. BuildTime time.Time // Revision is the revision of the codebase that's associated with the most // recent build encountered. It can be used to decide whether Status should be // updated. Revision string // GitilesCommits are the gitiles commits checked out by the most recent build // encountered that had a non-empty checkout. It can also be used to compute a // blamelist. GitilesCommits notifypb.GitilesCommits // contains filtered or unexported fields }
Builder represents the state of the last build seen from a particular builder in order to implement certain notification triggers (i.e. on change).
type EmailTemplate ¶
type EmailTemplate struct { // ProjectKey is a datastore key of the LUCI project containing this email // template. ProjectKey *datastore.Key `gae:"$parent"` // Name identifies the email template. It is unique within the project. Name string `gae:"$id"` // SubjectTextTemplate is a text.Template of the email subject. SubjectTextTemplate string `gae:",noindex"` // BodyHTMLTemplate is a html.Template of the email body. BodyHTMLTemplate string `gae:",noindex"` // DefinitionURL is a URL to human-viewable page that contains the definition // of this email template. DefinitionURL string `gae:",noindex"` }
EmailTemplate is a Datastore entity directly under Project entity that represents an email template. It is managed by the cron job that ingests configs.
func (*EmailTemplate) Template ¶
func (t *EmailTemplate) Template() *mailtmpl.Template
Template converts t to *mailtmpl.Template.
type Project ¶
type Project struct { // Name is the name of the project. // // This must be unique on this luci-notify instance. Name string `gae:"$id"` // Revision is the revision of this project's luci-notify configuration. Revision string // URL is the luci-config URL to this project's luci-notify configuration. URL string }
Project represents the luci-notify configuration for a single project in the datastore.
type Settings ¶
type Settings struct { // ID is the datastore ID for service settings. ID string `gae:"$id,service_config"` // Revision is the revision of this instance's configuration. Revision string // Settings is an embedded copy of this instance's configuration proto. Settings notifypb.Settings `gae:"-"` }
Settings represents the luci-notify configuration for a single instance of the service.