aws

package
v0.0.0-...-c99f1b3 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context) (*s3.Client, error)

func PathDecider

func PathDecider(path string, listFunc ObjectListFunc, getFunc ObjectGetFunc) func() HTTPResponse

Types

type Child

type Child struct {
	Key  string
	Size int64
}

type HTTPResponse

type HTTPResponse struct {
	Code     int
	Response Response
}

func GetObject

func GetObject(objGetFn ObjectGetFunc) (r HTTPResponse)

func ListObjects

func ListObjects(objListFn ObjectListFunc) (r HTTPResponse)

type ObjectGetFunc

type ObjectGetFunc func() (*s3.GetObjectOutput, error)

func ToObjectGetFunc

func ToObjectGetFunc(ctx context.Context, client *s3.Client, bucket, path string) ObjectGetFunc

type ObjectListFunc

type ObjectListFunc func() (*s3.ListObjectsV2Output, error)

func ToObjectListFunc

func ToObjectListFunc(ctx context.Context, client *s3.Client, bucket, path string) ObjectListFunc

type Response

type Response struct {
	Type     string  `json:"type,omitempty"`
	Content  string  `json:"content,omitempty"`
	Children []Child `json:"children,omitempty"`
	Error    string  `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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