From df56496a16704d51dafde16d1d744006b932e3cc Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 4 Apr 2020 12:45:36 +0200 Subject: [PATCH] dynfunc: normalize file names --- internal/dynfunc/handler.go | 6 ++++++ internal/dynfunc/spec.go | 5 +++++ internal/dynfunc/types.go | 14 -------------- 3 files changed, 11 insertions(+), 14 deletions(-) delete mode 100644 internal/dynfunc/types.go diff --git a/internal/dynfunc/handler.go b/internal/dynfunc/handler.go index ad00224..93a15f5 100644 --- a/internal/dynfunc/handler.go +++ b/internal/dynfunc/handler.go @@ -8,6 +8,12 @@ import ( "git.xdrm.io/go/aicra/internal/config" ) +// Handler represents a dynamic api handler +type Handler struct { + spec spec + fn interface{} +} + // Build a handler from a service configuration and a dynamic function // // @fn must have as a signature : `func(inputStruct) (*outputStruct, api.Error)` diff --git a/internal/dynfunc/spec.go b/internal/dynfunc/spec.go index 7b3c4f6..a1d1f8f 100644 --- a/internal/dynfunc/spec.go +++ b/internal/dynfunc/spec.go @@ -9,6 +9,11 @@ import ( "git.xdrm.io/go/aicra/internal/config" ) +type spec struct { + Input map[string]reflect.Type + Output map[string]reflect.Type +} + // builds a spec from the configuration service func makeSpec(service config.Service) spec { spec := spec{ diff --git a/internal/dynfunc/types.go b/internal/dynfunc/types.go deleted file mode 100644 index 3b0aac8..0000000 --- a/internal/dynfunc/types.go +++ /dev/null @@ -1,14 +0,0 @@ -package dynfunc - -import "reflect" - -// Handler represents a dynamic api handler -type Handler struct { - spec spec - fn interface{} -} - -type spec struct { - Input map[string]reflect.Type - Output map[string]reflect.Type -}