service

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pixel

func Pixel(file io.Reader) (width, height int, err error)

Pixel get width height

Types

type Service

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

Service .

func New

func New(c *conf.Config) *Service

New .

func (*Service) GenImageUpload

func (s *Service) GenImageUpload(ctx context.Context, uploadKey string, wmKey, wmText string, distance int, vertical bool) (res *model.ResultWm, err error)

GenImageUpload generate watermark image by text and upload it.

func (*Service) GetRateLimit

func (s *Service) GetRateLimit(bucket, dir string) (model.DirRateConfig, bool)

GetRateLimit return rate limit of bucket and dir

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping .

func (*Service) Upload

func (s *Service) Upload(ctx context.Context, uploadKey, uploadToken, contentType string, data []byte) (result *model.Result, err error)

Upload upload by key and secret.

func (*Service) UploadAdminRecord

func (s *Service) UploadAdminRecord(ctx context.Context, action model.UploadActionType, up *model.UploadParam, data []byte) (result *model.Result, err error)

UploadAdminRecord no dir limit upload method.

func (*Service) UploadRecord

func (s *Service) UploadRecord(ctx context.Context, action model.UploadActionType, mid int64, up *model.UploadParam, data []byte) (result *model.Result, err error)

UploadRecord .

Jump to

Keyboard shortcuts

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