storage

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStorage

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

Minio storage struct implemets Provider interface methods

func NewFileStorage

func NewFileStorage(client *minio.Client, bucket, endpoint string) *FileStorage

Constructor

func (*FileStorage) Upload

func (fs *FileStorage) Upload(ctx context.Context, input UploadInput) (string, error)

Required method for Provider interface

type Provider

type Provider interface {
	Upload(ctx context.Context, input UploadInput) (string, error)
}

type UploadInput

type UploadInput struct {
	File        io.Reader
	Name        string
	Size        int64
	ContentType string
}

Object struct for upload file for some storage provider

Jump to

Keyboard shortcuts

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