Skip to content

Commit 722ff96

Browse files
authored
Merge pull request #591 from spaceuptech/v0.15.0
V0.15.0
2 parents 2d3ab1e + 524daa7 commit 722ff96

Some content is hidden

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

110 files changed

+7721
-2173
lines changed

config/config.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ type Modules struct {
5656
}
5757

5858
// Crud holds the mapping of database level configuration
59-
type Crud map[string]*CrudStub // The key here is the database type
59+
type Crud map[string]*CrudStub // The key here is the alias for database type
6060

6161
// CrudStub holds the config at the database level
6262
type CrudStub struct {
63+
Type string `json:"type" yaml:"type"` // database type
6364
Conn string `json:"conn" yaml:"conn"`
6465
Collections map[string]*TableRule `json:"collections" yaml:"collections"` // The key here is table name
6566
IsPrimary bool `json:"isPrimary" yaml:"isPrimary"`
@@ -85,6 +86,9 @@ type Rule struct {
8586
Col string `json:"col,omitempty" yaml:"col,omitempty"`
8687
Find map[string]interface{} `json:"find,omitempty" yaml:"find,omitempty"`
8788
Url string `json:"url,omitempty" yaml:"url,omitempty"`
89+
Fields []string `json:"fields,omitempty" yaml:"fields,omitempty`
90+
Field string `json:"field,omitempty" yaml:"field,omitempty`
91+
Value interface{} `json:"value,omitempty" yaml:"value,omitempty`
8892
}
8993

9094
// Auth holds the mapping of the sign in method

config/generate.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ func GenerateConfig(configFilePath string) error {
7070
if err != nil {
7171
return err
7272
}
73-
if i.PrimaryDB == "mysql" || i.PrimaryDB == "postgres" {
74-
i.PrimaryDB = "sql-" + i.PrimaryDB
75-
}
7673

7774
// Ask for the connection string
7875
err = survey.AskOne(&survey.Input{Message: "connection string (" + i.PrimaryDB + ")", Default: getConnectionString(i.PrimaryDB)}, &i.Conn, survey.Required)
@@ -141,6 +138,7 @@ func formatProjectID(id string) string {
141138
}
142139

143140
func getConnectionString(db string) string {
141+
144142
switch db {
145143
case string(utils.Mongo):
146144
return "mongodb://localhost:27017"

go.mod

+29-6
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,68 @@ module github.com/spaceuptech/space-cloud
22

33
require (
44
cloud.google.com/go v0.38.0
5+
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 // indirect
56
github.com/aws/aws-sdk-go v1.19.7
7+
github.com/coreos/bbolt v1.3.3 // indirect
8+
github.com/coreos/etcd v3.3.17+incompatible
9+
github.com/coreos/go-semver v0.3.0 // indirect
10+
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
11+
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
612
github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0
713
github.com/dgrijalva/jwt-go v3.2.0+incompatible
814
github.com/doug-martin/goqu/v8 v8.1.0
915
github.com/fatih/structs v1.1.0
1016
github.com/getlantern/deepcopy v0.0.0-20160317154340-7f45deb8130a
1117
github.com/go-sql-driver/mysql v1.4.1
1218
github.com/go-stack/stack v1.8.0 // indirect
19+
github.com/gogo/protobuf v1.3.1 // indirect
20+
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect
21+
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
1322
github.com/google/go-cmp v0.3.0
23+
github.com/google/uuid v1.1.1 // indirect
1424
github.com/gorilla/mux v1.7.3
1525
github.com/gorilla/websocket v1.4.0
1626
github.com/graph-gophers/dataloader v5.0.0+incompatible
1727
github.com/graphql-go/graphql v0.7.8
18-
github.com/hashicorp/consul v1.6.1
28+
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
29+
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
30+
github.com/grpc-ecosystem/grpc-gateway v1.12.1 // indirect
1931
github.com/hashicorp/consul/api v1.2.0
32+
github.com/hashicorp/go-msgpack v0.5.5 // indirect
33+
github.com/hashicorp/memberlist v0.1.5 // indirect
2034
github.com/jmoiron/sqlx v1.2.0
35+
github.com/jonboulle/clockwork v0.1.0 // indirect
36+
github.com/json-iterator/go v1.1.9 // indirect
2137
github.com/kr/pty v1.1.4 // indirect
2238
github.com/lib/pq v1.2.0
2339
github.com/mattn/go-sqlite3 v1.11.0 // indirect
2440
github.com/mitchellh/mapstructure v1.1.2
41+
github.com/modern-go/reflect2 v1.0.1 // indirect
2542
github.com/nats-io/nats-server/v2 v2.0.2
2643
github.com/nats-io/nats.go v1.8.1
27-
github.com/opentracing/opentracing-go v1.1.0 // indirect
2844
github.com/rs/cors v1.6.0
2945
github.com/satori/go.uuid v1.2.0
3046
github.com/segmentio/ksuid v1.0.2
47+
github.com/soheilhy/cmux v0.1.4 // indirect
3148
github.com/stretchr/objx v0.2.0 // indirect
3249
github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51 // indirect
50+
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
3351
github.com/urfave/cli v1.20.0
3452
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect
3553
github.com/xdg/stringprep v1.0.0 // indirect
54+
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
55+
go.etcd.io/bbolt v1.3.3 // indirect
3656
go.mongodb.org/mongo-driver v1.1.1
3757
go.opencensus.io v0.22.0 // indirect
38-
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
39-
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80
58+
go.uber.org/zap v1.13.0 // indirect
59+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
60+
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0
61+
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // indirect
62+
golang.org/x/tools v0.0.0-20191217033636-bbbf87ae2631 // indirect
4063
google.golang.org/api v0.7.0
41-
google.golang.org/genproto v0.0.0-20190530194941-fb225487d101 // indirect
4264
gopkg.in/AlecAivazis/survey.v1 v1.8.2
43-
gopkg.in/yaml.v2 v2.2.2
65+
gopkg.in/yaml.v2 v2.2.3
66+
sigs.k8s.io/yaml v1.1.0 // indirect
4467

4568
)
4669

0 commit comments

Comments
 (0)