pool

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package pool 图片缓存池 nolint: revive

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrImgFileOutdated = errors.New("img file outdated")
	ErrNoSuchImg       = errors.New("no such img")
	ErrSendImg         = errors.New("send image error")
	ErrGetMsg          = errors.New("get msg error")
)

Functions

func SendImageFromPool

func SendImageFromPool(imgname, imgpath string, genimg func() error, send ctxext.NoCtxSendMsg, get ctxext.NoCtxGetMsg) error

SendImageFromPool ...

func SendRemoteImageFromPool

func SendRemoteImageFromPool(imgname, imgurl string, send ctxext.NoCtxSendMsg, get ctxext.NoCtxGetMsg) error

SendRemoteImageFromPool ...

Types

type Image

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

Image 图片数据

func GetImage

func GetImage(name string) (m *Image, err error)

GetImage name

func NewImage

func NewImage(send ctxext.NoCtxSendMsg, get ctxext.NoCtxGetMsg, name, f string) (m *Image, hassent bool, err error)

NewImage context name file

func (*Image) Push

func (m *Image) Push(send ctxext.NoCtxSendMsg, get ctxext.NoCtxGetMsg) (hassent bool, err error)

Push context

func (*Image) SetFile

func (m *Image) SetFile(f string)

SetFile f

func (*Image) String

func (m *Image) String() string

String url

Jump to

Keyboard shortcuts

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