first
This commit is contained in:
17
deploy/template/api/context.tpl
Normal file
17
deploy/template/api/context.tpl
Normal file
@@ -0,0 +1,17 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
{{.configImport}}
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config {{.config}}
|
||||
{{.middleware}}
|
||||
}
|
||||
|
||||
func NewServiceContext(c {{.config}}) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
{{.middlewareAssignment}}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user