service

package
v0.0.0-...-55ecc9f Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2016 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const IMAGE_POST_FIELD = "image"
View Source
const META_COUNT_FIELD = "image_count"
View Source
const THUMB_INTERPOLATION = resize.Lanczos3

Variables

This section is empty.

Functions

func SaveImage

func SaveImage(ir *ImageUploaderResource, c *gin.Context, imageTypeName string) (*api.Response, *api.Error)

func UniqFilename

func UniqFilename(origFilename string, thumbSuffix string) (string, string, error)

Types

type Config

type Config struct {
	SvcHost    string
	DbUser     string
	DbPassword string
	DbHost     string
	DbName     string
	Mode       string
	Service    ServiceConfig
}

type ImageUploaderResource

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

func (*ImageUploaderResource) DeleteImage

func (ir *ImageUploaderResource) DeleteImage(c *gin.Context)

func (*ImageUploaderResource) GetAllImages

func (ir *ImageUploaderResource) GetAllImages(c *gin.Context)

func (*ImageUploaderResource) GetImage

func (ir *ImageUploaderResource) GetImage(c *gin.Context)

func (*ImageUploaderResource) UpdateImage

func (ir *ImageUploaderResource) UpdateImage(c *gin.Context)

func (*ImageUploaderResource) UploadImage

func (ir *ImageUploaderResource) UploadImage(c *gin.Context)

type ImageUploaderService

type ImageUploaderService struct {
}

func (*ImageUploaderService) Migrate

func (s *ImageUploaderService) Migrate(cfg Config) error

func (*ImageUploaderService) Run

func (s *ImageUploaderService) Run(cfg Config) error

type ServiceConfig

type ServiceConfig struct {
	Address      string
	Upload_dir   string
	Upload_url   string
	Thumb_dir    string
	Thumb_suffix string
}

Jump to

Keyboard shortcuts

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