s3

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2020 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(sess *session.Session, awsConfig *aws.Config, db *gorm.DB, log *zap.Logger,
	accountID string, _ string) resource.ClientInterface

Types

type Bucket

type Bucket struct {
	ID              uint `gorm:"primarykey"`
	AccountID       string
	Region          string
	CreationDate    *time.Time
	Name            *string
	Grants          []*BucketGrant          `gorm:"constraint:OnDelete:CASCADE;"`
	CORSRules       []*BucketCorsRule       `gorm:"constraint:OnDelete:CASCADE;"`
	EncryptionRules []*BucketEncryptionRule `gorm:"constraint:OnDelete:CASCADE;"`
	// The bucket policy as a JSON document.
	Policy *string

	// Specifies whether MFA delete is enabled in the bucket versioning configuration.
	// This element is only returned if the bucket has been configured with MFA
	// delete. If the bucket has never been so configured, this element is not returned.
	MFADelete *string

	// The versioning state of the bucket.
	Status *string
}

func (Bucket) TableName added in v0.3.8

func (Bucket) TableName() string

type BucketCorsRule

type BucketCorsRule struct {
	ID       uint `gorm:"primarykey"`
	BucketID uint

	// Headers that are specified in the Access-Control-Request-Headers header.
	// These headers are allowed in a preflight OPTIONS request. In response to
	// any preflight OPTIONS request, Amazon S3 returns any requested headers that
	// are allowed.
	AllowedHeaders *string

	// An HTTP method that you allow the origin to execute. Valid values are GET,
	// PUT, HEAD, POST, and DELETE.
	//
	// AllowedMethods is a required field
	AllowedMethods *string

	// One or more origins you want customers to be able to access the bucket from.
	//
	// AllowedOrigins is a required field
	AllowedOrigins *string

	// One or more headers in the response that you want customers to be able to
	// access from their applications (for example, from a JavaScript XMLHttpRequest
	// object).
	ExposeHeaders *string

	// The time in seconds that your browser is to cache the preflight response
	// for the specified resource.
	MaxAgeSeconds *int64
}

func (BucketCorsRule) TableName added in v0.3.8

func (BucketCorsRule) TableName() string

type BucketEncryptionRule

type BucketEncryptionRule struct {
	ID       uint `gorm:"primarykey"`
	BucketID uint

	KMSMasterKeyID *string
	SSEAlgorithm   *string
}

func (BucketEncryptionRule) TableName added in v0.3.8

func (BucketEncryptionRule) TableName() string

type BucketGrant

type BucketGrant struct {
	ID       uint `gorm:"primarykey"`
	BucketID uint

	// The person being granted permissions.
	Grantee *s3.Grantee `gorm:"embedded;embeddedPrefix:s3_grantee_"`

	// Specifies the permission given to the grantee.
	Permission *string
}

func (BucketGrant) TableName added in v0.3.8

func (BucketGrant) TableName() string

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) CollectResource

func (c *Client) CollectResource(resource string, config interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL