當前位置: 首頁>>代碼示例>>Golang>>正文


Golang interfaces.Document類代碼示例

本文整理匯總了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)
}
開發者ID:crufter,項目名稱:nocrud,代碼行數:8,代碼來源:meeting.go

示例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)
}
開發者ID:crufter,項目名稱:nocrud,代碼行數:8,代碼來源:fkid.go

示例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)
}
開發者ID:crufter,項目名稱:nocrud,代碼行數:8,代碼來源:terminal.go

示例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)
}
開發者ID:crufter,項目名稱:nocrud,代碼行數:10,代碼來源:fulltext.go

示例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)
}
開發者ID:crufter,項目名稱:nocrud,代碼行數:12,代碼來源:file.go

示例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)
}
開發者ID:crufter,項目名稱:nocrud,代碼行數:18,代碼來源:meeting.go


注:本文中的github.com/opesun/nocrud/frame/interfaces.Document類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。