storage

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMimeType added in v1.7.0

func GetMimeType(fpath string) string

func HandleProxy added in v1.7.0

func HandleProxy(dataURL string, opts *ImgProcessOpts) (io.ReadCloser, string, error)

Types

type ImgProcessOpts added in v1.10.0

type ImgProcessOpts struct {
	Quality int
	Ratio   *Ratio
	Rotate  int
	Ext     string
}

func UriToImgProcessOpts added in v1.11.0

func UriToImgProcessOpts(uri string) (*ImgProcessOpts, error)

func (*ImgProcessOpts) String added in v1.10.0

func (img *ImgProcessOpts) String() string

type Ratio added in v1.7.0

type Ratio struct {
	Width  int
	Height int
}

func GetRatio added in v1.7.0

func GetRatio(dimes string) (*Ratio, error)

type StorageFS

type StorageFS struct {
	*sst.StorageFS
}

func NewStorageFS

func NewStorageFS(dir string) (*StorageFS, error)

func (*StorageFS) ServeObject added in v1.12.0

func (s *StorageFS) ServeObject(bucket sst.Bucket, fpath string, opts *ImgProcessOpts) (io.ReadCloser, string, error)

type StorageMinio

type StorageMinio struct {
	*sst.StorageMinio
}

func NewStorageMinio

func NewStorageMinio(address, user, pass string) (*StorageMinio, error)

func (*StorageMinio) ServeObject added in v1.12.0

func (s *StorageMinio) ServeObject(bucket sst.Bucket, fpath string, opts *ImgProcessOpts) (io.ReadCloser, string, error)

type StorageServe added in v1.12.0

type StorageServe interface {
	sst.ObjectStorage
	ServeObject(bucket sst.Bucket, fpath string, opts *ImgProcessOpts) (io.ReadCloser, string, error)
}

Jump to

Keyboard shortcuts

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