utils

package
v0.0.0-...-1fcadc3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StroageHelp = make(map[string]string, 0)
View Source
var StroageMap = make(map[string]Upload, 0)

Functions

func CheckImageType

func CheckImageType(b []byte) string

func CheckPath

func CheckPath(str string) uint

func DeleteAfterLastCharacter

func DeleteAfterLastCharacter(s string, character string) string

func GetHomeDir

func GetHomeDir() string

func GetStringStringMapKey

func GetStringStringMapKey(m map[string]string) []string

func GetStringUploadMapKey

func GetStringUploadMapKey(m map[string]Upload) []string

func StrimList

func StrimList(l []string) []string

Types

type BaseStorage

type BaseStorage struct {
	ImageList []*Image
	// contains filtered or unexported fields
}

func NewBaseStorage

func NewBaseStorage(paths []string, nameReserve bool) *BaseStorage

func (*BaseStorage) Destory

func (b *BaseStorage) Destory()

func (*BaseStorage) Generate

func (b *BaseStorage) Generate(paths []string, nameReserve bool) error

type Image

type Image struct {
	Path       string
	Title      string
	ImageType  string
	PathType   uint
	OutBytes   []byte
	OutBase64  string
	InName     string
	OutSuffix  string
	FolderName string
	OutName    string
	// contains filtered or unexported fields
}

type MetaStorage

type MetaStorage struct {
	B *BaseStorage
}

func NewMetaStorage

func NewMetaStorage() *MetaStorage

func (*MetaStorage) SetPicList

func (m *MetaStorage) SetPicList(paths []string, nameReserve bool)

type Upload

type Upload interface {
	Upload(image *Image) (string, error)
	SetPicList([]string, bool)
}

Jump to

Keyboard shortcuts

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