notifications

package
v0.126.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 3 Imported by: 0

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