services

package
v0.0.0-...-a448e87 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TemplateString

func TemplateString(str string, vars interface{}) string

TemplateString return string with template str

Types

type IImg_service

type IImg_service interface {
	Save(*multipart.FileHeader) (string, error)
	Delete(string) error
}

func NewImgHostService

func NewImgHostService() IImg_service

func NewImgLocalService

func NewImgLocalService() IImg_service

type ImgHostService

type ImgHostService struct{}

func (*ImgHostService) Delete

func (i *ImgHostService) Delete(path string) error

func (*ImgHostService) Save

func (i *ImgHostService) Save(fileHeader *multipart.FileHeader) (string, error)

type ImgLocalService

type ImgLocalService struct{}

func (*ImgLocalService) Delete

func (i *ImgLocalService) Delete(path string) error

Delete a file with path

func (*ImgLocalService) Save

func (i *ImgLocalService) Save(fileHeader *multipart.FileHeader) (string, error)

Save a file and return path and error

Jump to

Keyboard shortcuts

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