importer: some TODO notes

Change-Id: Ia92be507092722d5751f42ec3c21e18cfc4cb7f0
This commit is contained in:
Brad Fitzpatrick 2013-11-17 15:00:46 -08:00
parent 27fd9e71a7
commit bd11fd5cb9
1 changed files with 13 additions and 0 deletions

View File

@ -211,6 +211,19 @@ func (o *Object) SetAttr(key, value string) error {
// from the permanode o, given by the "camliPath:xxxx" attribute,
// where xxx is the provided path.
func (o *Object) ChildPathObject(path string) (*Object, error) {
if v := o.Attr("camliPath:" + path); v != "" {
br, ok := blob.Parse(v)
if ok {
return o.h.ObjectFromRef(br)
}
}
// TODO: else, create a new permanode w/ the schema
// package. sign + upload it. See how SetAttr does it above.
// Then once you have the permanode's blobref, call SetAttr
// on this node's "camliPath:foo" to that blobref, and call
// the load path as seen earlier in this function.
log.Printf("TODO: ChildPathObject not implemented")
return nil, errors.New("TODO: ChildPathObject not implemented")
}