MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / GetDesignDoc

Method GetDesignDoc

db/design_doc.go:86–95  ·  view source on GitHub ↗
(ddocName string)

Source from the content-addressed store, hash-verified

84}
85
86func (db *Database) GetDesignDoc(ddocName string) (ddoc sgbucket.DesignDoc, err error) {
87 if err = db.checkDDocAccess(ddocName); err != nil {
88 return ddoc, err
89 }
90 vs, err := getViewStoreForDefaultCollection(db.DatabaseContext)
91 if err != nil {
92 return ddoc, err
93 }
94 return vs.GetDDoc(ddocName)
95}
96
97func (db *Database) PutDesignDoc(ctx context.Context, ddocName string, ddoc sgbucket.DesignDoc) (err error) {
98 wrap := true

Callers 2

handleGetDesignDocMethod · 0.80
TestUpdateDesignDocFunction · 0.80

Calls 3

checkDDocAccessMethod · 0.95
GetDDocMethod · 0.45

Tested by 1

TestUpdateDesignDocFunction · 0.64