diff --git a/nitric/handlers/handlers.go b/internal/handlers/handlers.go similarity index 100% rename from nitric/handlers/handlers.go rename to internal/handlers/handlers.go diff --git a/nitric/handlers/handlers_test.go b/internal/handlers/handlers_test.go similarity index 100% rename from nitric/handlers/handlers_test.go rename to internal/handlers/handlers_test.go diff --git a/nitric/apis/api.go b/nitric/apis/api.go index b825506..3552278 100644 --- a/nitric/apis/api.go +++ b/nitric/apis/api.go @@ -19,7 +19,7 @@ import ( "path" "strings" - "github.com/nitrictech/go-sdk/nitric/handlers" + "github.com/nitrictech/go-sdk/internal/handlers" resources "github.com/nitrictech/go-sdk/nitric/resource" "github.com/nitrictech/go-sdk/nitric/workers" resourcev1 "github.com/nitrictech/nitric/core/pkg/proto/resources/v1" @@ -47,6 +47,7 @@ type Route interface { ApiName() string } +type Handler = handlers.Handler[Ctx] type Middleware = handlers.Middleware[Ctx] type route struct { diff --git a/nitric/apis/workers.go b/nitric/apis/workers.go index 7a7df9d..0305b98 100644 --- a/nitric/apis/workers.go +++ b/nitric/apis/workers.go @@ -20,9 +20,9 @@ import ( "io" grpcx "github.com/nitrictech/go-sdk/internal/grpc" + "github.com/nitrictech/go-sdk/internal/handlers" "github.com/nitrictech/go-sdk/nitric/errors" "github.com/nitrictech/go-sdk/nitric/errors/codes" - "github.com/nitrictech/go-sdk/nitric/handlers" "github.com/nitrictech/go-sdk/nitric/workers" v1 "github.com/nitrictech/nitric/core/pkg/proto/apis/v1" ) diff --git a/nitric/schedules/schedule.go b/nitric/schedules/schedule.go index 586bd0d..d0bde6f 100644 --- a/nitric/schedules/schedule.go +++ b/nitric/schedules/schedule.go @@ -17,7 +17,7 @@ package schedules import ( "strings" - "github.com/nitrictech/go-sdk/nitric/handlers" + "github.com/nitrictech/go-sdk/internal/handlers" "github.com/nitrictech/go-sdk/nitric/workers" schedulespb "github.com/nitrictech/nitric/core/pkg/proto/schedules/v1" ) diff --git a/nitric/schedules/schedule_workers.go b/nitric/schedules/schedule_workers.go index 9959806..d94fa68 100644 --- a/nitric/schedules/schedule_workers.go +++ b/nitric/schedules/schedule_workers.go @@ -20,9 +20,9 @@ import ( "io" grpcx "github.com/nitrictech/go-sdk/internal/grpc" + "github.com/nitrictech/go-sdk/internal/handlers" "github.com/nitrictech/go-sdk/nitric/errors" "github.com/nitrictech/go-sdk/nitric/errors/codes" - "github.com/nitrictech/go-sdk/nitric/handlers" v1 "github.com/nitrictech/nitric/core/pkg/proto/schedules/v1" ) diff --git a/nitric/storage/bucket.go b/nitric/storage/bucket.go index 08ddb88..41ff8e0 100644 --- a/nitric/storage/bucket.go +++ b/nitric/storage/bucket.go @@ -18,7 +18,7 @@ import ( "fmt" "strings" - "github.com/nitrictech/go-sdk/nitric/handlers" + "github.com/nitrictech/go-sdk/internal/handlers" "github.com/nitrictech/go-sdk/nitric/workers" v1 "github.com/nitrictech/nitric/core/pkg/proto/resources/v1" storagepb "github.com/nitrictech/nitric/core/pkg/proto/storage/v1" diff --git a/nitric/storage/bucket_workers.go b/nitric/storage/bucket_workers.go index 6f817d2..6e1ba2e 100644 --- a/nitric/storage/bucket_workers.go +++ b/nitric/storage/bucket_workers.go @@ -20,9 +20,9 @@ import ( "io" grpcx "github.com/nitrictech/go-sdk/internal/grpc" + "github.com/nitrictech/go-sdk/internal/handlers" "github.com/nitrictech/go-sdk/nitric/errors" "github.com/nitrictech/go-sdk/nitric/errors/codes" - "github.com/nitrictech/go-sdk/nitric/handlers" v1 "github.com/nitrictech/nitric/core/pkg/proto/storage/v1" ) diff --git a/nitric/topics/topic.go b/nitric/topics/topic.go index 65ddca0..f6e15b4 100644 --- a/nitric/topics/topic.go +++ b/nitric/topics/topic.go @@ -17,7 +17,7 @@ package topics import ( "fmt" - "github.com/nitrictech/go-sdk/nitric/handlers" + "github.com/nitrictech/go-sdk/internal/handlers" "github.com/nitrictech/go-sdk/nitric/workers" v1 "github.com/nitrictech/nitric/core/pkg/proto/resources/v1" topicspb "github.com/nitrictech/nitric/core/pkg/proto/topics/v1" diff --git a/nitric/topics/topic_workers.go b/nitric/topics/topic_workers.go index af00678..7d6b7a1 100644 --- a/nitric/topics/topic_workers.go +++ b/nitric/topics/topic_workers.go @@ -21,9 +21,9 @@ import ( errorsstd "errors" grpcx "github.com/nitrictech/go-sdk/internal/grpc" + "github.com/nitrictech/go-sdk/internal/handlers" "github.com/nitrictech/go-sdk/nitric/errors" "github.com/nitrictech/go-sdk/nitric/errors/codes" - "github.com/nitrictech/go-sdk/nitric/handlers" v1 "github.com/nitrictech/nitric/core/pkg/proto/topics/v1" ) diff --git a/nitric/websockets/websocket.go b/nitric/websockets/websocket.go index aa1e30e..c5fe000 100644 --- a/nitric/websockets/websocket.go +++ b/nitric/websockets/websocket.go @@ -19,7 +19,7 @@ import ( "strings" grpcx "github.com/nitrictech/go-sdk/internal/grpc" - "github.com/nitrictech/go-sdk/nitric/handlers" + "github.com/nitrictech/go-sdk/internal/handlers" "github.com/nitrictech/go-sdk/nitric/workers" resourcesv1 "github.com/nitrictech/nitric/core/pkg/proto/resources/v1" websocketsv1 "github.com/nitrictech/nitric/core/pkg/proto/websockets/v1" diff --git a/nitric/websockets/websocket_workers.go b/nitric/websockets/websocket_workers.go index 3e9736a..e0aafb9 100644 --- a/nitric/websockets/websocket_workers.go +++ b/nitric/websockets/websocket_workers.go @@ -20,9 +20,9 @@ import ( "io" grpcx "github.com/nitrictech/go-sdk/internal/grpc" + "github.com/nitrictech/go-sdk/internal/handlers" "github.com/nitrictech/go-sdk/nitric/errors" "github.com/nitrictech/go-sdk/nitric/errors/codes" - "github.com/nitrictech/go-sdk/nitric/handlers" v1 "github.com/nitrictech/nitric/core/pkg/proto/websockets/v1" )