44b1ca6b97
To allow for changing limits for new users, while leaving existing users limits as they are, we must store the project limits for each user. We currently store the limit for the number of projects a user can create in the user DB table. This change would also store the project bandwidth and storage limits in the same table. Change-Id: If8d79b39de020b969f3445ef2fcc370e51d706c6
21 lines
629 B
Go
21 lines
629 B
Go
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package console
|
|
|
|
import "storj.io/common/memory"
|
|
|
|
// ProjectUsageLimits holds project usage limits and current usage.
|
|
type ProjectUsageLimits struct {
|
|
StorageLimit int64 `json:"storageLimit"`
|
|
BandwidthLimit int64 `json:"bandwidthLimit"`
|
|
StorageUsed int64 `json:"storageUsed"`
|
|
BandwidthUsed int64 `json:"bandwidthUsed"`
|
|
}
|
|
|
|
// UserProjectLimits holds a users storage and bandwidth limits for new projects.
|
|
type UserProjectLimits struct {
|
|
BandwidthLimit memory.Size `json:"bandwidthLimit"`
|
|
StorageLimit memory.Size `json:"storageUsed"`
|
|
}
|