|
|
|
@@ -40,6 +40,7 @@ var RedundancyUnion = serder.UseTypeUnionInternallyTagged(types.Ref(types.NewTyp |
|
|
|
(*ECRedundancy)(nil), |
|
|
|
(*LRCRedundancy)(nil), |
|
|
|
(*SegmentRedundancy)(nil), |
|
|
|
(*MultipartUploadRedundancy)(nil), |
|
|
|
)), "type") |
|
|
|
|
|
|
|
type NoneRedundancy struct { |
|
|
|
@@ -229,6 +230,17 @@ func (b *SegmentRedundancy) CalcSegmentRange(start int64, end *int64) (segIdxSta |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
type MultipartUploadRedundancy struct { |
|
|
|
serder.Metadata `union:"multipartUpload"` |
|
|
|
Type string `json:"type"` |
|
|
|
} |
|
|
|
|
|
|
|
func NewMultipartUploadRedundancy() *MultipartUploadRedundancy { |
|
|
|
return &MultipartUploadRedundancy{ |
|
|
|
Type: "multipartUpload", |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
type User struct { |
|
|
|
UserID UserID `gorm:"column:UserID; primaryKey; type:bigint" json:"userID"` |
|
|
|
Name string `gorm:"column:Name; type:varchar(255); not null" json:"name"` |
|
|
|
|