code: func Revision(db DB) int64 {
  	if snap, _ := db.(*SnapshotDB); snap != nil {
  		return snap.Rev
  	}
  	return 0
  }
docs: // Revision returns a revision of an auth DB or 0 if it can't be determined.
  //
  // It's just a small helper that casts db to *SnapshotDB and extracts the
  // revision from there.