notifications

package
v0.129.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Slack SlackConfig `mapstructure:"slack" yaml:"slack"`
}

Config is the notification routing for one domain environment. The slack section has the same shape as a domain's .config/mcms/<env>/notifications-slack.yaml, so such a file maps onto it unchanged.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks that every channel is named and every contract is fully identified.

type ContractRef

type ContractRef struct {
	ChainSelector uint64 `mapstructure:"chain_selector" yaml:"chain_selector"`
	Address       string `mapstructure:"address" yaml:"address"`
}

ContractRef identifies a contract by chain selector and address.

type SlackChannel

type SlackChannel struct {
	// Name is the channel name, including the leading '#'.
	Name string `mapstructure:"name" yaml:"name"`
	// SlackHandles are the users or groups mentioned in the message, e.g.
	// "@signers".
	SlackHandles      []string      `mapstructure:"slack_handles" yaml:"slack_handles,omitempty"`
	TimelockContracts []ContractRef `mapstructure:"timelock_contracts" yaml:"timelock_contracts,omitempty"`
	MCMContracts      []ContractRef `mapstructure:"mcm_contracts" yaml:"mcm_contracts,omitempty"`
}

SlackChannel is a Slack channel and the proposals routed to it.

A channel with neither timelock nor MCM contracts receives every proposal. Otherwise it receives only proposals that target one of its contracts.

type SlackConfig

type SlackConfig struct {
	Channels []SlackChannel `mapstructure:"channels" yaml:"channels"`
}

SlackConfig lists the Slack channels notifications are posted to.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL