Documentation
¶
Index ¶
- type BackendImpl
- type Client
- func (c *Client) CreateDonationImage(content []string, appID string, secret string, scene string, isShare bool) (*image.NRGBA, error)
- func (c *Client) CreateWXQrCode(appID string, secret string, scene string) (img image.Image, err error)
- func (c *Client) DrawText(fontColor color.Color, str string, pt fixed.Point26_6, size float64) error
- func (c *Client) Init() error
- func (c *Client) SlipString(content string, fontSize float64, textWidth int) []string
- type Config
- type IImageBackend
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendImpl ¶
type BackendImpl struct {
Client
}
BackendImpl ...
func NewImageBackend ¶
func NewImageBackend(cfg *Config, wxClient wx.IWXClient) (*BackendImpl, error)
NewImageBackend ...
type Client ¶
type Client struct {
ImageConfig *Config
Bg *image.NRGBA
Font *freetype.Context
FontType *truetype.Font
WXClient wx.IWXClient
}
Client image services client
func (*Client) CreateDonationImage ¶
func (c *Client) CreateDonationImage(content []string, appID string, secret string, scene string, isShare bool) (*image.NRGBA, error)
CreateDonationImage create new image of donation items
func (*Client) CreateWXQrCode ¶
func (c *Client) CreateWXQrCode(appID string, secret string, scene string) (img image.Image, err error)
CreateWXQrCode create a wx qr code
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mock_backend is a generated GoMock package.
|
Package mock_backend is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.