local

package
v0.0.0-...-5c0bb04 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPathPrefix = "public/upload/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

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

Local storage

func New

func New(opts ...Option) *Local

New return a *Local

func (*Local) Close

func (l *Local) Close() error

Close file system object

func (*Local) Delete

func (l *Local) Delete(path string, thumbs map[string][2]int) error

Delete data in local

func (*Local) Read

func (l *Local) Read(path string, thumbs map[string][2]int) map[string]string

Read data from local

func (*Local) Write

func (l *Local) Write(path string, reader io.Reader, thumbs map[string][2]int) error

Write data to local

type Option

type Option func(*Local)

Option set local field

func WithPathPrefix

func WithPathPrefix(pathPrefix string) Option

WithPathPrefix set path prefix

Jump to

Keyboard shortcuts

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