Documentation ¶
Index ¶
- Variables
- type Engine
- type LocalThumbnailProcess
- type ThumbnailClient
- func (c *ThumbnailClient) Check() error
- func (c *ThumbnailClient) Generate(sourcePath string, output string, option ThumbnailOption) error
- func (c *ThumbnailClient) GenerateAsRaw(sourcePath string, output string, option ThumbnailOption) (io.ReadCloser, error)
- func (c *ThumbnailClient) Resize(sourcePath string, option ThumbnailOption) ([]byte, error)
- func (c *ThumbnailClient) ResizeWithByte(ctx context.Context, input io.ReadCloser, option ThumbnailOption) (io.ReadCloser, error)
- type ThumbnailOption
- type ThumbnailProcess
- type ThumbnailServiceConfig
- type ThumbnailServicePlugin
- type VipsThumbnailEngine
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultThumbnailServicePlugin = &ThumbnailServicePlugin{}
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct { Process map[string]ThumbnailProcess UseEngine string }
func (*Engine) Resize ¶
func (t *Engine) Resize(ctx context.Context, input io.ReadCloser, option ThumbnailOption) (io.ReadCloser, error)
type LocalThumbnailProcess ¶
type LocalThumbnailProcess struct { }
func (*LocalThumbnailProcess) Resize ¶
func (p *LocalThumbnailProcess) Resize(ctx context.Context, input io.ReadCloser, option ThumbnailOption) (io.ReadCloser, error)
type ThumbnailClient ¶
type ThumbnailClient struct {
BaseUrl string
}
func NewThumbnailClient ¶
func NewThumbnailClient(baseUrl string) *ThumbnailClient
func (*ThumbnailClient) Check ¶
func (c *ThumbnailClient) Check() error
func (*ThumbnailClient) Generate ¶
func (c *ThumbnailClient) Generate(sourcePath string, output string, option ThumbnailOption) error
func (*ThumbnailClient) GenerateAsRaw ¶
func (c *ThumbnailClient) GenerateAsRaw(sourcePath string, output string, option ThumbnailOption) (io.ReadCloser, error)
func (*ThumbnailClient) Resize ¶
func (c *ThumbnailClient) Resize(sourcePath string, option ThumbnailOption) ([]byte, error)
func (*ThumbnailClient) ResizeWithByte ¶
func (c *ThumbnailClient) ResizeWithByte(ctx context.Context, input io.ReadCloser, option ThumbnailOption) (io.ReadCloser, error)
type ThumbnailOption ¶
type ThumbnailProcess ¶
type ThumbnailProcess interface {
Resize(ctx context.Context, input io.ReadCloser, option ThumbnailOption) (io.ReadCloser, error)
}
type ThumbnailServiceConfig ¶
type ThumbnailServicePlugin ¶
type ThumbnailServicePlugin struct { Client *ThumbnailClient Logger *youlog.Scope Prefix string // contains filtered or unexported fields }
func (*ThumbnailServicePlugin) OnInit ¶
func (p *ThumbnailServicePlugin) OnInit(e *harukap.HarukaAppEngine) error
func (*ThumbnailServicePlugin) Resize ¶
func (p *ThumbnailServicePlugin) Resize(ctx context.Context, input io.ReadCloser, option ThumbnailOption) (io.ReadCloser, error)
func (*ThumbnailServicePlugin) SetConfig ¶
func (p *ThumbnailServicePlugin) SetConfig(config *ThumbnailServiceConfig)
type VipsThumbnailEngine ¶
type VipsThumbnailEngine struct {
Target string
}
func NewVipsThumbnailEngine ¶
func NewVipsThumbnailEngine(target string) *VipsThumbnailEngine
func (*VipsThumbnailEngine) Resize ¶
func (e *VipsThumbnailEngine) Resize(ctx context.Context, input io.ReadCloser, option ThumbnailOption) (io.ReadCloser, error)
Click to show internal directories.
Click to hide internal directories.