NAME
Tapper::Cmd::User
SYNOPSIS
This project offers backend functions for all projects that manipulate users in the database. Even though it mostly handles users in the reportsdb, some functions can also manipulate users in the testrundb.
use Tapper::Cmd::User;
my $user = Tapper::Cmd::User->new();
my $details = {login => "anton",
name => 'Anton Gorodetzky',
contacts => [{
protocol => 'Mail',
address => 'anton@nightwatch.ru',
}]
};
my $id = $user->add($details);
$details->{name} = "Anton Gorodetsky";
my $error = $user->update($id, $details);
$error = $user->delete($id);
$details = {login => "anton", name => 'Anton Gorodetzky'};
$id = $user->add_in_testrun($details);
$details->{name} = "Anton Gorodetsky";
my $error = $user->update_in_testrun($id, $details);
$error = $user->delete_in_testrun($id);
NAME
Tapper::Cmd::User - Backend functions for manipluation of user subscriptions in the database
FUNCTIONS
add
Add a new user to reportsdb. Expects all details as a hash reference.
@param hash ref - user data
@return success - user id @return error - undef
@throws Perl die
list
Get a list of users with all information we have about them.
@param hash ref - search as understand by DBIx::Class
@return list of user information (hash refs)
@throws die
del
Delete a user subscription with given id. Its named del instead of delete to prevent confusion with the buildin delete function. The first parameter can be either the users database id (not the UNIX id!) or the login name.
@param int|string - user id|user login name
@return success - 0
@throws die
contact_add
Add a contact to an existing owner in reportsdb. Expects all details as a hash reference.
@param int|string - owner as id or login @param hash ref - contact data
@return success - owner id @return error - undef
@throws Perl 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
AUTHOR
AMD OSRC Tapper Team <tapper@amd64.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2012 by Advanced Micro Devices, Inc..
This is free software, licensed under:
The (two-clause) FreeBSD License