App-MonM-Notifier
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/App/MonM/Notifier/Monotifier.pm view on Meta::CPAN
use strict;
use utf8;
=encoding utf-8
=head1 NAME
App::MonM::Monotifier - extension for the monm notifications
=head1 VERSION
Version 1.00
=head1 SYNOPSIS
# monotifier
# monotifier show
# monotifier show <ID>
# monotifier remove <ID>
# monotifier clean
# monotifier truncate
=head1 DESCRIPTION
This is an extension for the monm notifications over different
communication channels
B<Note!> Before using the third-party database, please create the monotifier table
DDL example for MySQL:
CREATE TABLE IF NOT EXISTS monotifier (
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE,
`to` CHAR(255), -- Recipient name
`channel` CHAR(255), -- Recipient channel
`subject` TEXT, -- Message subject
`message` TEXT, -- Message content (BASE64)
`attributes` TEXT, -- Message attributes (JSON)
`published` BIGINT(20), -- The publication time (unixtime)
`scheduled` BIGINT(20), -- The scheduled time (unixtime)
`expired` BIGINT(20), -- The expiration time (unixtime)
`sent` BIGINT(20), -- The send time
`attempt` INTEGER DEFAULT 0, -- Count of failed attempts
`status` CHAR(32), -- Status of transaction
`errcode` INT(11), -- Error code
`errmsg` TEXT -- Error message
);
Configuration example for MySQL:
UseMonotifier yes
<MoNotifier>
DSN "DBI:mysql:database=monotifier;host=mysql.example.com"
User username
Password password
Set RaiseError 0
Set PrintError 0
Set mysql_enable_utf8 1
# Expires and timeout values
Timeout 60
MaxTime 300
Expires 1M
</MoNotifier>
=head1 INTERNAL METHODS
=over 4
=item B<again>
The CTK method for classes extension. For internal use only!
See L<CTK/again>
=item B<raise>
return $app->raise("Red message");
Sends message to STDERR and returns 0
=item B<store>
my $store = $app->store();
Returns store object
=back
=head1 HISTORY
See C<Changes> file
=head1 DEPENDENCIES
L<App::MonM>
=head1 TO DO
See C<TODO> file
=head1 SEE ALSO
L<App::MonM>
=head1 AUTHOR
Serż Minus (Sergey Lepenkov) L<https://www.serzik.com> E<lt>abalama@cpan.orgE<gt>
=head1 COPYRIGHT
Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved
=head1 LICENSE
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See C<LICENSE> file and L<https://dev.perl.org/licenses/>
=cut
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.539 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )