-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Todd Bruner
committed
May 14, 2021
1 parent
57a147e
commit 1ade231
Showing
512 changed files
with
288 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,224 @@ | ||
package Scot::Controller::Api2; | ||
|
||
use strict; | ||
use warnings; | ||
use utf8; | ||
use Try::Tiny; | ||
use Carp qw(longmess); | ||
|
||
use Mojo::Base 'Mojolicious::Controller', -signatures; | ||
|
||
sub create ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->create($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Create Error: $_"); | ||
}; | ||
} | ||
|
||
sub list ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->list($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API List Error: $_"); | ||
}; | ||
} | ||
|
||
sub get_one ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->get_one($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Get_One Error: $_"); | ||
}; | ||
} | ||
|
||
sub get_related ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->get_related($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Get_Related Error: $_"); | ||
}; | ||
} | ||
|
||
sub update ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->update($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Update Error: $_"); | ||
}; | ||
|
||
} | ||
|
||
sub delete ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->delete($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API List Error: $_"); | ||
}; | ||
} | ||
|
||
sub undelete ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->undelete($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Undelete Error: $_"); | ||
}; | ||
} | ||
|
||
sub promote ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->promote($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Promote Error: $_"); | ||
}; | ||
|
||
} | ||
|
||
sub unpromote ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->unpromote($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Promote Error: $_"); | ||
}; | ||
} | ||
|
||
sub link ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->link($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Link Error: $_"); | ||
}; | ||
} | ||
|
||
sub move ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->move($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Move Error: $_"); | ||
}; | ||
} | ||
|
||
sub wall ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->wall($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Wall Error: $_"); | ||
}; | ||
|
||
} | ||
|
||
sub whoami ($self) { | ||
return $self->status; | ||
} | ||
|
||
sub status ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->status($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Status Error: $_"); | ||
}; | ||
} | ||
|
||
sub export ($self) { | ||
my $log = $self->env->log; | ||
try { | ||
my $request = $self->get_api_request; | ||
my $domain = $self->get_domain($request); | ||
my $result = $domain->export($request); | ||
$self->perform_render($result); | ||
} | ||
catch { | ||
$self->render_error(400, "API Status Error: $_"); | ||
}; | ||
} | ||
|
||
sub render_error ($self, $code, $errormsg) { | ||
my $log = $self->env->log; | ||
$log->error('--------------------'); | ||
$log->error($errormsg); | ||
$log->error(longmess); | ||
$log->error('--------------------'); | ||
$self->perform_render({ | ||
error => $errormsg, | ||
code => $code, | ||
}); | ||
} | ||
|
||
sub get_api_request ($self) { | ||
|
||
} | ||
|
||
sub get_domain ($self, $request) { | ||
|
||
} | ||
|
||
sub perform_render ($self, $result) { | ||
|
||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package Scot::Controller::Proxy; | ||
|
||
use strict; | ||
use warnings; | ||
use utf8; | ||
use Try::Tiny; | ||
use Carp qw(longmess); | ||
|
||
use Mojo::Base 'Mojolicious::Controller', -signatures; | ||
|
||
=head1 Scot::Controller::Proxy | ||
contain the controllers for the various Proxy services API provides, | ||
like RecFuture, etc. | ||
=cut | ||
|
||
sub recfuture ($self) { | ||
# receives an ID for an entity | ||
# places a request on /queue/recfuture to be handled | ||
} | ||
|
||
|
||
sub lri ($self) { | ||
# receives and ID for an entity | ||
# places request on /queue/lriproxy | ||
|
||
} | ||
|
||
sub remoteflair ($self) { | ||
# scot browser extension will send in html | ||
# this will place request on /queue/remoteflair | ||
# after creating a remote flair object | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+22.8 KB
vendor/cache/authors/id/B/BI/BINGOS/CPAN-Perl-Releases-5.20210420.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+22.9 KB
vendor/cache/authors/id/B/BO/BOBTFISH/MooseX-MetaDescription-0.06.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+13.2 KB
vendor/cache/authors/id/C/CF/CFAERBER/Authen-SASL-SASLprep-1.100.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+47.1 KB
vendor/cache/authors/id/C/CF/CFAERBER/Unicode-Stringprep-1.105.tar.gz
Binary file not shown.
Binary file added
BIN
+29.5 KB
vendor/cache/authors/id/C/CH/CHANSEN/HTTP-MultiPartParser-0.02.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+29.6 KB
vendor/cache/authors/id/C/CH/CHROMATIC/Test-MockObject-1.20200122.tar.gz
Binary file not shown.
Binary file added
BIN
+14.3 KB
vendor/cache/authors/id/C/CH/CHROMATIC/UNIVERSAL-can-1.20140328.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+18.3 KB
vendor/cache/authors/id/D/DA/DAGOLDEN/MooseX-Role-MongoDB-1.000.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+5.4 KB
vendor/cache/authors/id/D/DA/DANKOGAI/HTTP-Response-Encoding-0.06.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+61.9 KB
vendor/cache/authors/id/D/DR/DROLSKY/DateTime-Format-Builder-0.83.tar.gz
Binary file not shown.
Binary file added
BIN
+45.3 KB
vendor/cache/authors/id/D/DR/DROLSKY/DateTime-Format-ISO8601-0.16.tar.gz
Binary file not shown.
Binary file added
BIN
+114 KB
vendor/cache/authors/id/D/DR/DROLSKY/DateTime-Format-Strptime-1.78.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+18.1 KB
vendor/cache/authors/id/D/DR/DROLSKY/Module-Implementation-0.09.tar.gz
Binary file not shown.
Binary file added
BIN
+26.2 KB
vendor/cache/authors/id/D/DR/DROLSKY/MooseX-StrictConstructor-0.21.tar.gz
Binary file not shown.
Binary file added
BIN
+27 KB
vendor/cache/authors/id/D/DR/DROLSKY/Package-DeprecationManager-0.17.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+48.6 KB
vendor/cache/authors/id/D/DR/DROLSKY/Params-ValidationCompiler-0.30.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+40.4 KB
vendor/cache/authors/id/E/ET/ETHER/Class-Method-Modifiers-2.13.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+24.4 KB
vendor/cache/authors/id/E/ET/ETHER/Module-Runtime-Conflicts-0.003.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+42.3 KB
vendor/cache/authors/id/E/ET/ETHER/MooseX-MethodAttributes-0.32.tar.gz
Binary file not shown.
Binary file added
BIN
+48.4 KB
vendor/cache/authors/id/E/ET/ETHER/MooseX-Role-Parameterized-1.11.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+32.2 KB
vendor/cache/authors/id/E/ET/ETHER/MooseX-Types-Common-0.001014.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+127 KB
vendor/cache/authors/id/E/EZ/EZIMUEL/Search-Elasticsearch-7.712.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+13.2 KB
vendor/cache/authors/id/F/FR/FREW/Sub-Exporter-Progressive-0.001013.tar.gz
Binary file not shown.
Binary file added
BIN
+17.1 KB
vendor/cache/authors/id/F/FR/FREW/Syntax-Keyword-Junction-0.003008.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+9.81 KB
vendor/cache/authors/id/H/HA/HAARG/Devel-GlobalDestruction-0.14.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+16.3 KB
vendor/cache/authors/id/H/HA/HAARG/MooseX-Emulate-Class-Accessor-Fast-0.009032.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+14.6 KB
vendor/cache/authors/id/H/HA/HARTZELL/MooX-StrictConstructor-0.011.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+18.4 KB
vendor/cache/authors/id/H/HI/HINNERK/StripTags/HTML-StripTags-1.01.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+71.6 KB
vendor/cache/authors/id/I/IL/ILMARI/bareword-filehandles-0.007.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+11.4 KB
vendor/cache/authors/id/I/IS/ISHIGAKI/ExtUtils-MakeMaker-CPANfile-0.09.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+15.7 KB
vendor/cache/authors/id/K/KA/KAZEBURO/Apache-LogFormat-Compiler-0.36.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+16.6 KB
vendor/cache/authors/id/K/KA/KAZEBURO/POSIX-strftime-Compiler-0.44.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+11.1 KB
vendor/cache/authors/id/K/KO/KOLIBRIE/Convert-NLS_DATE_FORMAT-0.06.tar.gz
Binary file not shown.
Binary file added
BIN
+5.82 KB
vendor/cache/authors/id/K/KO/KOLIBRIE/DateTime-Format-Oracle-0.06.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+17.6 KB
vendor/cache/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.012.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+21.7 KB
vendor/cache/authors/id/M/MA/MAXMIND/MaxMind-DB-Common-0.040001.tar.gz
Binary file not shown.
Binary file added
BIN
+225 KB
vendor/cache/authors/id/M/MA/MAXMIND/MaxMind-DB-Reader-1.000014.tar.gz
Binary file not shown.
Binary file added
BIN
+302 KB
vendor/cache/authors/id/M/MA/MAXMIND/MaxMind-DB-Reader-XS-1.000008.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.72 KB
vendor/cache/authors/id/M/MI/MITHALDU/Sub-Exporter-Simple-1.103210.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+16.7 KB
vendor/cache/authors/id/M/MI/MIYAGAWA/Devel-StackTrace-AsHTML-0.15.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+13.1 KB
vendor/cache/authors/id/M/MI/MIYAGAWA/Filesys-Notify-Simple-0.14.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.