Skip to content

Commit 3c501e1

Browse files
tjholmjyecuschHomelessDinosaur
authored
fix: GA v1 Go SDK (#90)
* Simplify middleware implementation, inspired by net/http * Panic on resource creation or permission requests that fail - these errors are typically unrecoverable * Allow handler parameters to accept interface{} allowing for more handler func type flexibilty * Add sql database resource support * Remove requirement to return Ctx from handlers (pointers are used instead for Ctx modification) * Update product structure, moving all resources to their own packages * Use a single grpc connection to nitric server for efficiency * Make the handlers and workers packages internal to avoid auto-complete pollution in IDEs * Panic if nitric.Run() fails --------- Co-authored-by: Jye Cusch <jye.cusch@nitric.io> Co-authored-by: Ryan Cartwright <fryzee.cartwright@gmail.com>
1 parent 39332d4 commit 3c501e1

File tree

106 files changed

+2606
-5470
lines changed

Some content is hidden

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

106 files changed

+2606
-5470
lines changed

.golangci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
run:
22
timeout: "5m"
3-
skip-files:
4-
- tools/tools.go
5-
- doc.go
63

74
linters:
85
disable-all: true
@@ -23,6 +20,9 @@ linters:
2320
issues:
2421
max-issues-per-linter: 0
2522
max-same-issues: 0
23+
exclude-files:
24+
- tools/tools.go
25+
- doc.go
2626
exclude-rules:
2727
- path: _test\.go
2828
linters:

Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,13 @@ generate:
4949
go run github.com/golang/mock/mockgen github.com/nitrictech/nitric/core/pkg/proto/secrets/v1 SecretManagerClient > mocks/secrets.go
5050
go run github.com/golang/mock/mockgen github.com/nitrictech/nitric/core/pkg/proto/topics/v1 TopicsClient > mocks/topics.go
5151
go run github.com/golang/mock/mockgen -package mock_v1 google.golang.org/grpc ClientConnInterface > mocks/grpc_clientconn.go
52-
go run github.com/golang/mock/mockgen -package mockapi github.com/nitrictech/go-sdk/api/keyvalue KeyValue,Store > mocks/mockapi/keyvalue.go
53-
go run github.com/golang/mock/mockgen -package mockapi github.com/nitrictech/go-sdk/api/queues Queues,Queue > mocks/mockapi/queues.go
54-
go run github.com/golang/mock/mockgen -package mockapi github.com/nitrictech/go-sdk/api/secrets Secrets,SecretRef > mocks/mockapi/secrets.go
55-
go run github.com/golang/mock/mockgen -package mockapi github.com/nitrictech/go-sdk/api/storage Storage,Bucket > mocks/mockapi/storage.go
56-
go run github.com/golang/mock/mockgen -package mockapi github.com/nitrictech/go-sdk/api/topics Topics,Topic > mocks/mockapi/topics.go
5752

5853
# Runs tests for coverage upload to codecov.io
5954
test-ci: generate
6055
@echo Testing Nitric Go SDK
61-
@go run github.com/onsi/ginkgo/ginkgo -cover -outputdir=./ -coverprofile=all.coverprofile ./resources/... ./api/... ./faas/...
56+
@go run github.com/onsi/ginkgo/ginkgo -cover -outputdir=./ -coverprofile=all.coverprofile ./...
6257

6358
.PHONY: test
6459
test: generate
6560
@echo Testing Nitric Go SDK
66-
@go run github.com/onsi/ginkgo/ginkgo -cover ./resources/... ./api/... ./faas/...
61+
@go run github.com/onsi/ginkgo/ginkgo -cover ./...

api/keyvalue/keyvalue.go

Lines changed: 0 additions & 67 deletions
This file was deleted.

api/keyvalue/keyvalue_test.go

Lines changed: 0 additions & 98 deletions
This file was deleted.

api/queues/queues.go

Lines changed: 0 additions & 66 deletions
This file was deleted.

api/queues/queues_test.go

Lines changed: 0 additions & 99 deletions
This file was deleted.

0 commit comments

Comments
 (0)