Documentation
¶
Index ¶
- type Builder
- func (*Builder) Descriptor() ([]byte, []int)
- func (m *Builder) GetBucket() string
- func (m *Builder) GetName() string
- func (m *Builder) GetRepository() string
- func (*Builder) ProtoMessage()
- func (m *Builder) Reset()
- func (m *Builder) String() string
- func (m *Builder) XXX_DiscardUnknown()
- func (m *Builder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Builder) XXX_Merge(src proto.Message)
- func (m *Builder) XXX_Size() int
- func (m *Builder) XXX_Unmarshal(b []byte) error
- type GitilesCommits
- func (*GitilesCommits) Descriptor() ([]byte, []int)
- func (p *GitilesCommits) FromProperty(prop datastore.Property) error
- func (m *GitilesCommits) GetCommits() []*proto1.GitilesCommit
- func (*GitilesCommits) ProtoMessage()
- func (m *GitilesCommits) Reset()
- func (m *GitilesCommits) String() string
- func (p *GitilesCommits) ToProperty() (prop datastore.Property, err error)
- func (m *GitilesCommits) XXX_DiscardUnknown()
- func (m *GitilesCommits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GitilesCommits) XXX_Merge(src proto.Message)
- func (m *GitilesCommits) XXX_Size() int
- func (m *GitilesCommits) XXX_Unmarshal(b []byte) error
- type Notification
- func (*Notification) Descriptor() ([]byte, []int)
- func (m *Notification) GetEmail() *Notification_Email
- func (m *Notification) GetNotifyBlamelist() *Notification_Blamelist
- func (m *Notification) GetOnChange() bool
- func (m *Notification) GetOnFailure() bool
- func (m *Notification) GetOnNewFailure() bool
- func (m *Notification) GetOnSuccess() bool
- func (m *Notification) GetTemplate() string
- func (*Notification) ProtoMessage()
- func (m *Notification) Reset()
- func (n *Notification) ShouldNotify(oldStatus, newStatus buildbucketpb.Status) bool
- func (m *Notification) String() string
- func (m *Notification) XXX_DiscardUnknown()
- func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Notification) XXX_Merge(src proto.Message)
- func (m *Notification) XXX_Size() int
- func (m *Notification) XXX_Unmarshal(b []byte) error
- type Notification_Blamelist
- func (*Notification_Blamelist) Descriptor() ([]byte, []int)
- func (m *Notification_Blamelist) GetRepositoryWhitelist() []string
- func (*Notification_Blamelist) ProtoMessage()
- func (m *Notification_Blamelist) Reset()
- func (m *Notification_Blamelist) String() string
- func (m *Notification_Blamelist) XXX_DiscardUnknown()
- func (m *Notification_Blamelist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Notification_Blamelist) XXX_Merge(src proto.Message)
- func (m *Notification_Blamelist) XXX_Size() int
- func (m *Notification_Blamelist) XXX_Unmarshal(b []byte) error
- type Notification_Email
- func (*Notification_Email) Descriptor() ([]byte, []int)
- func (m *Notification_Email) GetRecipients() []string
- func (*Notification_Email) ProtoMessage()
- func (m *Notification_Email) Reset()
- func (m *Notification_Email) String() string
- func (m *Notification_Email) XXX_DiscardUnknown()
- func (m *Notification_Email) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Notification_Email) XXX_Merge(src proto.Message)
- func (m *Notification_Email) XXX_Size() int
- func (m *Notification_Email) XXX_Unmarshal(b []byte) error
- type Notifications
- func (*Notifications) Descriptor() ([]byte, []int)
- func (n *Notifications) Filter(oldStatus, newStatus buildbucketpb.Status) Notifications
- func (p *Notifications) FromProperty(prop datastore.Property) error
- func (m *Notifications) GetNotifications() []*Notification
- func (*Notifications) ProtoMessage()
- func (m *Notifications) Reset()
- func (m *Notifications) String() string
- func (p *Notifications) ToProperty() (prop datastore.Property, err error)
- func (m *Notifications) XXX_DiscardUnknown()
- func (m *Notifications) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Notifications) XXX_Merge(src proto.Message)
- func (m *Notifications) XXX_Size() int
- func (m *Notifications) XXX_Unmarshal(b []byte) error
- type Notifier
- func (*Notifier) Descriptor() ([]byte, []int)
- func (m *Notifier) GetBuilders() []*Builder
- func (m *Notifier) GetName() string
- func (m *Notifier) GetNotifications() []*Notification
- func (*Notifier) ProtoMessage()
- func (m *Notifier) Reset()
- func (m *Notifier) String() string
- func (m *Notifier) XXX_DiscardUnknown()
- func (m *Notifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Notifier) XXX_Merge(src proto.Message)
- func (m *Notifier) XXX_Size() int
- func (m *Notifier) XXX_Unmarshal(b []byte) error
- type ProjectConfig
- func (*ProjectConfig) Descriptor() ([]byte, []int)
- func (m *ProjectConfig) GetNotifiers() []*Notifier
- func (*ProjectConfig) ProtoMessage()
- func (m *ProjectConfig) Reset()
- func (m *ProjectConfig) String() string
- func (m *ProjectConfig) XXX_DiscardUnknown()
- func (m *ProjectConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProjectConfig) XXX_Merge(src proto.Message)
- func (m *ProjectConfig) XXX_Size() int
- func (m *ProjectConfig) XXX_Unmarshal(b []byte) error
- type Settings
- func (*Settings) Descriptor() ([]byte, []int)
- func (m *Settings) GetMiloHost() string
- func (*Settings) ProtoMessage()
- func (m *Settings) Reset()
- func (m *Settings) String() string
- func (m *Settings) XXX_DiscardUnknown()
- func (m *Settings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Settings) XXX_Merge(src proto.Message)
- func (m *Settings) XXX_Size() int
- func (m *Settings) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct { // Bucket is the buildbucket bucket that the builder is a part of. // // Required. Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"` // Name is the name of the buildbucket builder. // // Required. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Repository is the git repository associated with this particular builder. // // The repository should look like a URL, e.g. https://chromium.googlesource.com/src // // Currently, luci-notify only supports Gerrit-like URLs since it checks // against gitiles commits, so the URL's path (e.g. "src" in the above // example) should map directly to a Gerrit project. // // Builds attached to the history of this repository will use this // repository's git history to determine the order between two builds for the // OnChange notification. // // Optional. // // If not set, OnChange notifications will derive their notion of // "previous" build solely from build creation time, which is potentially // less reliable. Repository string `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Builder references a buildbucket builder in the current project.
func (*Builder) Descriptor ¶
func (*Builder) GetRepository ¶
func (*Builder) ProtoMessage ¶
func (*Builder) ProtoMessage()
func (*Builder) XXX_DiscardUnknown ¶
func (m *Builder) XXX_DiscardUnknown()
func (*Builder) XXX_Marshal ¶
func (*Builder) XXX_Unmarshal ¶
type GitilesCommits ¶
type GitilesCommits struct { // The Gitiles commits in this collection. Commits []*proto1.GitilesCommit `protobuf:"bytes,1,rep,name=commits,proto3" json:"commits,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A collection of landed Git commits hosted on Gitiles.
func (*GitilesCommits) Descriptor ¶
func (*GitilesCommits) Descriptor() ([]byte, []int)
func (*GitilesCommits) FromProperty ¶
func (p *GitilesCommits) FromProperty(prop datastore.Property) error
FromProperty implements datastore.PropertyConverter. It parses a '[]byte' into an embedded 'GitilesCommits' when used with the "go.chromium.org/gae" library.
func (*GitilesCommits) GetCommits ¶
func (m *GitilesCommits) GetCommits() []*proto1.GitilesCommit
func (*GitilesCommits) ProtoMessage ¶
func (*GitilesCommits) ProtoMessage()
func (*GitilesCommits) Reset ¶
func (m *GitilesCommits) Reset()
func (*GitilesCommits) String ¶
func (m *GitilesCommits) String() string
func (*GitilesCommits) ToProperty ¶
func (p *GitilesCommits) ToProperty() (prop datastore.Property, err error)
ToProperty implements datastore.PropertyConverter. It causes an embedded 'GitilesCommits' to serialize to an unindexed '[]byte' when used with the "go.chromium.org/gae" library.
func (*GitilesCommits) XXX_DiscardUnknown ¶
func (m *GitilesCommits) XXX_DiscardUnknown()
func (*GitilesCommits) XXX_Marshal ¶
func (m *GitilesCommits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GitilesCommits) XXX_Merge ¶
func (m *GitilesCommits) XXX_Merge(src proto.Message)
func (*GitilesCommits) XXX_Size ¶
func (m *GitilesCommits) XXX_Size() int
func (*GitilesCommits) XXX_Unmarshal ¶
func (m *GitilesCommits) XXX_Unmarshal(b []byte) error
type Notification ¶
type Notification struct { // Notify on each build success. OnSuccess bool `protobuf:"varint,1,opt,name=on_success,json=onSuccess,proto3" json:"on_success,omitempty"` // Notify on each build failure. OnFailure bool `protobuf:"varint,2,opt,name=on_failure,json=onFailure,proto3" json:"on_failure,omitempty"` // Notify on each build status different than the previous one. OnChange bool `protobuf:"varint,3,opt,name=on_change,json=onChange,proto3" json:"on_change,omitempty"` // Notify on each build failure unless the previous build was a failure. OnNewFailure bool `protobuf:"varint,7,opt,name=on_new_failure,json=onNewFailure,proto3" json:"on_new_failure,omitempty"` // Email is the set of email addresses to notify. // // Optional. Email *Notification_Email `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // Refers to which project template name to use to format this email. // If not present, "default" will be used. // // Optional. Template string `protobuf:"bytes,5,opt,name=template,proto3" json:"template,omitempty"` // NotifyBlamelist specifies whether to notify the computed blamelist for a // given build. // // If set, this notification will be sent to the blamelist of a build. Note // that if this is set in multiple notifications pertaining to the same // builder, the blamelist may recieve multiple emails. // // Optional. NotifyBlamelist *Notification_Blamelist `protobuf:"bytes,6,opt,name=notify_blamelist,json=notifyBlamelist,proto3" json:"notify_blamelist,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Notification specifies the triggers to watch for and send notifications on. It also specifies email recipients.
Next ID: 8.
func (*Notification) Descriptor ¶
func (*Notification) Descriptor() ([]byte, []int)
func (*Notification) GetEmail ¶
func (m *Notification) GetEmail() *Notification_Email
func (*Notification) GetNotifyBlamelist ¶
func (m *Notification) GetNotifyBlamelist() *Notification_Blamelist
func (*Notification) GetOnChange ¶
func (m *Notification) GetOnChange() bool
func (*Notification) GetOnFailure ¶
func (m *Notification) GetOnFailure() bool
func (*Notification) GetOnNewFailure ¶
func (m *Notification) GetOnNewFailure() bool
func (*Notification) GetOnSuccess ¶
func (m *Notification) GetOnSuccess() bool
func (*Notification) GetTemplate ¶
func (m *Notification) GetTemplate() string
func (*Notification) ProtoMessage ¶
func (*Notification) ProtoMessage()
func (*Notification) Reset ¶
func (m *Notification) Reset()
func (*Notification) ShouldNotify ¶
func (n *Notification) ShouldNotify(oldStatus, newStatus buildbucketpb.Status) bool
ShouldNotify is the predicate function for whether a trigger's conditions have been met.
func (*Notification) String ¶
func (m *Notification) String() string
func (*Notification) XXX_DiscardUnknown ¶
func (m *Notification) XXX_DiscardUnknown()
func (*Notification) XXX_Marshal ¶
func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Notification) XXX_Merge ¶
func (m *Notification) XXX_Merge(src proto.Message)
func (*Notification) XXX_Size ¶
func (m *Notification) XXX_Size() int
func (*Notification) XXX_Unmarshal ¶
func (m *Notification) XXX_Unmarshal(b []byte) error
type Notification_Blamelist ¶
type Notification_Blamelist struct { // A list of repositories which we are allowed to be included as part of the // blamelist. If unset, a blamelist will be computed based on a Builder's // repository field. If set, however luci-notify computes the blamelist for // all commits related to a build (which may span multiple repositories) which // are part of repository in this repository whitelist. // // Repositories should be valid Gerrit/Gitiles repository URLs, such as // https://chromium.googlesource.com/chromium/src // // Optional. RepositoryWhitelist []string `protobuf:"bytes,1,rep,name=repository_whitelist,json=repositoryWhitelist,proto3" json:"repository_whitelist,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Blamelist is a message representing configuration for notifying the blamelist.
func (*Notification_Blamelist) Descriptor ¶
func (*Notification_Blamelist) Descriptor() ([]byte, []int)
func (*Notification_Blamelist) GetRepositoryWhitelist ¶
func (m *Notification_Blamelist) GetRepositoryWhitelist() []string
func (*Notification_Blamelist) ProtoMessage ¶
func (*Notification_Blamelist) ProtoMessage()
func (*Notification_Blamelist) Reset ¶
func (m *Notification_Blamelist) Reset()
func (*Notification_Blamelist) String ¶
func (m *Notification_Blamelist) String() string
func (*Notification_Blamelist) XXX_DiscardUnknown ¶
func (m *Notification_Blamelist) XXX_DiscardUnknown()
func (*Notification_Blamelist) XXX_Marshal ¶
func (m *Notification_Blamelist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Notification_Blamelist) XXX_Merge ¶
func (m *Notification_Blamelist) XXX_Merge(src proto.Message)
func (*Notification_Blamelist) XXX_Size ¶
func (m *Notification_Blamelist) XXX_Size() int
func (*Notification_Blamelist) XXX_Unmarshal ¶
func (m *Notification_Blamelist) XXX_Unmarshal(b []byte) error
type Notification_Email ¶
type Notification_Email struct { // Recipients is a list of email addresses to notify. Recipients []string `protobuf:"bytes,1,rep,name=recipients,proto3" json:"recipients,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Email is a message representing a set of mail recipients (email addresses).
func (*Notification_Email) Descriptor ¶
func (*Notification_Email) Descriptor() ([]byte, []int)
func (*Notification_Email) GetRecipients ¶
func (m *Notification_Email) GetRecipients() []string
func (*Notification_Email) ProtoMessage ¶
func (*Notification_Email) ProtoMessage()
func (*Notification_Email) Reset ¶
func (m *Notification_Email) Reset()
func (*Notification_Email) String ¶
func (m *Notification_Email) String() string
func (*Notification_Email) XXX_DiscardUnknown ¶
func (m *Notification_Email) XXX_DiscardUnknown()
func (*Notification_Email) XXX_Marshal ¶
func (m *Notification_Email) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Notification_Email) XXX_Merge ¶
func (m *Notification_Email) XXX_Merge(src proto.Message)
func (*Notification_Email) XXX_Size ¶
func (m *Notification_Email) XXX_Size() int
func (*Notification_Email) XXX_Unmarshal ¶
func (m *Notification_Email) XXX_Unmarshal(b []byte) error
type Notifications ¶
type Notifications struct { // Notifications is a list of notification configurations. Notifications []*Notification `protobuf:"bytes,1,rep,name=notifications,proto3" json:"notifications,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Notifications encapsulates a list of notifications as a proto so code for storing it in the datastore may be generated.
func (*Notifications) Descriptor ¶
func (*Notifications) Descriptor() ([]byte, []int)
func (*Notifications) Filter ¶
func (n *Notifications) Filter(oldStatus, newStatus buildbucketpb.Status) Notifications
Filter filters out Notification objects from Notifications by checking if we ShouldNotify based on two build statuses.
func (*Notifications) FromProperty ¶
func (p *Notifications) FromProperty(prop datastore.Property) error
FromProperty implements datastore.PropertyConverter. It parses a '[]byte' into an embedded 'Notifications' when used with the "go.chromium.org/gae" library.
func (*Notifications) GetNotifications ¶
func (m *Notifications) GetNotifications() []*Notification
func (*Notifications) ProtoMessage ¶
func (*Notifications) ProtoMessage()
func (*Notifications) Reset ¶
func (m *Notifications) Reset()
func (*Notifications) String ¶
func (m *Notifications) String() string
func (*Notifications) ToProperty ¶
func (p *Notifications) ToProperty() (prop datastore.Property, err error)
ToProperty implements datastore.PropertyConverter. It causes an embedded 'Notifications' to serialize to an unindexed '[]byte' when used with the "go.chromium.org/gae" library.
func (*Notifications) XXX_DiscardUnknown ¶
func (m *Notifications) XXX_DiscardUnknown()
func (*Notifications) XXX_Marshal ¶
func (m *Notifications) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Notifications) XXX_Merge ¶
func (m *Notifications) XXX_Merge(src proto.Message)
func (*Notifications) XXX_Size ¶
func (m *Notifications) XXX_Size() int
func (*Notifications) XXX_Unmarshal ¶
func (m *Notifications) XXX_Unmarshal(b []byte) error
type Notifier ¶
type Notifier struct { // Name is an identifier for the notifier which must be unique within a // project. // // Name must additionally match ^[a-z\-]+$, meaning it must only // use an alphabet of lowercase characters and hyphens. // // Required. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Notifications is a list of notification configurations. Notifications []*Notification `protobuf:"bytes,2,rep,name=notifications,proto3" json:"notifications,omitempty"` // Builders is a list of buildbucket builders this Notifier should watch. Builders []*Builder `protobuf:"bytes,3,rep,name=builders,proto3" json:"builders,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Notifier contains a set of notification configurations (which specify triggers to send notifications on) and a set of builders that will be watched for these triggers.
func (*Notifier) Descriptor ¶
func (*Notifier) GetBuilders ¶
func (*Notifier) GetNotifications ¶
func (m *Notifier) GetNotifications() []*Notification
func (*Notifier) ProtoMessage ¶
func (*Notifier) ProtoMessage()
func (*Notifier) XXX_DiscardUnknown ¶
func (m *Notifier) XXX_DiscardUnknown()
func (*Notifier) XXX_Marshal ¶
func (*Notifier) XXX_Unmarshal ¶
type ProjectConfig ¶
type ProjectConfig struct { // Notifiers is a list of Notifiers which watch builders and send // notifications for this project. Notifiers []*Notifier `protobuf:"bytes,1,rep,name=notifiers,proto3" json:"notifiers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ProjectConfig is a luci-notify configuration for a particular project.
func (*ProjectConfig) Descriptor ¶
func (*ProjectConfig) Descriptor() ([]byte, []int)
func (*ProjectConfig) GetNotifiers ¶
func (m *ProjectConfig) GetNotifiers() []*Notifier
func (*ProjectConfig) ProtoMessage ¶
func (*ProjectConfig) ProtoMessage()
func (*ProjectConfig) Reset ¶
func (m *ProjectConfig) Reset()
func (*ProjectConfig) String ¶
func (m *ProjectConfig) String() string
func (*ProjectConfig) XXX_DiscardUnknown ¶
func (m *ProjectConfig) XXX_DiscardUnknown()
func (*ProjectConfig) XXX_Marshal ¶
func (m *ProjectConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProjectConfig) XXX_Merge ¶
func (m *ProjectConfig) XXX_Merge(src proto.Message)
func (*ProjectConfig) XXX_Size ¶
func (m *ProjectConfig) XXX_Size() int
func (*ProjectConfig) XXX_Unmarshal ¶
func (m *ProjectConfig) XXX_Unmarshal(b []byte) error
type Settings ¶
type Settings struct { // MiloHost is the hostname of the Milo instance luci-notify queries for // additional build information. // // Required. MiloHost string `protobuf:"bytes,1,opt,name=milo_host,json=miloHost,proto3" json:"milo_host,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Settings is the top-level configuration message.
func (*Settings) Descriptor ¶
func (*Settings) GetMiloHost ¶
func (*Settings) ProtoMessage ¶
func (*Settings) ProtoMessage()
func (*Settings) XXX_DiscardUnknown ¶
func (m *Settings) XXX_DiscardUnknown()