services

package
v0.0.0-...-5bcc8b5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAWSSession

func GetAWSSession() (*session.Session, error)

Types

type AWS

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

func (AWS) GetOIDPreSignedURL

func (a AWS) GetOIDPreSignedURL(oid string) (string, string, error)

func (AWS) OIDExists

func (a AWS) OIDExists(oid string) (bool, error)

func (AWS) UploadOID

func (a AWS) UploadOID(oid string, body io.ReadCloser) error

type AWSService

type AWSService interface {
	OIDExists(oid string) (bool, error)
	GetOIDPreSignedURL(oid string) (string, string, error)
	UploadOID(oid string, body io.ReadCloser) error
}

func NewAWSService

func NewAWSService(bucket string, useAccelerate bool, presignEnabled bool, presignExpiration time.Duration) (AWSService, error)

type S3

type S3 interface {
	HeadObject(input *s3.HeadObjectInput) (*s3.HeadObjectOutput, error)
	HeadObjectRequest(input *s3.HeadObjectInput) (req *request.Request, output *s3.HeadObjectOutput)
	GetObjectRequest(input *s3.GetObjectInput) (req *request.Request, output *s3.GetObjectOutput)
}

Jump to

Keyboard shortcuts

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