notifyprofile

package
v0.22.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package notifyprofile notification profile management.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("profile not found")

ErrNotFound is returned when a profile is not found.

Functions

func DeleteProfile

func DeleteProfile(ctx context.Context, rep repo.RepositoryWriter, name string) error

DeleteProfile deletes a notification profile.

func SaveProfile

func SaveProfile(ctx context.Context, rep repo.RepositoryWriter, pc Config) error

SaveProfile saves a notification profile.

Types

type Config

type Config struct {
	ProfileName  string              `json:"profile"`
	MethodConfig sender.MethodConfig `json:"method"`
	MinSeverity  sender.Severity     `json:"minSeverity"`
}

Config is a struct that represents the configuration for a single notification profile.

func GetProfile

func GetProfile(ctx context.Context, rep repo.Repository, name string) (Config, error)

GetProfile returns a notification profile by name.

func ListProfiles

func ListProfiles(ctx context.Context, rep repo.Repository) ([]Config, error)

ListProfiles returns a list of notification profiles.

type Summary

type Summary struct {
	ProfileName string `json:"profile"`
	Type        string `json:"type"`
	Summary     string `json:"summary"`
	MinSeverity int32  `json:"minSeverity"`
}

Summary contains JSON-serializable summary of a notification profile.

Jump to

Keyboard shortcuts

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