本文整理汇总了Golang中github.com/opesun/nocrud/frame/interfaces.Document类的典型用法代码示例。如果您正苦于以下问题:Golang Document类的具体用法?Golang Document怎么用?Golang Document使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Document类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Uninstall
func (e *Entries) Uninstall(o iface.Document, resource string) error {
upd := map[string]interface{}{
"$pull": map[string]interface{}{
"Hooks." + resource + "TopModFilter": []interface{}{"meeting.entries", "TopModFilter"},
},
}
return o.Update(upd)
}
示例2: Uninstall
func (c *C) Uninstall(o iface.Document, resource string) error {
upd := map[string]interface{}{
"$pull": map[string]interface{}{
"Hooks.fkidTypeHandler": "fkid",
},
}
return o.Update(upd)
}
示例3: Uninstall
func (C *C) Uninstall(o iface.Document, resource string) error {
upd := map[string]interface{}{
"$set": map[string]interface{}{
"nouns." + resource + ".verbs.Execute.input": 1,
},
}
return o.Update(upd)
}
示例4: Uninstall
func (c *C) Uninstall(o iface.Document, s string) error {
upd := map[string]interface{}{
"$pull": map[string]interface{}{
fmt.Sprintf("Hooks.%vInserted", s): []interface{}{"fulltext", "SaveFulltext"},
fmt.Sprintf("Hooks.%vUpdated", s): []interface{}{"fulltext", "SaveFulltext"},
"Hooks.ProcessQuery": "fulltext",
},
}
return o.Update(upd)
}
示例5: Uninstall
func (c *C) Uninstall(o iface.Document, resource string) error {
upd := map[string]interface{}{
"$pull": map[string]interface{}{
"Hooks.SanitizerMangler": "file",
"Hooks.fileTypeHandler": []interface{}{
"file",
"FileTypeHandler",
},
},
}
return o.Update(upd)
}
示例6: Install
func (tt *TimeTable) Install(o iface.Document, resource string) error {
upd := map[string]interface{}{
"$addToSet": map[string]interface{}{
"Hooks." + resource + "TopModFilter": []interface{}{"meeting.timeTable", "TopModFilter"},
"Hooks.AddTemplateBuiltin": []interface{}{"meeting.timeTable"},
},
"$set": map[string]interface{}{
"nouns." + resource + ".verbs.Save.input": map[string]interface{}{
"timeTable": map[string]interface{}{
"type": "any",
"slice": true,
"must": true,
},
},
},
}
return o.Update(upd)
}