diff --git a/gengokit/generator/gen.go b/gengokit/generator/gen.go index 37fee5f..77436ec 100644 --- a/gengokit/generator/gen.go +++ b/gengokit/generator/gen.go @@ -70,6 +70,11 @@ func generateResponseFile(templFP string, data *gengokit.Data, prevFile io.Reade if genCode, err = h.Render(templFP, data); err != nil { return nil, errors.Wrapf(err, "cannot render template: %s", templFP) } + case handler.HookPath: + hook := handler.NewHook(prevFile) + if genCode, err = hook.Render(templFP, data); err != nil { + return nil, errors.Wrapf(err, "cannot render template: %s", templFP) + } case middlewares.EndpointsPath: m := middlewares.New() m.LoadEndpoints(prevFile) diff --git a/gengokit/handler/hooks.go b/gengokit/handler/hooks.go new file mode 100644 index 0000000..f337b8c --- /dev/null +++ b/gengokit/handler/hooks.go @@ -0,0 +1,31 @@ +package handler + +import ( + "io" + "strings" + + "github.com/TuneLab/go-truss/gengokit" +) + +const HookPath = "NAME-service/handlers/server/hooks.gotemplate" + +// NewHook returns a new HookRender +func NewHook(prev io.Reader) gengokit.Renderable { + return &HookRender{ + prev: prev, + } +} + +type HookRender struct { + prev io.Reader +} + +// Render will return the existing file if it exists, otherwise it will return +// a brand new copy from the template. +func (h *HookRender) Render(_ string, _ *gengokit.Data) (io.Reader, error) { + if h.prev == nil { + return strings.NewReader(hookTempl), nil + } else { + return h.prev, nil + } +} diff --git a/gengokit/handler/templates.go b/gengokit/handler/templates.go index 510399f..b4aaa59 100644 --- a/gengokit/handler/templates.go +++ b/gengokit/handler/templates.go @@ -48,3 +48,23 @@ type {{.PackageName}}Service struct{} {{end}} {{- end}} ` +const hookTempl = ` +package handler + +import ( + "fmt" + "os" + "os/signal" + "syscall" +) + +func InterruptHandler(errc chan<- error) { + c := make(chan os.Signal, 1) + signal.Notify(c, syscall.SIGINT, syscall.SIGTERM) + terminateError := fmt.Errorf("%s", <-c) + + // Place whatever shutdown handling you want here + + errc <- terminateError +} +` diff --git a/gengokit/template/NAME-service/NAME-server/server_main.gotemplate b/gengokit/template/NAME-service/NAME-server/server_main.gotemplate index 4c80627..793d4b1 100644 --- a/gengokit/template/NAME-service/NAME-server/server_main.gotemplate +++ b/gengokit/template/NAME-service/NAME-server/server_main.gotemplate @@ -7,8 +7,6 @@ import ( "net/http" "net/http/pprof" "os" - "os/signal" - "syscall" // 3d Party "golang.org/x/net/context" @@ -83,11 +81,7 @@ func main() { ctx := context.Background() // Interrupt handler. - go func() { - c := make(chan os.Signal, 1) - signal.Notify(c, syscall.SIGINT, syscall.SIGTERM) - errc <- fmt.Errorf("%s", <-c) - }() + go handler.InterruptHandler(errc) // Debug listener. go func() { diff --git a/gengokit/template/NAME-service/handlers/server/hooks.gotemplate b/gengokit/template/NAME-service/handlers/server/hooks.gotemplate new file mode 100644 index 0000000..3d5a398 --- /dev/null +++ b/gengokit/template/NAME-service/handlers/server/hooks.gotemplate @@ -0,0 +1 @@ +{{/* See go-truss/gengokit/handler/templates.go for code */}} diff --git a/gengokit/template/template.go b/gengokit/template/template.go index 49dd579..e233046 100644 --- a/gengokit/template/template.go +++ b/gengokit/template/template.go @@ -8,6 +8,7 @@ // NAME-service/generated/endpoints.gotemplate // NAME-service/generated/transport_grpc.gotemplate // NAME-service/generated/transport_http.gotemplate +// NAME-service/handlers/server/hooks.gotemplate // NAME-service/handlers/server/server_handler.gotemplate // NAME-service/middlewares/endpoints.gotemplate // NAME-service/middlewares/service.gotemplate @@ -98,7 +99,7 @@ func nameServiceNameCliClientClient_mainGotemplate() (*asset, error) { return a, nil } -var _nameServiceNameServerServer_mainGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\x56\x4d\x6f\xdb\x38\x13\x3e\x4b\xbf\x82\x15\xfa\x16\xd2\x0b\x87\xea\x62\xdb\x3d\x04\xf5\xa1\xf9\xa8\x1b\x6c\x9c\x35\x6c\x07\x7b\x5c\xc8\x12\x2d\x73\x23\x91\x02\x49\x3b\x36\x04\xff\xf7\x9d\xa1\x28\x5b\x4e\x6c\x27\x87\x16\x8d\x25\x71\x1e\x3e\xf3\x45\xce\x4c\x95\xa4\x4f\x49\xce\x48\x99\x70\xe1\xfb\xbc\xac\xa4\x32\x24\xf4\xbd\x60\x5e\x24\x79\x80\xcf\xd2\xe0\x43\xb0\xf6\x11\x2f\x8c\xa9\xba\xef\x71\x55\x29\x39\xc7\x15\xa9\x9b\xdf\x58\xf3\x5c\x24\x05\x7e\xe8\x8d\x4e\x93\x02\x5e\x7d\x2f\x8e\xc9\xef\x19\x19\x25\xca\x6c\x40\x90\xcb\x22\x11\x39\x95\x2a\x8f\xd7\x31\x52\xa5\x52\x18\xb6\xb6\x5a\x72\x29\xf3\x82\xd1\x0e\x24\x57\x55\xea\x38\x06\x92\xfc\xc9\x0d\xa2\xb8\x59\x2c\x67\x34\x95\x65\x9c\xcb\x8b\x27\x6e\x62\xfc\x2b\x64\xee\x80\xd3\x05\xd7\x64\xc2\xd4\x8a\xa7\xcc\xf7\x16\x89\xc8\x0a\xa6\x48\x50\xd7\xf4\xce\xba\x39\x4a\xcc\x82\x5c\x6c\xb7\x24\x76\x32\xb0\x1b\xd0\x4c\x81\x09\x7a\x95\x1e\x45\xe6\x4c\x30\x95\x18\x96\x01\xa6\x9a\x59\xc8\xe8\xea\x10\x04\x92\x92\x67\xc0\xf7\x9c\x28\xa6\x8f\xb2\x74\xe4\x81\x1f\xf9\xfe\x7c\x29\x52\x9b\x81\x30\x22\xb5\xef\xad\x12\x85\x29\xf0\x32\x36\x5b\xe6\xdf\xb3\x4c\x11\xfb\xaf\x4f\x30\x27\x74\x62\x14\x17\x79\x18\x58\x29\x4d\x40\x1c\xf4\x48\x70\xf9\xf5\xf3\x1f\x9f\xf1\xe5\x06\x97\x09\x38\x44\x4a\x06\xc8\x54\x93\x82\x6b\xc3\x04\x41\x24\xd3\x3a\x88\x80\x19\xd3\xb6\x27\x7e\xc9\x8c\xd2\x2e\xf1\x57\x4b\xfc\x73\x3a\x1d\x1d\xe3\xc2\xd4\x9c\xe6\x42\x69\x97\xeb\x8b\xe5\xca\xc7\xa3\x6b\x12\x22\x63\x74\x84\x12\xfe\x5b\x0e\x38\x2a\x9a\x85\x51\x93\xcd\x47\xcd\x08\x13\x2b\xae\xa4\x28\x99\x30\x04\x82\xc4\x93\x59\xc1\x74\x8f\xf0\x39\xd1\xcc\x50\xf2\x03\x36\x69\xb2\x48\x56\x8c\x54\x8a\x4b\xc5\xcd\x86\x48\xc8\x27\xb9\x15\x2b\xc4\x6b\xea\x7b\x80\x95\x9a\x0e\x18\xa8\x5c\x85\xc1\xcd\xed\xd5\xe3\xe0\x9f\xef\x37\x37\xe3\x20\x22\x1f\xfa\x24\x08\x08\xf9\xf4\x89\xfc\x7f\x1f\xf9\x7e\xbf\x8d\x2d\x66\xc6\xeb\x4a\x4e\x11\xf9\xde\xf6\xa5\x1e\xf4\xf4\x88\x9a\x5d\x1a\x9c\x96\xaf\xad\x96\xbd\xe0\x04\xcb\x11\x1d\x03\x88\xe9\xa1\x0e\x54\xb1\xcb\x8e\x53\xf1\xa5\x55\xb1\x17\x9c\x20\x39\xa2\x62\xf4\xd7\x78\x7a\xc0\xfe\x1e\x07\xa0\x80\xd0\x09\xe4\x43\x98\x79\x18\x5c\xfe\x4f\x43\xfe\x5f\x51\x5a\x65\x36\xcd\xf7\x32\xcf\xe1\xe0\x90\x4c\xe2\x7d\xa0\xcd\x65\x80\x3b\x9d\x33\xfb\xa0\xf7\xf6\xd5\xf7\x50\x8b\x5b\xee\x5b\xc1\x03\x7b\x06\x19\x28\x6b\x10\x21\xe8\x98\x98\x4c\x2e\x4d\x74\x04\x79\xdd\xd4\x9a\xb0\x59\x8f\xe8\xdf\x50\x4a\xc2\xc0\xa0\x6d\x88\xb8\x61\xf3\x64\x59\x98\x29\x2f\x99\x36\x49\x59\x3d\x4e\xaf\xdf\xcf\x82\xe5\x8e\xa9\x43\xa6\x6b\xbb\xd6\x84\xb4\x41\xa3\x23\x61\x50\xea\x1c\xaf\xc3\x82\x15\x85\xc4\x88\x67\x6c\xce\x5a\x77\x0f\x10\x50\x11\xb3\xd9\x86\x05\xee\x32\x5c\x2d\x35\x17\x70\x5b\x0e\xc3\xa4\x9b\x5a\x47\xaa\x19\xad\xeb\x81\x7c\x48\x4a\x46\xa8\x2b\x80\x14\xbf\xb6\xdb\x89\x2d\x70\x4d\xf8\x5a\x78\x9f\xb8\xfa\x87\x3e\x39\x78\x88\xfe\x82\xa2\x3b\xf1\x2f\x4b\x4d\x5b\x45\x49\xa7\x70\x51\x58\x04\x7a\xda\x2d\x66\xb1\xa3\x84\xca\x7d\xc0\xdf\xdd\xd6\x30\x3a\xc2\xe1\x5e\x10\x3a\xf8\xfe\x28\xdc\x8a\xac\x92\x70\x6c\x0e\x9d\x84\xc2\x58\xd7\x0a\xfa\x02\x23\x1f\x39\xb9\xec\xef\x3d\x1c\x32\xb3\x90\x99\xc6\x12\x0b\xda\xeb\x7a\x2a\xef\xe5\x33\x84\xf3\x23\x77\xce\xef\x08\xfb\x04\xea\x3b\x1d\x26\x4f\xac\xae\x5f\x49\x3b\x86\xd4\x35\x13\x19\xb2\xb9\xb0\xbb\x68\xec\x78\xde\x0a\x07\x73\x40\x6d\x03\xb2\xfb\x42\xab\xd1\x80\x96\x47\xd7\xef\xf6\xe9\x95\xb5\x97\x58\x73\x5f\xc7\xb7\x15\x77\x03\x7c\x26\x22\x51\xaf\xe3\xac\x0b\xff\x90\xa5\x70\x2e\x38\x1c\xe7\x7d\x02\x98\x52\x29\xda\x57\x42\xe8\x42\x14\x13\x58\x91\x78\xb0\x53\xb3\x46\x81\x6b\xe2\xf4\x0a\xc6\x8a\x5c\xc9\xa5\xc8\xc2\x5d\xec\x0c\x60\x97\x95\xd9\x9d\x36\xdf\xcb\x25\xc1\xd6\xd7\x74\x3d\xef\x05\x33\x5e\x60\x3b\x46\xf4\xc8\x6f\x78\x1a\x9b\x99\x82\x3e\x48\xc3\xe7\x9b\x30\xed\x11\x37\x5a\xd0\xc9\xdd\xe0\xee\x61\x7a\xf0\x3d\xbd\x1d\x0f\x71\x8f\xb5\xf7\xdb\x85\xad\x41\xb7\x68\x29\x94\x20\x5b\x81\xbe\x5d\xa4\x78\xd0\x5a\xe3\x9a\xa6\xd9\x74\xa2\x23\x96\xb9\x8b\x7f\xf9\x56\xfd\x80\x14\x6a\xec\xf4\x78\x63\x6d\xa3\xb0\xf7\xd5\x2b\x71\xa7\x6d\xaa\xee\x82\xb1\xe1\x72\x6d\x6f\x58\x49\x7f\xda\x60\x84\x41\x6c\xf1\xcd\x28\x15\xc3\x7e\x0b\x6f\x84\xea\x07\x5a\x62\x25\x90\xdd\x8c\xad\xa3\x33\x5b\xd3\x32\x2b\xa0\x34\x9c\x66\xb8\x6e\x00\xe7\x38\xf0\x87\x17\x67\x38\x46\x0d\xe0\x1c\x87\xde\x94\x33\x59\x9c\xa6\x98\x58\xf9\x39\x06\x88\x66\x7a\xc6\x86\x29\x8a\x23\x1b\xdf\x6e\xbd\x74\xa3\xc6\xbe\x4f\x77\x8f\x81\xa5\xba\xb7\x59\xfe\x2e\x32\x9b\x89\x70\x8f\xec\x91\xb2\x7b\x26\xec\xbc\xb3\x4b\xe9\x2f\x39\x13\x48\xd9\xcc\x5f\x6d\x09\xc0\x1a\x84\xab\xce\xbf\x10\xae\x51\x8f\xec\x0a\x45\xcf\xb5\x82\xe8\x84\x93\x6d\x97\x7d\xd3\xc7\x16\x08\xd1\xec\xba\x68\xc7\xb0\x5f\xeb\x22\x52\x36\xa7\xbe\x10\x3d\xac\x0e\xb8\x1d\xc6\x7b\x67\x12\xa0\xd3\x0a\x4d\x6f\xc7\x0f\x34\x1d\x86\x0c\x04\xc2\x58\x21\x78\x61\x35\xef\xbc\x81\x27\x7e\x2a\x66\x96\x4a\xc0\x1b\xd6\x26\x4f\xab\x55\x37\x7e\x38\xb3\x34\x7d\xed\x45\xf8\x6c\xd5\x40\xa4\x1d\x42\xdb\xbb\xa7\xec\xcd\x83\x1e\x39\x66\x39\xda\xa4\x60\x40\x3f\xd6\x24\x43\x08\x3f\x68\x3a\x79\xc2\xba\x1e\xb4\xe6\x6a\xda\x04\xbc\x10\xdd\x30\x8f\x97\xe2\xc3\x61\xdf\x67\x6b\x6e\x6c\x15\xc2\x8d\x91\xbf\xf5\xff\x0b\x00\x00\xff\xff\x21\xb8\xc5\xb4\x87\x0d\x00\x00") +var _nameServiceNameServerServer_mainGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\x56\x5f\x6f\xdb\x36\x10\x7f\x96\x3e\x05\x2b\x74\x85\x34\x38\x52\x81\xb5\x7b\x08\xea\x87\x26\x69\xd3\x62\x49\x67\xc4\x2e\xf6\x38\xc8\xd2\x59\xd6\x22\x91\x02\x49\x3b\x0e\x04\x7f\xf7\xdd\x91\x94\x2c\x27\xb6\x93\x87\x06\x49\x24\xf1\x8e\xbf\xbb\xfb\xf1\xfe\xb0\x49\xb3\xfb\xb4\x00\x56\xa7\x25\xf7\xfd\xb2\x6e\x84\xd4\x2c\xf4\xbd\x60\x51\xa5\x45\x40\xcf\x5a\xd3\x83\x43\xf7\x48\x96\x5a\x37\xc3\xf7\xa4\x69\xa4\x58\xd0\x8a\x50\x81\xef\x7b\x49\xc2\xfe\xc8\xd9\x24\x95\xfa\x11\xd7\x0a\x51\xa5\xbc\x88\x85\x2c\x92\x4d\x42\x5b\x32\xc1\x35\x6c\x0c\x5a\x21\x44\x51\x41\x3c\x50\x29\x64\x93\x39\x8c\x6b\xc1\xfe\x2a\x35\x69\x95\x7a\xb9\x9a\xc7\x99\xa8\x93\x42\x9c\xdd\x97\x3a\xa1\xbf\x4a\x14\x4e\x71\xb6\x2c\x15\x9b\x82\x5c\x97\x19\xf8\xde\x32\xe5\x79\x05\x92\x05\x6d\x1b\x7f\x37\xe1\x4c\x52\xbd\x64\x67\xdb\x2d\x4b\x9c\x4c\x25\x0a\xb5\x41\xa2\x0b\x6a\x9d\x1d\xd4\x2c\x80\x83\x4c\x35\xe4\xa8\xd3\xcc\x8d\xca\xe4\x62\x5f\x09\x25\x75\x99\x23\xde\x43\x2a\x41\x1d\x44\x19\xc8\x03\x3f\xf2\xfd\xc5\x8a\x67\x86\xe9\x30\x62\xad\xef\xad\x53\x49\x54\x7b\x39\xcc\x57\xc5\xe7\x3c\x97\xcc\xfc\x8c\x19\x71\x1f\x4f\xb5\x2c\x79\x11\x06\x46\x1a\xa7\x28\x0e\x46\x2c\x38\xff\xf8\xfe\xcf\xf7\xf4\x72\x45\xcb\x0c\x03\x62\x35\xa0\x66\xa6\x58\x55\x2a\x0d\x9c\x91\x26\x28\x15\x44\x88\x4c\xc7\xb3\x03\x7e\x8a\x4c\xd2\x21\xf0\x47\x03\xfc\x6d\x36\x9b\x1c\xc2\xa2\xa3\x39\x8e\x45\xd2\x21\xd6\x07\x83\x55\xdc\x4d\x2e\x59\x48\x88\xd1\x01\x48\xfc\x35\x18\x98\x2a\x0a\xc2\xc8\x9e\xe6\x4f\x05\x0c\xf8\xba\x94\x82\xd7\xc0\x35\x43\x92\xca\x74\x5e\x81\x1a\xb1\x72\xc1\x14\xe8\x98\x7d\xc5\x4d\x8a\x2d\xd3\x35\xb0\x46\x96\x42\x96\xfa\x91\x09\x3c\x4f\xf6\x85\xaf\x49\x5f\xc5\xbe\x87\xba\x42\xc5\xd7\x80\x26\xd7\x61\x70\xf5\xe5\xe2\xe7\xf5\xbf\x9f\xaf\xae\xee\x82\x88\xbd\x19\xb3\x20\x60\xec\xdd\x3b\xf6\xfb\x8e\xf9\xf1\xb8\xe3\x96\x4e\xc6\x1b\x4a\x8e\x01\xf9\xde\xf6\xa9\x1d\x8a\xf4\x80\x99\xfe\x18\x9c\x95\x8f\x9d\x95\x9d\xe0\x08\xca\x01\x1b\xd7\xc8\xe9\xbe\x0d\x32\xd1\x9f\x8e\x33\xf1\xa1\x33\xb1\x13\x1c\x01\x39\x60\x62\xf2\xf7\xdd\x6c\x0f\xfd\x35\x01\x60\xa3\x88\xa7\x78\x1e\x5c\x2f\xc2\xe0\xfc\x37\x85\xe7\xff\x0c\xd2\x18\x33\xc7\x7c\x23\x8a\x02\x13\x87\xe5\x82\xea\x21\xb6\xc5\x80\x35\x5d\x80\x79\xc4\x37\xe6\xd5\xf7\xc8\x8a\x5b\x1e\x1b\xc1\x0f\x78\x40\x19\x1a\xb3\x1a\x21\xda\x98\xea\x5c\xac\x74\x74\x40\xf3\xd2\xf6\x9a\xd0\xae\x47\xf1\x3f\xd8\x4a\xc2\x40\x93\x6f\xa4\x71\x05\x8b\x74\x55\xe9\x59\x59\x83\xd2\x69\xdd\xfc\x9c\x5d\xbe\x1e\x25\x4b\x2b\xec\x25\xfb\x48\x97\x66\xcd\x52\x6a\xb5\x29\x90\x30\xa8\x55\x41\xe5\xb0\x84\xaa\x12\xc4\x78\x0e\x0b\xe8\xc2\xdd\xd3\xc0\x8e\x98\xcf\x1f\x21\x70\xc5\x70\xb1\x52\x25\xc7\x6a\xd9\xa7\x49\xd9\x5e\xc7\x9a\x79\xdc\xb6\xd7\xe2\x47\x5a\x03\x8b\x5d\x03\x8c\xe9\x6b\xbb\x9d\x9a\x06\x67\xe9\xeb\xd4\xc7\xcc\xf5\x3f\x8a\xc9\xa9\x87\x14\x2f\x1a\xfa\xce\xff\x83\x4c\x77\x5d\x94\x0d\x1a\x57\x8c\x8b\x08\x1f\x0f\x9b\x59\xe2\x20\xb1\x73\xef\xe1\x0f\xb7\x59\x44\x07\x78\xbb\x13\x84\x4e\x7d\x97\x0a\x5f\x78\xde\x08\x4c\x9b\xfd\x20\xb1\x31\xb6\xad\xc4\xb9\x00\xec\x6d\xc9\xce\xc7\xbb\x08\x6f\x41\x2f\x45\xae\xa8\xc5\xa2\xf5\xb6\x9d\x89\x1b\xf1\x80\x74\xbe\x2d\x5d\xf0\x3d\xe0\x98\x61\x7f\x8f\x6f\xd3\x7b\x68\xdb\x67\xd2\x81\x23\x6d\x0b\x3c\x27\x34\x47\xbb\x63\xa3\xc7\x79\x89\x0e\x70\x8a\xca\x10\xd2\x7f\x91\xd7\xe4\x40\x87\xa3\xda\x57\xc7\xf4\xcc\xdb\x73\xea\xb9\xcf\xf9\xed\xc4\x43\x82\x4f\x30\x12\x8d\x06\xc1\x3a\xfa\x6f\x21\xc3\xbc\x28\x31\x9d\x77\x07\x00\x52\x66\xe4\x5f\x8d\xd4\x85\x24\x66\xb8\x22\x28\xb1\x33\xbd\x21\x81\x1b\xe2\xf1\x05\x5e\x1f\x0a\x29\x56\x3c\x0f\x7b\xee\x34\xea\xae\x1a\xdd\x67\x9b\xef\x15\xa2\xff\xe8\xc5\xdf\xec\x42\x48\xa6\xdc\x56\x3b\xd2\xec\x9c\xe8\xf6\xd1\xc8\xb4\xd3\xb2\x2b\xcb\xf3\x97\xaa\x1b\x09\x56\x34\x87\xa9\x9e\x4c\x1b\x37\xd5\xe4\xd5\xb4\xd3\x8c\x3c\x97\xfe\x70\xbb\xda\x98\xfc\xaf\x63\xeb\x4c\x18\x24\x46\xdf\x5e\x68\x12\xdc\x6f\xd4\x9d\xa7\x5f\xc9\x13\x23\xc1\x20\x72\xd8\x44\x27\xb6\x66\x75\x5e\x61\xe1\x1e\x47\xb8\xb4\x0a\xa7\x30\xe8\x5f\x59\x9d\xc0\x98\x58\x85\x53\x18\xea\xb1\x9e\x8b\xea\x38\xc4\xd4\xc8\x4f\x21\x20\x9b\xd9\x09\x1f\x66\x24\x8e\x0c\xbf\xc3\x6e\xe6\x2e\x02\xbb\x29\x4a\x16\x4c\x52\x7d\x3a\xb3\x50\x37\xe6\x94\x3f\xf3\xdc\x9c\x44\xb8\xd3\x1c\xb1\x9a\x5a\x43\x97\x4e\xe6\x36\xd2\x1f\xe9\x2f\xc9\x09\x82\xb4\xb7\xa3\xae\x40\xa9\x43\xd0\x6a\x97\x93\x98\xe4\x23\xd6\x97\xf1\xc8\x35\xea\xe8\x48\x90\xdd\x0c\x7c\x31\xc6\x4e\x11\xd9\x1c\x86\x68\x2e\x49\xbf\x36\x44\x82\xb4\x59\x5f\xf1\x11\xd5\x2e\x6d\xc7\xcb\xb7\x73\x09\xb5\xb3\x86\x5c\xef\x2e\x07\xe4\x3a\x5e\x01\x48\x11\x87\x3e\x2f\x2b\x63\xb9\x8f\x06\x9f\xf4\x29\x41\xaf\x24\xc7\x37\xea\x1c\x9e\x92\xeb\x21\x7f\x74\xa3\xb0\x53\xe7\x09\x7d\x84\x6d\x5a\xa1\xb9\x22\x76\xb5\x27\x4d\xe5\xe1\x04\xbb\x83\x82\x7c\x92\x78\x7d\x3e\x34\xc2\x42\xa4\x1f\x2d\x1d\xcd\xb0\x61\x04\x9d\xbb\x2a\xb6\x84\x57\x7c\x48\xf3\xdd\x8a\xbf\xd9\x9f\xca\xb0\x29\x89\xad\x4f\x67\xb6\x07\x6d\xfd\xff\x03\x00\x00\xff\xff\xac\xde\x91\x45\x0d\x0d\x00\x00") func nameServiceNameServerServer_mainGotemplateBytes() ([]byte, error) { return bindataRead( @@ -113,7 +114,7 @@ func nameServiceNameServerServer_mainGotemplate() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "NAME-service/NAME-server/server_main.gotemplate", size: 3463, mode: os.FileMode(436), modTime: time.Unix(1481916361, 0)} + info := bindataFileInfo{name: "NAME-service/NAME-server/server_main.gotemplate", size: 3341, mode: os.FileMode(436), modTime: time.Unix(1482277358, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -238,6 +239,26 @@ func nameServiceGeneratedTransport_httpGotemplate() (*asset, error) { return a, nil } +var _nameServiceHandlersServerHooksGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x04\xc0\xc1\x0d\x80\x20\x0c\x05\xd0\xbb\x53\xf4\x4c\xa2\x1d\xc6\x09\x88\x7c\xab\x11\xa9\x69\xeb\x89\xb0\x3b\xaf\x77\x4e\xb4\x03\x24\xba\x86\xfd\xee\x2c\x68\xa2\xcf\x1d\x7c\xe5\x56\x2a\x8c\x03\xef\x57\x73\xc0\x37\x51\x3a\xd5\xe8\xd0\x02\x4a\x3c\xc6\x32\x03\x00\x00\xff\xff\xd6\x21\xab\x2e\x3e\x00\x00\x00") + +func nameServiceHandlersServerHooksGotemplateBytes() ([]byte, error) { + return bindataRead( + _nameServiceHandlersServerHooksGotemplate, + "NAME-service/handlers/server/hooks.gotemplate", + ) +} + +func nameServiceHandlersServerHooksGotemplate() (*asset, error) { + bytes, err := nameServiceHandlersServerHooksGotemplateBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "NAME-service/handlers/server/hooks.gotemplate", size: 62, mode: os.FileMode(436), modTime: time.Unix(1482279202, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + var _nameServiceHandlersServerServer_handlerGotemplate = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x04\xc0\xc1\x0d\x80\x20\x0c\x05\xd0\xbb\x53\xf4\x4c\xa2\x1d\xc6\x09\x88\x7c\xab\x11\xa9\x69\xeb\x89\xb0\x3b\xaf\x77\x4e\xb4\x03\x24\xba\x86\xfd\xee\x2c\x68\xa2\xcf\x1d\x7c\xe5\x56\x2a\x8c\x03\xef\x57\x73\xc0\x37\x51\x3a\xd5\xe8\xd0\x02\x4a\x3c\xc6\x32\x03\x00\x00\xff\xff\xd6\x21\xab\x2e\x3e\x00\x00\x00") func nameServiceHandlersServerServer_handlerGotemplateBytes() ([]byte, error) { @@ -358,6 +379,7 @@ var _bindata = map[string]func() (*asset, error){ "NAME-service/generated/endpoints.gotemplate": nameServiceGeneratedEndpointsGotemplate, "NAME-service/generated/transport_grpc.gotemplate": nameServiceGeneratedTransport_grpcGotemplate, "NAME-service/generated/transport_http.gotemplate": nameServiceGeneratedTransport_httpGotemplate, + "NAME-service/handlers/server/hooks.gotemplate": nameServiceHandlersServerHooksGotemplate, "NAME-service/handlers/server/server_handler.gotemplate": nameServiceHandlersServerServer_handlerGotemplate, "NAME-service/middlewares/endpoints.gotemplate": nameServiceMiddlewaresEndpointsGotemplate, "NAME-service/middlewares/service.gotemplate": nameServiceMiddlewaresServiceGotemplate, @@ -430,6 +452,7 @@ var _bintree = &bintree{nil, map[string]*bintree{ }}, "handlers": &bintree{nil, map[string]*bintree{ "server": &bintree{nil, map[string]*bintree{ + "hooks.gotemplate": &bintree{nameServiceHandlersServerHooksGotemplate, map[string]*bintree{}}, "server_handler.gotemplate": &bintree{nameServiceHandlersServerServer_handlerGotemplate, map[string]*bintree{}}, }}, }},