Skip to content
This repository was archived by the owner on Feb 9, 2025. It is now read-only.

Commit 51e6f99

Browse files
committed
Init PostgreSQL module
1 parent 4e48bef commit 51e6f99

File tree

6 files changed

+496
-2
lines changed

6 files changed

+496
-2
lines changed

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: go
2+
go:
3+
- 1.11.x
4+
env:
5+
- GO111MODULE=on
6+
install:
7+
- go get -v golang.org/x/lint/golint
8+
- go mod tidy -v
9+
script:
10+
- golint -set_exit_status ./...
11+
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
12+
after_success:
13+
- bash <(curl -s https://codecov.io/bash)
14+
matrix:
15+
allow_failures:
16+
- go: tip

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
1-
# postgres
2-
PostgreSQL module provides you connection to PostgreSQL server
1+
# PostgreSQL module (for Helium) provides you connection to PostgreSQL server
2+
3+
Module provides you connection to PostgreSQL server
4+
- `*pg.DB` is a database handle representing a pool of zero or more underlying connections. It's safe for concurrent use by multiple goroutines
5+
6+
Configuration:
7+
- yaml example
8+
```yaml
9+
posgres:
10+
address: string
11+
username: string
12+
password: string
13+
database: string
14+
debug: bool
15+
pool_size: int
16+
```
17+
- env example
18+
```
19+
POSTGRES_ADDRESS=string
20+
POSTGRES_USERNAME=string
21+
POSTGRES_PASSWORD=string
22+
POSTGRES_DATABASE=string
23+
POSTGRES_DEBUG=bool
24+
POSTGRES_POOL_SIZE=int
25+
```

go.mod

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module github.com/go-helium/postgres
2+
3+
require (
4+
github.com/go-pg/pg v8.0.1+incompatible
5+
github.com/im-kulikov/helium v0.9.2
6+
github.com/pkg/errors v0.8.1
7+
github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa
8+
github.com/spf13/viper v1.3.1
9+
go.uber.org/zap v1.9.1
10+
)

0 commit comments

Comments
 (0)