storage

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package storage provides blob storage service

Package storage provides blob storage service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(b *bs) error

func WithAccessKey

func WithAccessKey(ak string) Option

func WithBucketName

func WithBucketName(bn string) Option

func WithCompressAlgorithm

func WithCompressAlgorithm(al string) Option

func WithCompressionLevel

func WithCompressionLevel(level int) Option

func WithEndpoint

func WithEndpoint(ep string) Option

func WithErrGroup

func WithErrGroup(eg errgroup.Group) Option

func WithFilename

func WithFilename(fn string) Option

func WithFilenameSuffix

func WithFilenameSuffix(sf string) Option

func WithMaxPartSizeGB

func WithMaxPartSizeGB(gb int) Option

func WithMaxPartSizeKB

func WithMaxPartSizeKB(kb int) Option

func WithMaxPartSizeMB

func WithMaxPartSizeMB(mb int) Option

func WithRegion

func WithRegion(rg string) Option

func WithSecretAccessKey

func WithSecretAccessKey(sak string) Option

func WithToken

func WithToken(tk string) Option

func WithType

func WithType(bst string) Option

type Storage

type Storage interface {
	Start(ctx context.Context) (<-chan error, error)
	Reader(ctx context.Context) (io.Reader, error)
	Writer(ctx context.Context) (io.WriteCloser, error)
}

func New

func New(opts ...Option) (Storage, error)

Jump to

Keyboard shortcuts

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