dao

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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bfs

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

Bfs .

func NewBfs

func NewBfs(c *conf.Config) *Bfs

NewBfs .

func (*Bfs) GenImage

func (b *Bfs) GenImage(ctx context.Context, wmKey, wmText string, distance int, vertical bool) (res []byte, height, width int, hasher string, err error)

GenImage gen a image.

func (*Bfs) Upload

func (b *Bfs) Upload(ctx context.Context, key, secret, contentType, bucket, dir, filename string, data []byte) (location, etag string, err error)

Upload upload file to bfs.

func (*Bfs) Watermark

func (b *Bfs) Watermark(ctx context.Context, data []byte, contentType, wmKey, wmText string, paddingX, paddingY int, wmScale float64) (res []byte, err error)

Watermark generate watermark image by key and text.

type Dao

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

Dao dao struct

func NewDao

func NewDao(c *conf.Config) *Dao

NewDao new a dao instance.

func (*Dao) Buckets

func (d *Dao) Buckets() (bucketMap map[string]*model.Bucket, err error)

Buckets all bucket info from database.

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) error

Ping ping database.

Jump to

Keyboard shortcuts

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