Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BucketExists = uint8(1)
View Source
var BucketExistsUnknown = uint8(2)
View Source
var BucketNotExist = uint8(0)
View Source
var PermissionAllowed = uint8(1)
View Source
var PermissionDenied = uint8(0)
View Source
var PermissionUnknown = uint8(2)
Functions ¶
func IsValidS3BucketName ¶
func NormalizeName ¶ added in v0.2.0
NormalizeName accepts a raw bucket identifier (bucket name, URL, or ARN-like host) and returns a canonical bucket name.
func Permission ¶
Permission is a convenience method to convert a boolean into either a PermissionAllowed or PermissionDenied
func ReadFromFile ¶
Types ¶
type Bucket ¶
type Bucket struct {
//gorm.Model
ID uint `gorm:"primarykey" json:",omitempty"`
Name string `json:"name" gorm:"name;size:64;index"`
Region string `json:"region" gorm:"size:20"`
Exists uint8 `json:"exists"`
DateScanned time.Time `json:"date_scanned"`
Objects []Object `json:"objects"`
ObjectsEnumerated bool `json:"objects_enumerated"`
Provider string `json:"provider"`
NumObjects int32 `json:"num_objects"`
// Total size of all bucket objects in bytes
BucketSize uint64 `json:"bucket_size"`
OwnerID string `json:"owner_id"`
OwnerDisplayName string `json:"owner_display_name"`
PermAuthUsersRead uint8 `json:"perm_auth_users_read"`
PermAuthUsersWrite uint8 `json:"perm_auth_users_write"`
PermAuthUsersReadACL uint8 `json:"perm_auth_users_read_acl"`
PermAuthUsersWriteACL uint8 `json:"perm_auth_users_write_acl"`
PermAuthUsersFullControl uint8 `json:"perm_auth_users_full_control"`
PermAllUsersRead uint8 `json:"perm_all_users_read"`
PermAllUsersWrite uint8 `json:"perm_all_users_write"`
PermAllUsersReadACL uint8 `json:"perm_all_users_read_acl"`
PermAllUsersWriteACL uint8 `json:"perm_all_users_write_acl"`
PermAllUsersFullControl uint8 `json:"perm_all_users_full_control"`
}
func (*Bucket) ParseACLOutputV2 ¶
func (b *Bucket) ParseACLOutputV2(aclOutput *s3.GetBucketAclOutput) error
ParseACLOutputV2 TODO: probably move this to providers.go
type Object ¶
type Object struct {
//gorm.Model
ID uint `gorm:"primarykey" json:",omitempty"`
Key string `json:"key" gorm:"type:string;size:1024"` // Keys can be up to 1,024 bytes long, UTF-8 encoded plus an additional byte just in case. https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
Size uint64 `json:"size"`
BucketID uint `json:",omitempty"`
}
Click to show internal directories.
Click to hide internal directories.