adapter

package
v0.0.0-...-9a72348 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustListenAndServe

func MustListenAndServe(srv *http.Server)

func NewHttpServer

func NewHttpServer(h http.Handler, addr string) *http.Server

func SetupTracing

func SetupTracing() (io.Closer, error)

SetupTracing sets up jaeger as a global tracer for opentracing, a closer func is returned that can be used to flush buffers before shutdown.

Types

type ObjectStorage

type ObjectStorage struct {
	Client *s3.S3
	Bucket string
}

func SetupObjectStorage

func SetupObjectStorage(endpoint, accessKeyPath, secretKeyPath string, useSSL bool, region, bucket string) (*ObjectStorage, error)

func (*ObjectStorage) Exists

func (o *ObjectStorage) Exists(ctx context.Context, path string) error

func (*ObjectStorage) Presign

func (o *ObjectStorage) Presign(ctx context.Context, path string) (string, error)

func (*ObjectStorage) Upload

func (o *ObjectStorage) Upload(ctx context.Context, path string, file io.ReadSeeker, contentType string) error

Jump to

Keyboard shortcuts

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