luci: go.chromium.org/luci/luci_notify/api/config Index | Files

package config

import "go.chromium.org/luci/luci_notify/api/config"

Index

Package Files

generate.go notify.go notify.pb.go proto_gae.gen.go settings.pb.go

type Builder Uses

type Builder struct {
    // Bucket is the buildbucket bucket that the builder is a part of.
    //
    // Required.
    Bucket string `protobuf:"bytes,1,opt,name=bucket" json:"bucket,omitempty"`
    // Name is the name of the buildbucket builder.
    //
    // Required.
    Name string `protobuf:"bytes,2,opt,name=name" 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" 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 Uses

func (*Builder) Descriptor() ([]byte, []int)

func (*Builder) GetBucket Uses

func (m *Builder) GetBucket() string

func (*Builder) GetName Uses

func (m *Builder) GetName() string

func (*Builder) GetRepository Uses

func (m *Builder) GetRepository() string

func (*Builder) ProtoMessage Uses

func (*Builder) ProtoMessage()

func (*Builder) Reset Uses

func (m *Builder) Reset()

func (*Builder) String Uses

func (m *Builder) String() string

func (*Builder) XXX_DiscardUnknown Uses

func (m *Builder) XXX_DiscardUnknown()

func (*Builder) XXX_Marshal Uses

func (m *Builder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Builder) XXX_Merge Uses

func (dst *Builder) XXX_Merge(src proto.Message)

func (*Builder) XXX_Size Uses

func (m *Builder) XXX_Size() int

func (*Builder) XXX_Unmarshal Uses

func (m *Builder) XXX_Unmarshal(b []byte) error

type GitilesCommits Uses

type GitilesCommits struct {
    // The Gitiles commits in this collection.
    Commits              []*proto1.GitilesCommit `protobuf:"bytes,1,rep,name=commits" 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 Uses

func (*GitilesCommits) Descriptor() ([]byte, []int)

func (*GitilesCommits) FromProperty Uses

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 Uses

func (m *GitilesCommits) GetCommits() []*proto1.GitilesCommit

func (*GitilesCommits) ProtoMessage Uses

func (*GitilesCommits) ProtoMessage()

func (*GitilesCommits) Reset Uses

func (m *GitilesCommits) Reset()

func (*GitilesCommits) String Uses

func (m *GitilesCommits) String() string

func (*GitilesCommits) ToProperty Uses

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 Uses

func (m *GitilesCommits) XXX_DiscardUnknown()

func (*GitilesCommits) XXX_Marshal Uses

func (m *GitilesCommits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GitilesCommits) XXX_Merge Uses

func (dst *GitilesCommits) XXX_Merge(src proto.Message)

func (*GitilesCommits) XXX_Size Uses

func (m *GitilesCommits) XXX_Size() int

func (*GitilesCommits) XXX_Unmarshal Uses

func (m *GitilesCommits) XXX_Unmarshal(b []byte) error

type Notification Uses

type Notification struct {
    // OnSuccess specifies a trigger to notify recipients on each build success.
    //
    // Optional.
    OnSuccess bool `protobuf:"varint,1,opt,name=on_success,json=onSuccess" json:"on_success,omitempty"`
    // OnFailure specifies a trigger to notify recipients on each build failure.
    //
    // Optional.
    OnFailure bool `protobuf:"varint,2,opt,name=on_failure,json=onFailure" json:"on_failure,omitempty"`
    // OnChange specifies a trigger to notify recipients if the builder's
    // previous build had a different result than the most recent build.
    //
    // Optional.
    OnChange bool `protobuf:"varint,3,opt,name=on_change,json=onChange" json:"on_change,omitempty"`
    // Email is the set of email addresses to notify.
    //
    // Optional.
    Email *Notification_Email `protobuf:"bytes,4,opt,name=email" 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" 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" 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.

func (*Notification) Descriptor Uses

func (*Notification) Descriptor() ([]byte, []int)

func (*Notification) GetEmail Uses

func (m *Notification) GetEmail() *Notification_Email

func (*Notification) GetNotifyBlamelist Uses

func (m *Notification) GetNotifyBlamelist() *Notification_Blamelist

func (*Notification) GetOnChange Uses

func (m *Notification) GetOnChange() bool

func (*Notification) GetOnFailure Uses

func (m *Notification) GetOnFailure() bool

func (*Notification) GetOnSuccess Uses

func (m *Notification) GetOnSuccess() bool

func (*Notification) GetTemplate Uses

func (m *Notification) GetTemplate() string

func (*Notification) ProtoMessage Uses

func (*Notification) ProtoMessage()

func (*Notification) Reset Uses

func (m *Notification) Reset()

func (*Notification) ShouldNotify Uses

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 Uses

func (m *Notification) String() string

func (*Notification) XXX_DiscardUnknown Uses

func (m *Notification) XXX_DiscardUnknown()

func (*Notification) XXX_Marshal Uses

func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Notification) XXX_Merge Uses

func (dst *Notification) XXX_Merge(src proto.Message)

func (*Notification) XXX_Size Uses

func (m *Notification) XXX_Size() int

func (*Notification) XXX_Unmarshal Uses

func (m *Notification) XXX_Unmarshal(b []byte) error

type Notification_Blamelist Uses

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" 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 Uses

func (*Notification_Blamelist) Descriptor() ([]byte, []int)

func (*Notification_Blamelist) GetRepositoryWhitelist Uses

func (m *Notification_Blamelist) GetRepositoryWhitelist() []string

func (*Notification_Blamelist) ProtoMessage Uses

func (*Notification_Blamelist) ProtoMessage()

func (*Notification_Blamelist) Reset Uses

func (m *Notification_Blamelist) Reset()

func (*Notification_Blamelist) String Uses

func (m *Notification_Blamelist) String() string

func (*Notification_Blamelist) XXX_DiscardUnknown Uses

func (m *Notification_Blamelist) XXX_DiscardUnknown()

func (*Notification_Blamelist) XXX_Marshal Uses

func (m *Notification_Blamelist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Notification_Blamelist) XXX_Merge Uses

func (dst *Notification_Blamelist) XXX_Merge(src proto.Message)

func (*Notification_Blamelist) XXX_Size Uses

func (m *Notification_Blamelist) XXX_Size() int

func (*Notification_Blamelist) XXX_Unmarshal Uses

func (m *Notification_Blamelist) XXX_Unmarshal(b []byte) error

type Notification_Email Uses

type Notification_Email struct {
    // Recipients is a list of email addresses to notify.
    Recipients           []string `protobuf:"bytes,1,rep,name=recipients" 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 Uses

func (*Notification_Email) Descriptor() ([]byte, []int)

func (*Notification_Email) GetRecipients Uses

func (m *Notification_Email) GetRecipients() []string

func (*Notification_Email) ProtoMessage Uses

func (*Notification_Email) ProtoMessage()

func (*Notification_Email) Reset Uses

func (m *Notification_Email) Reset()

func (*Notification_Email) String Uses

func (m *Notification_Email) String() string

func (*Notification_Email) XXX_DiscardUnknown Uses

func (m *Notification_Email) XXX_DiscardUnknown()

func (*Notification_Email) XXX_Marshal Uses

func (m *Notification_Email) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Notification_Email) XXX_Merge Uses

func (dst *Notification_Email) XXX_Merge(src proto.Message)

func (*Notification_Email) XXX_Size Uses

func (m *Notification_Email) XXX_Size() int

func (*Notification_Email) XXX_Unmarshal Uses

func (m *Notification_Email) XXX_Unmarshal(b []byte) error

type Notifications Uses

type Notifications struct {
    // Notifications is a list of notification configurations.
    Notifications        []*Notification `protobuf:"bytes,1,rep,name=notifications" 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 Uses

func (*Notifications) Descriptor() ([]byte, []int)

func (*Notifications) Filter Uses

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 Uses

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 Uses

func (m *Notifications) GetNotifications() []*Notification

func (*Notifications) ProtoMessage Uses

func (*Notifications) ProtoMessage()

func (*Notifications) Reset Uses

func (m *Notifications) Reset()

func (*Notifications) String Uses

func (m *Notifications) String() string

func (*Notifications) ToProperty Uses

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 Uses

func (m *Notifications) XXX_DiscardUnknown()

func (*Notifications) XXX_Marshal Uses

func (m *Notifications) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Notifications) XXX_Merge Uses

func (dst *Notifications) XXX_Merge(src proto.Message)

func (*Notifications) XXX_Size Uses

func (m *Notifications) XXX_Size() int

func (*Notifications) XXX_Unmarshal Uses

func (m *Notifications) XXX_Unmarshal(b []byte) error

type Notifier Uses

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" json:"name,omitempty"`
    // Notifications is a list of notification configurations.
    Notifications []*Notification `protobuf:"bytes,2,rep,name=notifications" json:"notifications,omitempty"`
    // Builders is a list of buildbucket builders this Notifier should watch.
    Builders             []*Builder `protobuf:"bytes,3,rep,name=builders" 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 Uses

func (*Notifier) Descriptor() ([]byte, []int)

func (*Notifier) GetBuilders Uses

func (m *Notifier) GetBuilders() []*Builder

func (*Notifier) GetName Uses

func (m *Notifier) GetName() string

func (*Notifier) GetNotifications Uses

func (m *Notifier) GetNotifications() []*Notification

func (*Notifier) ProtoMessage Uses

func (*Notifier) ProtoMessage()

func (*Notifier) Reset Uses

func (m *Notifier) Reset()

func (*Notifier) String Uses

func (m *Notifier) String() string

func (*Notifier) XXX_DiscardUnknown Uses

func (m *Notifier) XXX_DiscardUnknown()

func (*Notifier) XXX_Marshal Uses

func (m *Notifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Notifier) XXX_Merge Uses

func (dst *Notifier) XXX_Merge(src proto.Message)

func (*Notifier) XXX_Size Uses

func (m *Notifier) XXX_Size() int

func (*Notifier) XXX_Unmarshal Uses

func (m *Notifier) XXX_Unmarshal(b []byte) error

type ProjectConfig Uses

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" 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 Uses

func (*ProjectConfig) Descriptor() ([]byte, []int)

func (*ProjectConfig) GetNotifiers Uses

func (m *ProjectConfig) GetNotifiers() []*Notifier

func (*ProjectConfig) ProtoMessage Uses

func (*ProjectConfig) ProtoMessage()

func (*ProjectConfig) Reset Uses

func (m *ProjectConfig) Reset()

func (*ProjectConfig) String Uses

func (m *ProjectConfig) String() string

func (*ProjectConfig) XXX_DiscardUnknown Uses

func (m *ProjectConfig) XXX_DiscardUnknown()

func (*ProjectConfig) XXX_Marshal Uses

func (m *ProjectConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProjectConfig) XXX_Merge Uses

func (dst *ProjectConfig) XXX_Merge(src proto.Message)

func (*ProjectConfig) XXX_Size Uses

func (m *ProjectConfig) XXX_Size() int

func (*ProjectConfig) XXX_Unmarshal Uses

func (m *ProjectConfig) XXX_Unmarshal(b []byte) error

type Settings Uses

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" 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 Uses

func (*Settings) Descriptor() ([]byte, []int)

func (*Settings) GetMiloHost Uses

func (m *Settings) GetMiloHost() string

func (*Settings) ProtoMessage Uses

func (*Settings) ProtoMessage()

func (*Settings) Reset Uses

func (m *Settings) Reset()

func (*Settings) String Uses

func (m *Settings) String() string

func (*Settings) XXX_DiscardUnknown Uses

func (m *Settings) XXX_DiscardUnknown()

func (*Settings) XXX_Marshal Uses

func (m *Settings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Settings) XXX_Merge Uses

func (dst *Settings) XXX_Merge(src proto.Message)

func (*Settings) XXX_Size Uses

func (m *Settings) XXX_Size() int

func (*Settings) XXX_Unmarshal Uses

func (m *Settings) XXX_Unmarshal(b []byte) error

Package config imports 5 packages (graph) and is imported by 3 packages. Updated 2018-08-19. Refresh now. Tools for package owners.