s3

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3

type S3 struct {
	*Storage
}

func NewS3StorageFromEncryptedURI

func NewS3StorageFromEncryptedURI(encryptedURI string) (*S3, error)

func NewS3StorageFromURL

func NewS3StorageFromURL(uri string) (*S3, error)

func (*S3) GetEncryptedURL

func (s *S3) GetEncryptedURL() (encrypted string, err error)

func (*S3) GetObjectPath

func (s *S3) GetObjectPath(name string) string

func (*S3) GetSchema

func (s *S3) GetSchema() string

func (*S3) GetURI

func (s *S3) GetURI() string

func (*S3) GetURL

func (s *S3) GetURL() string

type Storage

type Storage struct {
	//ID          primitive.ObjectID `bson:"_id"         json:"id"`
	Ak          string `bson:"ak"          json:"ak"`
	Sk          string `bson:"-"           json:"sk"`
	Endpoint    string `bson:"endpoint"    json:"endpoint"`
	Bucket      string `bson:"bucket"      json:"bucket"`
	Subfolder   string `bson:"subfolder"   json:"subfolder"`
	Insecure    bool   `bson:"insecure"    json:"insecure"`
	IsDefault   bool   `bson:"is_default"  json:"is_default"`
	EncryptedSk string `bson:"encryptedSk" json:"-"`
	UpdatedBy   string `bson:"updated_by"  json:"updated_by"`
	UpdateTime  int64  `bson:"update_time" json:"update_time"`
	Provider    int8   `bson:"provider"    json:"provider"`
}

Jump to

Keyboard shortcuts

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