Documentation ¶
Index ¶
- Constants
- func AccountUser(namespace, user string) string
- func BCookie(namespace, bucket string) string
- type AccessKey
- type Account
- type AcctLimits
- type AcctStats
- type ActionBits
- type ActionBitsMgo
- type Bucket
- type BucketEncrypt
- type BucketNotify
- type DataChunk
- type Iam
- type Object
- type ObjectPart
- type ObjectProps
- type Policy
- type Tag
Constants ¶
View Source
const ( DBName = "swifty-s3" DBColS3Iams = "S3Iams" DBColS3Stats = "S3Stats" DBColS3StatsArch = "S3StatsA" DBColS3Buckets = "S3Buckets" DBColS3Objects = "S3Objects" DBColS3Uploads = "S3Uploads" DBColS3ObjectData = "S3ObjectData" DBColS3DataChunks = "S3DataChunks" DBColS3AccessKeys = "S3AccessKeys" DBColS3Websites = "S3Websites" )
View Source
const (
Resourse_Any = "*"
)
Most permissive mode
View Source
const TimeStampMax = int64(0x7fffffffffffffff)
Variables ¶
This section is empty.
Functions ¶
func AccountUser ¶
To distingush iam users as an index
Types ¶
type AccessKey ¶
type AccessKey struct { ObjID bson.ObjectId `bson:"_id,omitempty"` MTime int64 `bson:"mtime,omitempty"` State uint32 `bson:"state"` AccountObjID bson.ObjectId `bson:"account-id,omitempty"` IamObjID bson.ObjectId `bson:"iam-id,omitempty"` CreationTimestamp int64 `bson:"creation-timestamp,omitempty"` ExpirationTimestamp int64 `bson:"expiration-timestamp,omitempty"` AccessKeyID string `bson:"access-key-id"` AccessKeySecret string `bson:"access-key-secret"` }
type Account ¶
type Account struct { ObjID bson.ObjectId `bson:"_id,omitempty"` MTime int64 `bson:"mtime,omitempty"` State uint32 `bson:"state"` AwsID string `bson:"aws-id,omitempty"` Namespace string `bson:"namespace,omitempty"` CreationTime string `bson:"creation-time,omitempty"` User string `bson:"user,omitempty"` Email string `bson:"email,omitempty"` }
func (*Account) NamespaceID ¶
Bucket grouping by namespace in DB for lookup
type AcctLimits ¶
type AcctStats ¶
type AcctStats struct { ObjID bson.ObjectId `bson:"_id,omitempty"` NamespaceID string `bson:"nsid,omitempty"` CntObjects int64 `bson:"cnt-objects"` CntBytes int64 `bson:"cnt-bytes"` OutBytes int64 `bson:"out-bytes"` OutBytesWeb int64 `bson:"out-bytes-web"` OutBytesTotOff int64 `bson:"out-bytes-tot-off"` /* Ach stuff */ /* * Dirty -- it's the ID of the original stats object on which we * need to update offsets for increasing counters. Set on archive * at creation, and is cleaned once the offsets are update in * the original stats. See scraper code for details. */ Dirty *bson.ObjectId `bson:"dirty,omitempty"` Till *time.Time `bson:"till,omitempty"` Lim *AcctLimits `bson:"limits,omitempty"` }
type ActionBits ¶
type ActionBits [2]uint64
func (ActionBits) ToMgo ¶
func (v ActionBits) ToMgo() ActionBitsMgo
type ActionBitsMgo ¶
type ActionBitsMgo [16]byte
func (ActionBitsMgo) ToSwy ¶
func (v ActionBitsMgo) ToSwy() ActionBits
type Bucket ¶
type Bucket struct { ObjID bson.ObjectId `bson:"_id,omitempty"` BCookie string `bson:"bcookie,omitempty"` MTime int64 `bson:"mtime,omitempty"` State uint32 `bson:"state"` NamespaceID string `bson:"nsid,omitempty"` CreationTime string `bson:"creation-time,omitempty"` // Todo Versioning bool `bson:"versioning,omitempty"` TagSet []Tag `bson:"tags,omitempty"` Encrypt BucketEncrypt `bson:"encrypt,omitempty"` Location string `bson:"location,omitempty"` Policy string `bson:"policy,omitempty"` Logging bool `bson:"logging,omitempty"` Lifecycle string `bson:"lifecycle,omitempty"` RequestPayment string `bson:"request-payment,omitempty"` Ref int64 `bson:"ref"` CntObjects int64 `bson:"cnt-objects"` CntBytes int64 `bson:"cnt-bytes"` Rover int64 `bson:"rover"` Name string `bson:"name"` CannedAcl string `bson:"canned-acl"` BasicNotify *BucketNotify `bson:"notify,omitempty"` MaxObjects int64 `bson:"max-objects"` MaxBytes int64 `bson:"max-bytes"` }
type BucketEncrypt ¶
type BucketNotify ¶
type Iam ¶
type Iam struct { ObjID bson.ObjectId `bson:"_id,omitempty"` MTime int64 `bson:"mtime,omitempty"` State uint32 `bson:"state"` AwsID string `bson:"aws-id,omitempty"` AccountObjID bson.ObjectId `bson:"account-id,omitempty"` Policy Policy `bson:"policy,omitempty"` CreationTime string `bson:"creation-time,omitempty"` User string `bson:"user,omitempty"` }
type Object ¶
type Object struct { ObjID bson.ObjectId `bson:"_id,omitempty"` OCookie string `bson:"ocookie"` MTime int64 `bson:"mtime,omitempty"` State uint32 `bson:"state"` BucketObjID bson.ObjectId `bson:"bucket-id,omitempty"` Version int `bson:"version"` Rover int64 `bson:"rover"` Size int64 `bson:"size"` ETag string `bson:"etag"` ObjectProps `bson:",inline"` }
type ObjectPart ¶
type ObjectPart struct { ObjID bson.ObjectId `bson:"_id,omitempty"` MTime int64 `bson:"mtime,omitempty"` State uint32 `bson:"state"` RefID bson.ObjectId `bson:"ref-id,omitempty"` BCookie string `bson:"bcookie,omitempty"` OCookie string `bson:"ocookie,omitempty"` CreationTime string `bson:"creation-time,omitempty"` Size int64 `bson:"size"` Part uint `bson:"part"` ETag string `bson:"etag"` Data []byte `bson:"data,omitempty"` Chunks []bson.ObjectId `bson:"chunks"` }
type ObjectProps ¶
type Policy ¶
type Policy struct { Effect string `bson:"effect,omitempty"` Action ActionBitsMgo `bson:"action,omitempty"` Resource []string `bson:"resource,omitempty"` }
Click to show internal directories.
Click to hide internal directories.