All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
templates.golang.hook.insert.template Maven / Gradle / Ivy
package hook
import (
"context"
fs @go_proto_path@
)
type @service_request@Interface interface {
OnRequest(ctx context.Context, request *fs.@request_name@) *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 @service_request@BulkInterface interface {
OnRequest(ctx context.Context, request *fs.Bulk@request_name@) *fs.Bulk@service_response@
OnError(ctx context.Context, request *fs.Bulk@request_name@, response *fs.Bulk@service_response@, err error) *fs.Bulk@service_response@
OnResponse(ctx context.Context, request *fs.Bulk@request_name@, response *fs.Bulk@service_response@) *fs.Bulk@service_response@
}
type Generic@service_request@Executor struct {
@service_request@Interface @service_request@Interface
}
type Generic@service_request@ExecutorBulk struct {
@service_request@BulkInterface @service_request@BulkInterface
}
type @service_request@Controller struct{
}
type Bulk@service_request@Controller struct {
}
var @service_request@Executor *Generic@service_request@Executor
var Bulk@service_request@Executor *Generic@service_request@ExecutorBulk
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) 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 (ge *Generic@service_request@ExecutorBulk ) OnRequest(ctx context.Context, request *fs.Bulk@request_name@) *fs.Bulk@service_response@ {
return ge.@[email protected] (ctx,request)
}
func (ge *Generic@service_request@ExecutorBulk ) OnResponse(ctx context.Context, request *fs.Bulk@request_name@, response *fs.Bulk@service_response@) *fs.Bulk@service_response@ {
return ge.@[email protected] (ctx,request, response)
}
func (ge *Generic@service_request@ExecutorBulk ) OnError(ctx context.Context, request *fs.Bulk@request_name@, response *fs.Bulk@service_response@, err error) *fs.Bulk@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) OnError(ctx context.Context, request *fs.@request_name@, response *fs.@service_response@, err error) *fs.@service_response@ {
return nil
}
func (rc *Bulk@service_request@Controller) OnRequest(ctx context.Context, request *fs.Bulk@request_name@) *fs.Bulk@service_response@ {
return nil
}
func (rc *Bulk@service_request@Controller) OnResponse(ctx context.Context, request *fs.Bulk@request_name@, response *fs.Bulk@service_response@) *fs.Bulk@service_response@ {
return nil
}
func (rc *Bulk@service_request@Controller) OnError(ctx context.Context, request *fs.Bulk@request_name@, response *fs.Bulk@service_response@, err error) *fs.Bulk@service_response@ {
return nil
}