Changeset View
Changeset View
Standalone View
Standalone View
swh/model/model.py
Show First 20 Lines • Show All 390 Lines • ▼ Show 20 Lines | class Content(BaseContent): | ||||
sha1_git = attr.ib(type=Sha1Git) | sha1_git = attr.ib(type=Sha1Git) | ||||
sha256 = attr.ib(type=bytes) | sha256 = attr.ib(type=bytes) | ||||
blake2s256 = attr.ib(type=bytes) | blake2s256 = attr.ib(type=bytes) | ||||
length = attr.ib(type=int) | length = attr.ib(type=int) | ||||
status = attr.ib( | status = attr.ib( | ||||
type=str, | type=str, | ||||
default='visible', | |||||
validator=attr.validators.in_(['visible', 'hidden'])) | validator=attr.validators.in_(['visible', 'hidden'])) | ||||
data = attr.ib(type=Optional[bytes], | data = attr.ib(type=Optional[bytes], | ||||
default=None) | default=None) | ||||
ctime = attr.ib(type=Optional[datetime.datetime], | ctime = attr.ib(type=Optional[datetime.datetime], | ||||
default=None) | default=None) | ||||
@length.validator | @length.validator | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |