Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWhitelist ¶
func BuildWhitelist(regexs ...string) *whitelist
Types ¶
type AddressBook ¶
type AddressBook interface {
AddressForRepo(ctx context.Context, logger lager.Logger, isPrivate bool, owner, name string) []Address
}
func NewRolodex ¶
func NewRolodex(client RolodexClient, teamURLs TeamURLs) AddressBook
func NewSimpleAddressBook ¶
func NewSimpleAddressBook(url, channel string) AddressBook
type Envelope ¶
type Envelope struct { Address Address Contents []Notification }
type Notification ¶
type Notification struct { Owner string Repository string Private bool Branch string SHA string Path string LineNumber int }
func (Notification) FullName ¶
func (n Notification) FullName() string
func (Notification) ShortSHA ¶
func (n Notification) ShortSHA() string
type Notifier ¶
func NewSlackNotifier ¶
func NewSlackNotifier(clock clock.Clock, client HTTPClient, formatter SlackNotificationFormatter) Notifier
type RolodexClient ¶
type RolodexClient interface {
GetOwners(ctx netcontext.Context, in *rolodexpb.GetOwnersRequest, opts ...grpc.CallOption) (*rolodexpb.GetOwnersResponse, error)
}
type Router ¶
type SlackAttachment ¶
type SlackMessage ¶
type SlackMessage struct { Channel string `json:"channel,omitempty"` Attachments []SlackAttachment `json:"attachments"` }
type SlackNotificationFormatter ¶
type SlackNotificationFormatter interface {
FormatNotifications(batch []Notification) []SlackMessage
}
func NewSlackNotificationFormatter ¶
func NewSlackNotificationFormatter() SlackNotificationFormatter
type TeamURLs ¶
type TeamURLs struct {
// contains filtered or unexported fields
}
func NewTeamURLs ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.