storage

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: MIT Imports: 11 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BaseDir         string
	Host            string
	Port            string
	SSL             bool
	AccessKeyID     string
	AccessKeySecret string
	Token           string
	Region          string
	MaxRetries      int
}

type DelParams

type DelParams struct {
	FullPath string
	Force    bool
}

type Interface

type Interface interface {
	Put(ctx context.Context, params PutParams) (PutResult, error)
	Del(ctx context.Context, params DelParams) error
	Url(ctx context.Context, params UrlParams) (UrlResult, error)
}

func InitMinio

func InitMinio(cfg Config) (Interface, error)

type PutParams

type PutParams struct {
	DirName                string
	FileName               string
	FileBuffer             io.Reader
	FileSize               int64
	ContentType            string
	ContentEncoding        string
	UserTags, UserMetadata map[string]string
}

type PutResult

type PutResult struct {
	DirName  string
	FileName string
	FullPath string
	Region   string
	Tag      string
	Size     int64
}

type UrlParams

type UrlParams struct {
	FullPath       string
	ExpireDuration time.Duration
}

type UrlResult

type UrlResult struct {
	Scheme   string
	Host     string
	FullPath string
	FullURL  string
	RawQuery string
}

Jump to

Keyboard shortcuts

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