miniogw

package
v0.33.5-rc-monkit Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Error is the errs class of standard End User Client errors
	Error = errs.Class("Storj Gateway error")
)

Functions

func Logging

func Logging(gateway minio.Gateway, log *zap.Logger) minio.Gateway

Logging returns a wrapper of minio.Gateway that logs errors before returning them.

Types

type Gateway

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

Gateway is the implementation of a minio cmd.Gateway

func NewStorjGateway

func NewStorjGateway(project *uplink.Project, access *uplink.EncryptionAccess, pathCipher storj.CipherSuite, encryption storj.EncryptionParameters, redundancy storj.RedundancyScheme, segmentSize memory.Size) *Gateway

NewStorjGateway creates a *Storj object from an existing ObjectStore

func (*Gateway) Name

func (gateway *Gateway) Name() string

Name implements cmd.Gateway

func (*Gateway) NewGatewayLayer

func (gateway *Gateway) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, error)

NewGatewayLayer implements cmd.Gateway

func (*Gateway) Production

func (gateway *Gateway) Production() bool

Production implements cmd.Gateway

type MinioConfig

type MinioConfig struct {
	AccessKey string `help:"Minio Access Key to use" default:"insecure-dev-access-key"`
	SecretKey string `help:"Minio Secret Key to use" default:"insecure-dev-secret-key"`
	Dir       string `help:"Minio generic server config path" default:"$CONFDIR/minio"`
}

MinioConfig is a configuration struct that keeps details about starting Minio

type MultipartStream

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

MultipartStream serializes multiple readers into a single reader

func NewMultipartStream

func NewMultipartStream() *MultipartStream

NewMultipartStream creates a new MultipartStream

func (*MultipartStream) Abort

func (stream *MultipartStream) Abort(err error)

Abort aborts the stream reading

func (*MultipartStream) AddPart

func (stream *MultipartStream) AddPart(partID int, data *hash.Reader) (*StreamPart, error)

AddPart adds a new part to the stream to wait

func (*MultipartStream) Close

func (stream *MultipartStream) Close()

Close closes the stream, but lets it complete

func (*MultipartStream) Read

func (stream *MultipartStream) Read(data []byte) (n int, err error)

Read implements io.Reader interface, blocking when there's no part

type MultipartUpload

type MultipartUpload struct {
	ID       string
	Bucket   string
	Object   string
	Metadata map[string]string
	Done     chan (*MultipartUploadResult)
	Stream   *MultipartStream
	// contains filtered or unexported fields
}

MultipartUpload is partial info about a pending upload

func NewMultipartUpload

func NewMultipartUpload(uploadID string, bucket, object string, metadata map[string]string) *MultipartUpload

NewMultipartUpload creates a new MultipartUpload

type MultipartUploadResult

type MultipartUploadResult struct {
	Error error
	Info  minio.ObjectInfo
}

MultipartUploadResult contains either an Error or the uploaded ObjectInfo

type MultipartUploads

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

MultipartUploads manages pending multipart uploads

func NewMultipartUploads

func NewMultipartUploads() *MultipartUploads

NewMultipartUploads creates new MultipartUploads

func (*MultipartUploads) Create

func (uploads *MultipartUploads) Create(bucket, object string, metadata map[string]string) (*MultipartUpload, error)

Create creates a new upload

func (*MultipartUploads) Get

func (uploads *MultipartUploads) Get(bucket, object, uploadID string) (*MultipartUpload, error)

Get finds a pending upload

func (*MultipartUploads) Remove

func (uploads *MultipartUploads) Remove(bucket, object, uploadID string) (*MultipartUpload, error)

Remove returns and removes a pending upload

func (*MultipartUploads) RemoveByID

func (uploads *MultipartUploads) RemoveByID(uploadID string)

RemoveByID removes pending upload by id

type ServerConfig

type ServerConfig struct {
	Address string `help:"address to serve S3 api over" default:"127.0.0.1:7777"`
}

ServerConfig determines how minio listens for requests

type StreamPart

type StreamPart struct {
	Number int
	ID     int
	Size   int64
	Reader *hash.Reader
	Done   chan error
}

StreamPart is a reader waiting in MultipartStream

Jump to

Keyboard shortcuts

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