business

package
v0.0.0-...-57214d0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2015 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERRORTYPE_MARSHALJSON               = "MarshalJsonErr"
	ERRORTYPE_STORAGETYPENOSUPPORTE     = "StorageTypeNoSupporte"
	SVG                                 = 6063
	NEWIMAGENAMELENGTH                  = 21
	TableCount                      int = 6 // 64
)
View Source
var (
	ERRORTYPE_FDFSUPLOADERR     = "fdfs.uploaderr"
	ERRORTYPE_FDFSCONNECTIONERR = "fdfs.connectionerr"
	ERRORTYPE_FDFSDOWNLOADERR   = "fdfs.downloaderr"
	ERRORTYPE_NFSDOWNLOADERR    = "nfs.downloaderr"
	ERRORTYPE_FDFSDELETEERR     = "fdfs.deleteerr"
	ERRORTYPE_NFSDELETEERR      = "nfs.deleteerr"

	STORAGETYPE_FDFS = "fdfs"
	STORAGETYPE_NFS  = "nfs"
)
View Source
var (
	CATTITLE = "Storage"
)

Functions

This section is empty.

Types

type FdfsStorage

type FdfsStorage struct {
	Path string
	Cat  cat.Cat
}

func (*FdfsStorage) ConvertFilePath

func (this *FdfsStorage) ConvertFilePath(isSource bool) util.Error

func (*FdfsStorage) Delete

func (this *FdfsStorage) Delete(isDeleteAll bool) util.Error

fdfs ignore isDeleteAll

func (*FdfsStorage) Download

func (this *FdfsStorage) Download() ([]byte, util.Error)

func (*FdfsStorage) Upload

func (this *FdfsStorage) Upload(bts []byte, fileExt string) (string, util.Error)

func (*FdfsStorage) UploadSlave

func (this *FdfsStorage) UploadSlave(bts []byte, prefixName string, fileExtName string) (string, util.Error)

type ImageRequest

type ImageRequest struct {
	Cat cat.Cat
}

func (ImageRequest) Delete

func (ImageRequest) Download

func (ImageRequest) DownloadZip

func (ImageRequest) GetChannel

func (this ImageRequest) GetChannel(path string) string

func (ImageRequest) Save

type LogoRequest

type LogoRequest struct {
	ImageRequest
	FontSizes []int
}

func (LogoRequest) Save

type NfsStorage

type NfsStorage struct {
	Path string
	Cat  cat.Cat
}

func (*NfsStorage) ConvertFilePath

func (this *NfsStorage) ConvertFilePath(isSource bool) util.Error

func (*NfsStorage) Delete

func (this *NfsStorage) Delete(isDeleteAll bool) util.Error

func (*NfsStorage) Download

func (this *NfsStorage) Download() ([]byte, util.Error)

func (*NfsStorage) Upload

func (this *NfsStorage) Upload(bts []byte, fileExt string) (string, util.Error)

func (*NfsStorage) UploadSlave

func (this *NfsStorage) UploadSlave(bts []byte, prefixName string, fileExtName string) (string, util.Error)

type Storage

type Storage interface {
	Upload(bts []byte, fileExt string) (string, util.Error)
	Download() ([]byte, util.Error)
	Delete(isDeleteAll bool) util.Error
	ConvertFilePath(isSource bool) util.Error
	UploadSlave(bts []byte, prefixName string, fileExtName string) (string, util.Error)
}

func CreateStorage

func CreateStorage(path, storageType string, c cat.Cat) Storage

func NewStorage

func NewStorage(c cat.Cat) (Storage, string)

Jump to

Keyboard shortcuts

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