2020-05-11 20:57:46 +02:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package storj
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/zeebo/errs"
|
|
|
|
|
|
|
|
"storj.io/common/uuid"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2020-05-29 15:08:11 +02:00
|
|
|
// ErrBucket is an error class for general bucket errors.
|
2020-05-11 20:57:46 +02:00
|
|
|
ErrBucket = errs.Class("bucket")
|
|
|
|
|
2020-05-29 15:08:11 +02:00
|
|
|
// ErrNoBucket is an error class for using empty bucket name.
|
2020-05-11 20:57:46 +02:00
|
|
|
ErrNoBucket = errs.Class("no bucket specified")
|
|
|
|
|
2020-05-29 15:08:11 +02:00
|
|
|
// ErrBucketNotFound is an error class for non-existing bucket.
|
2020-05-11 20:57:46 +02:00
|
|
|
ErrBucketNotFound = errs.Class("bucket not found")
|
|
|
|
)
|
|
|
|
|
2020-05-29 15:08:11 +02:00
|
|
|
// Bucket contains information about a specific bucket.
|
2020-05-11 20:57:46 +02:00
|
|
|
type Bucket struct {
|
|
|
|
ID uuid.UUID
|
|
|
|
Name string
|
|
|
|
ProjectID uuid.UUID
|
|
|
|
PartnerID uuid.UUID
|
|
|
|
Created time.Time
|
|
|
|
PathCipher CipherSuite
|
|
|
|
DefaultSegmentsSize int64
|
|
|
|
DefaultRedundancyScheme RedundancyScheme
|
|
|
|
DefaultEncryptionParameters EncryptionParameters
|
|
|
|
}
|