refactor(depot): use tag instead of name

Compared to name, tag takes permission into account for each
data unit.

Add `Check` function to check validity of tag.