minio

package
v0.0.0-...-8b94866 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "minio"

Variables

This section is empty.

Functions

func NewService

func NewService(config mediastore.ServiceConfig) (mediastore.Service, error)

Types

type Config

type Config struct {
	Region          string `env:"REGION" yaml:"region" json:"region"`
	BucketName      string `env:"BUCKET_NAME" yaml:"bucket_name" json:"bucket_name"`
	BasePath        string `env:"BASE_PATH" yaml:"base_path" json:"base_path"`
	AccessKeyID     string `env:"ACCESS_KEY_ID,required" yaml:"access_key_id" json:"access_key_id"`
	SecretAccessKey string `env:"SECRET_ACCESS_KEY,required" yaml:"secret_access_key" json:"secret_access_key"`
	Endpoint        string `env:"ENDPOINT,required" yaml:"endpoint" json:"endpoint"`
	UseSSL          bool   `env:"USE_SSL" yaml:"use_ssl" json:"use_ssl"`
	BucketOperation bool   `env:"BUCKET_OPERATION" yaml:"bucket_operation" json:"bucket_operation"`
}

func ConfigSkeleton

func ConfigSkeleton() Config

type Service

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

func (*Service) GetObject

func (s *Service) GetObject(sourceKey string) (stream *bytes.Buffer, err error)

func (*Service) GetPublicObject

func (s *Service) GetPublicObject(sourceKey string) (targetURl string, err error)

func (*Service) PutObject

func (s *Service) PutObject(targetKey string, contentSource io.Reader) (uploadInfo *mediastore.UploadInfo, err error)

Jump to

Keyboard shortcuts

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