|
@@ -34,17 +34,19 @@ func CreateVariables(p *Project) error {
|
|
).Params(
|
|
).Params(
|
|
G.Id("ctx").Qual(IRIS_CTX, "Context"),
|
|
G.Id("ctx").Qual(IRIS_CTX, "Context"),
|
|
).Id(` *`).Qual(API_URL, "Filter").Id(`{
|
|
).Id(` *`).Qual(API_URL, "Filter").Id(`{
|
|
- var session `).Qual(MONGO, "SessionContext").Id(`
|
|
|
|
|
|
+ var (
|
|
|
|
+ options = &api.Filter{
|
|
|
|
+ DB:`).Id(dbid).Id(`,
|
|
|
|
+ Collection:`).Id(collectionid).Id(`,
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
|
|
if ctx != nil {
|
|
if ctx != nil {
|
|
- session = api.GetSessionContext(ctx)
|
|
|
|
|
|
+ options.Context = ctx
|
|
|
|
+ options.SessionContext = api.GetSessionContext(ctx)
|
|
}
|
|
}
|
|
|
|
|
|
- return &api.Filter{
|
|
|
|
- DB:`).Id(dbid).Id(`,
|
|
|
|
- Collection:`).Id(collectionid).Id(`,
|
|
|
|
- SessionContext: session,
|
|
|
|
- }
|
|
|
|
|
|
+ return options
|
|
}
|
|
}
|
|
`).Line())
|
|
`).Line())
|
|
|
|
|