gmaws

package
v0.100.18 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsClient

type AwsClient struct {
	AccessKeyId     string `json:"access_key_id"`
	AccessKeySecret string `json:"access_key_secret"`
	Region          string `json:"region"`

	S3 S3Client
}

func (*AwsClient) NewS3Client

func (c *AwsClient) NewS3Client() error

func (*AwsClient) UploadObjectToS3

func (c *AwsClient) UploadObjectToS3(fileBytes []byte, remotePath string) (ret *UploadToS3Response, err error)

func (*AwsClient) UploadObjectToS3WithRandomKey

func (c *AwsClient) UploadObjectToS3WithRandomKey(fileBytes []byte) (ret *UploadToS3Response, err error)

func (*AwsClient) UploadSingleFileToS3WithRandomKey

func (c *AwsClient) UploadSingleFileToS3WithRandomKey(filePath string) (ret *UploadToS3Response, err error)

func (*AwsClient) UploadSingleFileToS3WithSpecifyKey

func (c *AwsClient) UploadSingleFileToS3WithSpecifyKey(filePath string, keyName string) (ret *UploadToS3Response, err error)

type S3Client

type S3Client struct {
	Client   *s3.S3
	Bucket   string `json:"bucket"`
	BaseUri  string `json:"base_uri"`
	Subpath  string `json:"subpath"`
	Endpoint string `json:"endpoint"`
}

type UploadToS3Response

type UploadToS3Response struct {
	ObjectType string
	ObjectSize int
	BaseUri    string
	RemotePath string
	FullPath   string
}

Jump to

Keyboard shortcuts

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