diff --git a/.gitignore b/.gitignore index a4c3eb7..f769198 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,6 @@ config.json *.csr *.sublime-project *.sublime-workspace + +### Docs ### +doc/ diff --git a/README.md b/README.md index c5c6d87..2548e79 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,34 @@ Copy config.json.sample to config.json and edit to match your information. `go build core/server.go` +## Docs + +Api docs are available at https://openaccounting.io/api/ + +You may also build and run the docs locally with [apidoc](apidocjs.com) + +#### Requires [yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/) + +### Step 1: + +Install `apidoc` + +```bash +npm install apidoc -g +``` + +### Step 2: + +Simply run `apidoc` within the source code root directory, this will automatically generate the documentation and write the output to`./doc` + +```bash +apidoc +``` + +### Step 3: + +You may now navigate to the `./docs` directory and run any http server, or simply open `index.html` in your favorite browser! + ## Help -[Join our Slack chatroom](https://join.slack.com/t/openaccounting/shared_invite/enQtNDc3NTAyNjYyOTYzLTc0ZjRjMzlhOTg5MmYwNGQxZGQyM2IzZTExZWE0NDFlODRlNGVhZmZiNDkyZDlhODYwZDcyNTQ5ZWJkMDU3N2M) and talk with us! \ No newline at end of file +[Join our Slack chatroom](https://join.slack.com/t/openaccounting/shared_invite/enQtNDc3NTAyNjYyOTYzLTc0ZjRjMzlhOTg5MmYwNGQxZGQyM2IzZTExZWE0NDFlODRlNGVhZmZiNDkyZDlhODYwZDcyNTQ5ZWJkMDU3N2M) and talk with us! diff --git a/config.json b/config.json new file mode 100644 index 0000000..fd842f2 --- /dev/null +++ b/config.json @@ -0,0 +1,17 @@ +{ + "WebUrl": "https://domain.com", + "Address": "", + "Port": 8080, + "ApiPrefix": "", + "KeyFile": "", + "CertFile": "", + "DatabaseAddress": "localhost:5432", + "Database": "openaccounting?sslmode=disable", + "User": "postgresql://openaccounting", + "Password": "openaccounting", + "MailgunDomain": "mg.domain.com", + "MailgunKey": "", + "MailgunEmail": "noreply@domain.com", + "MailgunSender": "Sender", + "Driver": "postgres" +} diff --git a/core/model/db/db.go b/core/model/db/db.go index 5bf638a..e0d82e9 100644 --- a/core/model/db/db.go +++ b/core/model/db/db.go @@ -3,6 +3,7 @@ package db import ( "database/sql" _ "github.com/go-sql-driver/mysql" + _ "github.com/lib/pq" ) type DB struct { @@ -22,9 +23,9 @@ type Datastore interface { BudgetInterface } -func NewDB(dataSourceName string) (*DB, error) { +func NewDB(dataSourceName string, sqldialict string) (*DB, error) { var err error - db, err := sql.Open("mysql", dataSourceName) + db, err := sql.Open(sqldialict, dataSourceName) if err != nil { return nil, err } diff --git a/core/model/types/config.go b/core/model/types/config.go index b2b821e..093af03 100644 --- a/core/model/types/config.go +++ b/core/model/types/config.go @@ -15,4 +15,5 @@ type Config struct { MailgunKey string MailgunEmail string MailgunSender string + Driver string } diff --git a/core/server.go b/core/server.go index 71457bc..f18b1dc 100644 --- a/core/server.go +++ b/core/server.go @@ -25,18 +25,23 @@ func main() { log.Fatal(fmt.Errorf("failed to open ./config.json with: %s", err.Error())) } + decoder := json.NewDecoder(file) err = decoder.Decode(&config) if err != nil { log.Fatal(fmt.Errorf("failed to decode ./config.json with: %s", err.Error())) + } else { + log.Println("Config success") } connectionString := config.User + ":" + config.Password + "@" + config.DatabaseAddress + "/" + config.Database - db, err := db.NewDB(connectionString) + db, err := db.NewDB(connectionString, config.Driver) if err != nil { log.Fatal(fmt.Errorf("failed to connect to database with: %s", err.Error())) + } else { + log.Println("DB connection successfull") } bc := &util.StandardBcrypt{} @@ -47,11 +52,20 @@ func main() { app, err := api.Init(config.ApiPrefix) if err != nil { log.Fatal(fmt.Errorf("failed to create api instance with: %s", err.Error())) + } else { + log.Println("API config successfull") } if config.CertFile == "" || config.KeyFile == "" { err = http.ListenAndServe(config.Address+":"+strconv.Itoa(config.Port), app.MakeHandler()) + log.Println("CertFile is null",err) + if err != nil { + log.Fatal(fmt.Errorf("failed to start server : %s", err.Error())) + } else { + log.Println("Server runnging successfull on ", config.Port) + } } else { + log.Println("CertFile is not null") err = http.ListenAndServeTLS(config.Address+":"+strconv.Itoa(config.Port), config.CertFile, config.KeyFile, app.MakeHandler()) } log.Fatal(fmt.Errorf("failed to start server with: %s", err.Error())) diff --git a/go.mod b/go.mod index 47b7ec9..667d04e 100644 --- a/go.mod +++ b/go.mod @@ -1,16 +1,27 @@ module github.com/openaccounting/oa-server +go 1.17 + require ( github.com/Masterminds/semver v0.0.0-20180807142431-c84ddcca87bf github.com/ant0ine/go-json-rest v0.0.0-20170913041208-ebb33769ae01 github.com/go-sql-driver/mysql v1.4.1 github.com/gorilla/websocket v0.0.0-20180605202552-5ed622c449da + github.com/lib/pq v1.10.3 github.com/mailgun/mailgun-go/v4 v4.3.0 github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675 - github.com/sendgrid/rest v0.0.0-20180905234047-875828e14d98 // indirect - github.com/sendgrid/sendgrid-go v0.0.0-20180905233524-8cb43f4ca4f5 // indirect github.com/stretchr/objx v0.3.0 // indirect github.com/stretchr/testify v1.3.0 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 google.golang.org/appengine v1.6.7 // indirect ) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-chi/chi v4.0.0+incompatible // indirect + github.com/json-iterator/go v1.1.10 // indirect + github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect + github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect + github.com/pkg/errors v0.8.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect +) diff --git a/go.sum b/go.sum index 738319e..0c6ac3a 100644 --- a/go.sum +++ b/go.sum @@ -15,13 +15,14 @@ github.com/go-chi/chi v4.0.0+incompatible h1:SiLLEDyAkqNnw+T/uDTf3aFB9T4FTrwMpuY github.com/go-chi/chi v4.0.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/websocket v0.0.0-20180605202552-5ed622c449da h1:b5fma7aUP2fn6+tdKKCJ0TxXYzY/5wDiqUxNdyi5VF4= github.com/gorilla/websocket v0.0.0-20180605202552-5ed622c449da/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg= +github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mailgun/mailgun-go/v4 v4.3.0 h1:9nAF7LI3k6bfDPbMZQMMl63Q8/vs+dr1FUN8eR1XMhk= github.com/mailgun/mailgun-go/v4 v4.3.0/go.mod h1:fWuBI2iaS/pSSyo6+EBpHjatQO3lV8onwqcRy7joSJI= github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675 h1:/rdJjIiKG5rRdwG5yxHmSE/7ZREjpyC0kL7GxGT/qJw= @@ -34,30 +35,17 @@ github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sendgrid/rest v0.0.0-20180905234047-875828e14d98 h1:wpBZ5DAYLNl+2v4E4WP8k/y8tM5OjIf1FezJS1qX8sU= -github.com/sendgrid/rest v0.0.0-20180905234047-875828e14d98/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE= -github.com/sendgrid/sendgrid-go v0.0.0-20180905233524-8cb43f4ca4f5 h1:V18LU+jSbihmDiWfLSzs9FV1d3KVB1gRTkNxgVHmcvg= -github.com/sendgrid/sendgrid-go v0.0.0-20180905233524-8cb43f4ca4f5/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -golang.org/x/crypto v0.0.0-20171231215028-0fcca4842a8d h1:GrqEEc3+MtHKTsZrdIGVoYDgLpbSRzW1EF+nLu0PcHE= -golang.org/x/crypto v0.0.0-20171231215028-0fcca4842a8d/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= diff --git a/migrations/migrate1.go b/migrations/migrate1.go index d5bd796..b8dd126 100644 --- a/migrations/migrate1.go +++ b/migrations/migrate1.go @@ -35,7 +35,7 @@ func main() { } connectionString := config.User + ":" + config.Password + "@/" + config.Database - db, err := db.NewDB(connectionString) + db, err := db.NewDB(connectionString, "mysql") if command == "upgrade" { err = upgrade(db) diff --git a/migrations/migrate2.go b/migrations/migrate2.go index 5a09364..007d86e 100644 --- a/migrations/migrate2.go +++ b/migrations/migrate2.go @@ -35,7 +35,7 @@ func main() { } connectionString := config.User + ":" + config.Password + "@/" + config.Database - db, err := db.NewDB(connectionString) + db, err := db.NewDB(connectionString, "mysql") if command == "upgrade" { err = upgrade(db) diff --git a/migrations/migrate3.go b/migrations/migrate3.go index 608e1f9..a79b2c5 100644 --- a/migrations/migrate3.go +++ b/migrations/migrate3.go @@ -35,7 +35,7 @@ func main() { } connectionString := config.User + ":" + config.Password + "@/" + config.Database - db, err := db.NewDB(connectionString) + db, err := db.NewDB(connectionString, "mysql") if command == "upgrade" { err = upgrade(db) diff --git a/schema_postgresql.sql b/schema_postgresql.sql new file mode 100644 index 0000000..931c3b0 --- /dev/null +++ b/schema_postgresql.sql @@ -0,0 +1,37 @@ +DROP DATABASE IF EXISTS openaccounting; + +CREATE DATABASE openaccounting + WITH + OWNER = openaccounting + ENCODING = 'UTF8' + CONNECTION LIMIT = -1; + +use openaccounting; + +CREATE TABLE org (id CHAR(16) NOT NULL, inserted BIGINT NOT NULL, updated BIGINT NOT NULL, name VARCHAR(100) NOT NULL, currency VARCHAR(10) NOT NULL, precision INT NOT NULL, timezone VARCHAR(100) NOT NULL); + +CREATE TABLE "user" (id CHAR(16) NOT NULL, inserted BIGINT NOT NULL, updated BIGINT NOT NULL, firstName VARCHAR(50) NOT NULL, lastName VARCHAR(50) NOT NULL, email VARCHAR(100) NOT NULL, passwordHash VARCHAR(100) NOT NULL, agreeToTerms BOOLEAN NOT NULL, passwordReset VARCHAR(32) NOT NULL, emailVerified BOOLEAN NOT NULL, emailVerifyCode VARCHAR(32) NOT NULL, signupSource VARCHAR(100) NOT NULL, UNIQUE(email)); + +CREATE TABLE userorg (id SERIAL PRIMARY KEY, userId CHAR(16) NOT NULL, orgId CHAR(16) NOT NULL, admin BOOLEAN NOT NULL DEFAULT false); + +CREATE TABLE token (id CHAR(16) NOT NULL, name VARCHAR(100), userOrgId INT NOT NULL); + +CREATE TABLE account (id CHAR(16) NOT NULL, orgId CHAR(16) NOT NULL, inserted BIGINT NOT NULL, updated BIGINT NOT NULL, name VARCHAR(100) NOT NULL, parent CHAR(16) NOT NULL, currency VARCHAR(10) NOT NULL, precision INT NOT NULL, debitBalance BOOLEAN NOT NULL); + +CREATE TABLE transaction (id CHAR(16) NOT NULL, orgId CHAR(16) NOT NULL, userId CHAR(16) NOT NULL, date BIGINT NOT NULL, inserted BIGINT NOT NULL, updated BIGINT NOT NULL, description VARCHAR(300) NOT NULL, data TEXT NOT NULL, deleted BOOLEAN NOT NULL DEFAULT false); + +CREATE TABLE split (id SERIAL PRIMARY KEY, transactionId CHAR(16) NOT NULL, accountId CHAR(16) NOT NULL, date BIGINT NOT NULL, inserted BIGINT NOT NULL, updated BIGINT NOT NULL, amount BIGINT NOT NULL, nativeAmount BIGINT NOT NULL, deleted BOOLEAN NOT NULL DEFAULT false); + +CREATE TABLE balance (id SERIAL PRIMARY KEY, date BIGINT NOT NULL, accountId CHAR(16) NOT NULL, amount BIGINT NOT NULL); + +CREATE TABLE permission (id CHAR(16) NOT NULL, userId CHAR(16), tokenId CHAR(16), orgId CHAR(16) NOT NULL, accountId CHAR(16) NOT NULL, type INT NOT NULL, inserted BIGINT NOT NULL, updated BIGINT NOT NULL); + +CREATE TABLE price (id CHAR(16) NOT NULL, orgId CHAR(16) NOT NULL, currency VARCHAR(10) NOT NULL, date BIGINT NOT NULL, inserted BIGINT NOT NULL, updated BIGINT NOT NULL, price DOUBLE PRECISION NOT NULL); + +CREATE TABLE session (id CHAR(16) NOT NULL, inserted BIGINT NOT NULL, updated BIGINT NOT NULL, userId CHAR(16) NOT NULL, terminated BIGINT ); + +CREATE TABLE apikey (id CHAR(16) NOT NULL, inserted BIGINT NOT NULL, updated BIGINT NOT NULL, userId CHAR(16) NOT NULL, label VARCHAR(300) NOT NULL, deleted BIGINT ); + +CREATE TABLE invite (id VARCHAR(32) NOT NULL, orgId CHAR(16) NOT NULL, inserted BIGINT NOT NULL, updated BIGINT NOT NULL, email VARCHAR(100) NOT NULL, accepted BOOLEAN NOT NULL); + +CREATE TABLE budgetitem (id SERIAL PRIMARY KEY, orgId CHAR(16) NOT NULL, accountId CHAR(16) NOT NULL, inserted BIGINT NOT NULL, amount BIGINT NOT NULL); \ No newline at end of file diff --git a/vendor/github.com/json-iterator/go/go.mod b/vendor/github.com/json-iterator/go/go.mod deleted file mode 100644 index e05c42f..0000000 --- a/vendor/github.com/json-iterator/go/go.mod +++ /dev/null @@ -1,11 +0,0 @@ -module github.com/json-iterator/go - -go 1.12 - -require ( - github.com/davecgh/go-spew v1.1.1 - github.com/google/gofuzz v1.0.0 - github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 - github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 - github.com/stretchr/testify v1.3.0 -) diff --git a/vendor/github.com/json-iterator/go/go.sum b/vendor/github.com/json-iterator/go/go.sum deleted file mode 100644 index d778b5a..0000000 --- a/vendor/github.com/json-iterator/go/go.sum +++ /dev/null @@ -1,14 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/vendor/github.com/mailgun/mailgun-go/v4/go.mod b/vendor/github.com/mailgun/mailgun-go/v4/go.mod deleted file mode 100644 index c905e46..0000000 --- a/vendor/github.com/mailgun/mailgun-go/v4/go.mod +++ /dev/null @@ -1,12 +0,0 @@ -module github.com/mailgun/mailgun-go/v4 - -go 1.13 - -require ( - github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 - github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect - github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 // indirect - github.com/go-chi/chi v4.0.0+incompatible - github.com/json-iterator/go v1.1.10 - github.com/pkg/errors v0.8.1 -) diff --git a/vendor/github.com/mailgun/mailgun-go/v4/go.sum b/vendor/github.com/mailgun/mailgun-go/v4/go.sum deleted file mode 100644 index 11af54e..0000000 --- a/vendor/github.com/mailgun/mailgun-go/v4/go.sum +++ /dev/null @@ -1,23 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= -github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= -github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/go-chi/chi v4.0.0+incompatible h1:SiLLEDyAkqNnw+T/uDTf3aFB9T4FTrwMpuYrgaRcnW4= -github.com/go-chi/chi v4.0.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/vendor/github.com/stretchr/objx/go.mod b/vendor/github.com/stretchr/objx/go.mod deleted file mode 100644 index 31ec5a7..0000000 --- a/vendor/github.com/stretchr/objx/go.mod +++ /dev/null @@ -1,8 +0,0 @@ -module github.com/stretchr/objx - -go 1.12 - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/stretchr/testify v1.3.0 -) diff --git a/vendor/github.com/stretchr/objx/go.sum b/vendor/github.com/stretchr/objx/go.sum deleted file mode 100644 index 4f89841..0000000 --- a/vendor/github.com/stretchr/objx/go.sum +++ /dev/null @@ -1,8 +0,0 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/vendor/modules.txt b/vendor/modules.txt index 8719dd3..6dd0b9e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,38 +1,82 @@ # github.com/Masterminds/semver v0.0.0-20180807142431-c84ddcca87bf +## explicit github.com/Masterminds/semver # github.com/ant0ine/go-json-rest v0.0.0-20170913041208-ebb33769ae01 +## explicit github.com/ant0ine/go-json-rest/rest github.com/ant0ine/go-json-rest/rest/trie # github.com/davecgh/go-spew v1.1.1 +## explicit github.com/davecgh/go-spew/spew +# github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 +## explicit +# github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 +## explicit +# github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 +## explicit # github.com/go-chi/chi v4.0.0+incompatible +## explicit github.com/go-chi/chi # github.com/go-sql-driver/mysql v1.4.1 +## explicit github.com/go-sql-driver/mysql +# github.com/golang/protobuf v1.3.1 +## explicit +# github.com/google/gofuzz v1.0.0 +## explicit; go 1.12 # github.com/gorilla/websocket v0.0.0-20180605202552-5ed622c449da +## explicit github.com/gorilla/websocket # github.com/json-iterator/go v1.1.10 +## explicit; go 1.12 github.com/json-iterator/go +# github.com/lib/pq v1.10.3 +## explicit; go 1.13 +github.com/lib/pq +github.com/lib/pq/oid +github.com/lib/pq/scram # github.com/mailgun/mailgun-go/v4 v4.3.0 +## explicit; go 1.13 github.com/mailgun/mailgun-go/v4 github.com/mailgun/mailgun-go/v4/events # github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675 +## explicit github.com/mitchellh/mapstructure # github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 +## explicit github.com/modern-go/concurrent # github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 +## explicit github.com/modern-go/reflect2 # github.com/pkg/errors v0.8.1 +## explicit github.com/pkg/errors # github.com/pmezard/go-difflib v1.0.0 +## explicit github.com/pmezard/go-difflib/difflib +# github.com/sendgrid/rest v0.0.0-20180905234047-875828e14d98 +## explicit +# github.com/sendgrid/sendgrid-go v0.0.0-20180905233524-8cb43f4ca4f5 +## explicit # github.com/stretchr/objx v0.3.0 +## explicit; go 1.12 github.com/stretchr/objx # github.com/stretchr/testify v1.3.0 -github.com/stretchr/testify/mock +## explicit github.com/stretchr/testify/assert +github.com/stretchr/testify/mock # golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 +## explicit golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish +# golang.org/x/net v0.0.0-20190603091049-60506f45cf65 +## explicit +# golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a +## explicit +# golang.org/x/text v0.3.2 +## explicit +# golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e +## explicit # google.golang.org/appengine v1.6.7 +## explicit; go 1.11 google.golang.org/appengine/cloudsql