NAME
Tapper::Cmd::Notification
SYNOPSIS
This project offers backend functions for all projects that manipulate notification subscriptions.
use Tapper::Cmd::Notification;
my $subscription = Tapper::Cmd::Notification->new();
my $details = {event => "testrun_finished",
filter => "testrun('id') == 23",
comment => "Get back to work, testrun 23 is finished",
persist => 0,
owner_login => 'anton',
};
my $id = $subscription->add($details);
$details->{filter} = "testrun('id') == 24";
my $error = $subscription->update($id, $details);
$error = $subscription->delete($id);
NAME
Tapper::Cmd::Notification - Backend functions for manipluation of notification subscriptions in the database
FUNCTIONS
get_user
Make sure the user is given as user id.
@param hash ref - data for notification subscription
@param success - updated hash ref
@throws die
add
Add a new notification subscription. Expects all details as a hash reference.
@param hash ref - notification subscrition data
@return success - subscrition id @return error - undef
@throws Perl die
list
Return a DBIC resultset object that contains a list of notification subscriptions.
update
Update a given notification subscription. The given data has to be a complete hash of what the subscription should look like after the update.
@param int - subscription id @param hash ref - subscription as it should be
@return success - subscription id
@throws die
del
Delete a notification subscription with given id. Its named del instead of delete to prevent confusion with the buildin delete function.
@param int - notification id
@return success - 0
@throws die
AUTHOR
AMD OSRC Tapper Team, <tapper at amd64.org>
COPYRIGHT & LICENSE
Copyright 2012 AMD OSRC Tapper Team, all rights reserved.
This program is released under the following license: freebsd
AUTHORS
AMD OSRC Tapper Team <tapper@amd64.org>
Tapper Team <tapper-ops@amazon.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2024 by Advanced Micro Devices, Inc.
This is free software, licensed under:
The (two-clause) FreeBSD License