2019-03-06 15:54:48 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package accounting
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2020-03-30 10:08:50 +01:00
|
|
|
"storj.io/common/uuid"
|
2019-03-06 15:54:48 +00:00
|
|
|
)
|
|
|
|
|
2020-07-16 15:18:02 +01:00
|
|
|
// BucketStorageTally holds data about a bucket tally.
|
2019-04-02 19:21:18 +01:00
|
|
|
type BucketStorageTally struct {
|
|
|
|
BucketName string
|
|
|
|
ProjectID uuid.UUID
|
|
|
|
IntervalStart time.Time
|
|
|
|
|
2019-09-13 14:51:41 +01:00
|
|
|
ObjectCount int64
|
|
|
|
|
2021-07-01 12:29:25 +01:00
|
|
|
TotalSegmentCount int64
|
|
|
|
TotalBytes int64
|
2019-04-02 19:21:18 +01:00
|
|
|
|
|
|
|
MetadataSize int64
|
|
|
|
}
|
2021-06-30 10:58:26 +01:00
|
|
|
|
|
|
|
// Bytes returns total bytes.
|
|
|
|
func (s *BucketStorageTally) Bytes() int64 {
|
2021-07-01 12:29:25 +01:00
|
|
|
return s.TotalBytes
|
2021-06-30 10:58:26 +01:00
|
|
|
}
|