func (f jsonDBFileInfo) MarshalJSON() ([]byte, error) { return json.Marshal(map[string]interface{}{ "name": f.Name, "size": db.FileInfoTruncated(f).Size(), "flags": fmt.Sprintf("%#o", f.Flags), "modified": time.Unix(f.Modified, 0), "localVersion": f.LocalVersion, "version": jsonVersionVector(f.Version), }) }
func (f jsonDBFileInfo) MarshalJSON() ([]byte, error) { return json.Marshal(map[string]interface{}{ "name": f.Name, "type": f.Type, "size": f.Size, "permissions": fmt.Sprintf("%#o", f.Permissions), "deleted": f.Deleted, "invalid": f.Invalid, "noPermissions": f.NoPermissions, "modified": db.FileInfoTruncated(f).ModTime(), "sequence": f.Sequence, }) }