notifyprofile

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package notifyprofile notification profile management.

Index

Constants

This section is empty.

Variables

This section is empty.

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, bool, 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