Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Commit 8eeeda6

Browse files
committed
initial commit
0 parents  commit 8eeeda6

File tree

169 files changed

+29922
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+29922
-0
lines changed

.codeclimate.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
languages:
2+
Ruby: false
3+
JavaScript: false
4+
Python: false
5+
PHP: true
6+
7+
exclude_paths:
8+
- tests/*
9+
- vendor/*
10+
- docs/*

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/build
2+
/composer.phar
3+
/composer.lock
4+
/vendor
5+
/test.php

.scrutinizer.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
build:
2+
nodes:
3+
analysis:
4+
project_setup:
5+
override:
6+
- 'true'
7+
tests:
8+
override:
9+
- php-scrutinizer-run
10+
-
11+
command: phpcs-run
12+
use_website_config: true
13+
environment:
14+
node:
15+
version: 6.0.0
16+
17+
filter:
18+
excluded_paths:
19+
- 'tests/*'
20+
- '*.min.js'
21+
- 'docs/*'
22+
- 'vendor/*'
23+
24+
checks:
25+
php: true
26+
javascript: true
27+
28+
coding_style:
29+
php:
30+
spaces:
31+
around_operators:
32+
assignment: true
33+
concatenation: true
34+
within:
35+
brackets: true

.styleci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
preset: laravel
2+
3+
risky: false
4+
5+
finder:
6+
exclude:
7+
- "build"
8+
- "docs"
9+
- "tests"

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: php
2+
3+
php:
4+
- 7.2
5+
- 7.1
6+
- 7.0
7+
8+
before_script:
9+
- composer self-update
10+
- composer install --prefer-source --no-interaction
11+
12+
script:
13+
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
14+
15+
after_success:
16+
- vendor/bin/test-reporter

README.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Laravel 5.5+ InfluxDB Database Package
2+
3+
[![Current Release](https://img.shields.io/github/release/austinheap/laravel-database-influxdb.svg)](https://github.com/austinheap/laravel-database-influxdb/releases)
4+
[![Total Downloads](https://img.shields.io/packagist/dt/austinheap/laravel-database-influxdb.svg)](https://packagist.org/packages/austinheap/laravel-database-influxdb)
5+
[![Build Status](https://travis-ci.org/austinheap/laravel-database-influxdb.svg?branch=master)](https://travis-ci.org/austinheap/laravel-database-influxdb)
6+
[![Code Climate](https://codeclimate.com/github/austinheap/laravel-database-influxdb/badges/gpa.svg)](https://codeclimate.com/github/austinheap/laravel-database-influxdb)
7+
[![Scrutinizer CI](https://scrutinizer-ci.com/g/austinheap/laravel-database-influxdb/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/austinheap/laravel-database-influxdb/)
8+
[![SensioLabs](https://insight.sensiolabs.com/projects/dc020687-c653-42f0-b006-79d5c7742fb0/mini.png)](https://insight.sensiolabs.com/projects/dc020687-c653-42f0-b006-79d5c7742fb0)
9+
[![Test Coverage](https://codeclimate.com/github/austinheap/laravel-database-influxdb/badges/coverage.svg)](https://codeclimate.com/github/austinheap/laravel-database-influxdb)
10+
[![StyleCI](https://styleci.io/repos/110926889/shield?branch=master)](https://styleci.io/repos/110926889)
11+
12+
## A package for accessing InfluxDB from Laravel 5.5+, based on configuration settings.
13+
14+
There is [documentation for `laravel-database-influxdb` online](https://austinheap.github.io/laravel-database-influxdb/),
15+
the source of which is in the [`docs/`](https://github.com/austinheap/laravel-database-influxdb/tree/master/docs)
16+
directory. The most logical place to start are the [docs for the `InfluxDbServiceProvider` class](https://austinheap.github.io/laravel-database-influxdb/classes/AustinHeap.Database.InfluxDb.InfluxDbServiceProvider.html).
17+
18+
## Installation
19+
20+
### Step 1: Composer
21+
22+
Via Composer command line:
23+
24+
```bash
25+
$ composer require austinheap/laravel-database-influxdb
26+
```
27+
28+
Or add the package to your `composer.json`:
29+
30+
```json
31+
{
32+
"require": {
33+
"austinheap/laravel-database-influxdb": "0.1.*"
34+
}
35+
}
36+
```
37+
38+
### Step 2: Enable the package (Optional)
39+
40+
This package implements Laravel 5.5's auto-discovery feature. After you install it the package provider and facade are added automatically.
41+
42+
If you would like to declare the provider and/or alias explicitly, then add the service provider to your `config/app.php`:
43+
44+
```php
45+
'providers' => [
46+
//
47+
AustinHeap\Database\InfluxDb\InfluxDbServiceProvider::class,
48+
];
49+
```
50+
51+
And then add the alias to your `config/app.php`:
52+
53+
```php
54+
'aliases' => [
55+
//
56+
'InfluxDb' => AustinHeap\Database\InfluxDb\InfluxDbFacade::class,
57+
];
58+
```
59+
60+
### Step 3: Configure the package
61+
62+
Publish the package config file:
63+
64+
```bash
65+
$ php artisan vendor:publish --provider="AustinHeap\Database\InfluxDb\InfluxDbServiceProvider"
66+
```
67+
68+
You may now place your defaults in `config/influxdb.php`.
69+
70+
## Full .env Example
71+
72+
To override values in `config/influxdb.php`, simply add the following to your .env file:
73+
74+
```bash
75+
INFLUXDB_PROTOCOL=https
76+
INFLUXDB_USER=my-influxdb-user
77+
INFLUXDB_PASS=my-influxdb-pass
78+
INFLUXDB_HOST=my-influxdb.server
79+
```
80+
81+
## References
82+
83+
- [influxdata/influxdb-php](https://github.com/influxdata/influxdb-php)
84+
85+
## Credits
86+
87+
This is a fork of [pdffiller/laravel-influx-provider](https://github.com/pdffiller/laravel-influx-provider).
88+
89+
- [pdffiller/laravel-influx-provider Contributors](https://github.com/pdffiller/laravel-influx-provider/graphs/contributors)
90+
91+
## License
92+
93+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "austinheap/laravel-database-influxdb",
3+
"description": "A package for accessing InfluxDB from Laravel 5.5+, based on configuration settings.",
4+
"keywords": [
5+
"influx",
6+
"influxdb",
7+
"influx-db",
8+
"database",
9+
"timeseries",
10+
"laravel"
11+
],
12+
"homepage": "https://github.com/austinheap/laravel-database-influxdb",
13+
"license": "MIT",
14+
"authors": [
15+
{
16+
"name": "Austin Heap",
17+
"email": "me@austinheap.com",
18+
"homepage": "https://github.com/austinheap",
19+
"role": "Developer"
20+
}
21+
],
22+
"require": {
23+
"laravel/framework": "5.5.*",
24+
"illuminate/log": "5.5.*",
25+
"illuminate/support": "5.5.*",
26+
"influxdb/influxdb-php": "^1.14.4",
27+
"monolog/monolog": "~1.12"
28+
},
29+
"require-dev": {
30+
"codeclimate/php-test-reporter": "dev-master",
31+
"phpunit/phpunit": "~6.0"
32+
},
33+
"autoload": {
34+
"psr-4": {
35+
"AustinHeap\\Database\\InfluxDb\\": "src"
36+
},
37+
"files": [
38+
"src/helpers.php"
39+
]
40+
},
41+
"minimum-stability": "stable",
42+
"extra": {
43+
"laravel": {
44+
"providers": [
45+
"AustinHeap\\Database\\InfluxDb\\InfluxDbServiceProvider"
46+
],
47+
"aliases": {
48+
"InfluxDb": "AustinHeap\\Database\\InfluxDb\\InfluxDbFacade"
49+
}
50+
}
51+
}
52+
}

docs/checkstyle.xml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0"?>
2+
<checkstyle version="1.3.0">
3+
<file name="helpers.php">
4+
<error line="14" severity="error" message="No summary for function \influxdb()" source="phpDocumentor.file.PPC:ERR-50011"/>
5+
</file>
6+
<file name="InfluxDbServiceProvider.php">
7+
<error line="29" severity="error" message="No summary for method boot()" source="phpDocumentor.file.PPC:ERR-50008"/>
8+
<error line="52" severity="error" message="No summary for method register()" source="phpDocumentor.file.PPC:ERR-50008"/>
9+
<error line="83" severity="error" message="No summary for method getLoggingLevel()" source="phpDocumentor.file.PPC:ERR-50008"/>
10+
<error line="103" severity="error" message="No summary for method getInstance()" source="phpDocumentor.file.PPC:ERR-50008"/>
11+
</file>
12+
<file name="config/influxdb.php"/>
13+
<file name="Jobs/WritePoints.php">
14+
<error line="89" severity="error" message="No summary for method handle()" source="phpDocumentor.file.PPC:ERR-50008"/>
15+
<error line="52" severity="error" message="No summary for property $points" source="phpDocumentor.file.PPC:ERR-50007"/>
16+
<error line="57" severity="error" message="No summary for property $precision" source="phpDocumentor.file.PPC:ERR-50007"/>
17+
<error line="62" severity="error" message="No summary for property $retentionPolicy" source="phpDocumentor.file.PPC:ERR-50007"/>
18+
</file>
19+
<file name="Jobs/WritePayload.php">
20+
<error line="89" severity="error" message="No summary for method handle()" source="phpDocumentor.file.PPC:ERR-50008"/>
21+
<error line="52" severity="error" message="No summary for property $payload" source="phpDocumentor.file.PPC:ERR-50007"/>
22+
<error line="57" severity="error" message="No summary for property $precision" source="phpDocumentor.file.PPC:ERR-50007"/>
23+
<error line="62" severity="error" message="No summary for property $retentionPolicy" source="phpDocumentor.file.PPC:ERR-50007"/>
24+
</file>
25+
<file name="Jobs/Job.php">
26+
<error line="31" severity="error" message="No summary for property $args" source="phpDocumentor.file.PPC:ERR-50007"/>
27+
</file>
28+
<file name="Logs/Formatter.php">
29+
<error line="22" severity="error" message="Argument $record is missing from the Docblock of format" source="phpDocumentor.file.PPC:ERR-50015"/>
30+
<error line="36" severity="error" message="No summary for method prepareMessage()" source="phpDocumentor.file.PPC:ERR-50008"/>
31+
<error line="102" severity="error" message="No summary for method rfc5424ToSeverity()" source="phpDocumentor.file.PPC:ERR-50008"/>
32+
<error line="125" severity="error" message="No summary for method replaceDigitData()" source="phpDocumentor.file.PPC:ERR-50008"/>
33+
<error line="138" severity="error" message="No summary for method trimLines()" source="phpDocumentor.file.PPC:ERR-50008"/>
34+
</file>
35+
<file name="Jobs/Write.php">
36+
<error line="51" severity="error" message="No summary for method handle()" source="phpDocumentor.file.PPC:ERR-50008"/>
37+
<error line="22" severity="error" message="No summary for property $payload" source="phpDocumentor.file.PPC:ERR-50007"/>
38+
<error line="27" severity="error" message="No summary for property $parameters" source="phpDocumentor.file.PPC:ERR-50007"/>
39+
</file>
40+
<file name="InfluxDbFacade.php">
41+
<error line="28" severity="error" message="No summary for method getFacadeAccessor()" source="phpDocumentor.file.PPC:ERR-50008"/>
42+
<error line="39" severity="error" message="No summary for method __callStatic()" source="phpDocumentor.file.PPC:ERR-50008"/>
43+
<error line="58" severity="error" message="No summary for method write()" source="phpDocumentor.file.PPC:ERR-50008"/>
44+
<error line="77" severity="error" message="No summary for method writePayload()" source="phpDocumentor.file.PPC:ERR-50008"/>
45+
<error line="99" severity="error" message="No summary for method writePoints()" source="phpDocumentor.file.PPC:ERR-50008"/>
46+
</file>
47+
<file name="Logs/MonologHandler.php">
48+
<error line="36" severity="error" message="No summary for method write()" source="phpDocumentor.file.PPC:ERR-50008"/>
49+
</file>
50+
</checkstyle>

0 commit comments

Comments
 (0)