
templates.golang.hook.select.template Maven / Gradle / Ivy
The newest version!
package hook
import (
"context"
fs @go_proto_path@
)
type @service_request@Interface interface {
OnRequest(ctx context.Context, request *fs.@request_name@) *fs.@service_response@
OnData(ctx context.Context, request *fs.@request_name@, response *fs.@service_response@) *fs.@service_response@
OnError(ctx context.Context, request *fs.@request_name@, response *fs.@service_response@, err error) *fs.@service_response@
OnResponse(ctx context.Context, request *fs.@request_name@, response *fs.@service_response@) *fs.@service_response@
}
type Generic@service_request@Executor struct {
@service_request@Interface @service_request@Interface
}
type @service_request@Controller struct{
}
var @service_request@Executor *Generic@service_request@Executor
func (ge *Generic@service_request@Executor) OnRequest(ctx context.Context, request *fs.@request_name@) *fs.@service_response@ {
return ge.@[email protected](ctx,request)
}
func (ge *Generic@service_request@Executor) OnResponse(ctx context.Context, request *fs.@request_name@, response *fs.@service_response@) *fs.@service_response@ {
return ge.@[email protected](ctx,request, response)
}
func (ge *Generic@service_request@Executor) OnData(ctx context.Context, request *fs.@request_name@, response *fs.@service_response@) *fs.@service_response@ {
return ge.@[email protected](ctx,request, response)
}
func (ge *Generic@service_request@Executor) OnError(ctx context.Context, request *fs.@request_name@, response *fs.@service_response@, err error) *fs.@service_response@ {
return ge.@[email protected](ctx,request, response, err)
}
func (rc *@service_request@Controller) OnRequest(ctx context.Context, request *fs.@request_name@) *fs.@service_response@ {
return nil
}
func (rc *@service_request@Controller) OnResponse(ctx context.Context, request *fs.@request_name@, response *fs.@service_response@) *fs.@service_response@ {
return nil
}
func (rc *@service_request@Controller) OnData(ctx context.Context, request *fs.@request_name@, response *fs.@service_response@) *fs.@service_response@ {
return nil
}
func (rc *@service_request@Controller) OnError(ctx context.Context, request *fs.@request_name@, response *fs.@service_response@, err error) *fs.@service_response@ {
return nil
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy