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: 21 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) Authorize

func (b *Bfs) Authorize(key, secret, method, bucket, fileName string, expire int64) (authorization string)

Authorize .

func (*Bfs) SpecificUpload

func (b *Bfs) SpecificUpload(ctx context.Context, contentType, auth, bucket, fileName string, data []byte) (location, etag string, err error)

SpecificUpload .

func (*Bfs) Upload

func (b *Bfs) Upload(ctx context.Context, up *model.UploadParam, data []byte) (location, etag string, err error)

Upload with watermark

type Dao

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

Dao dao

func New

func New(c *conf.Config) (dao *Dao)

New init mysql db

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) CreateTable

func (d *Dao) CreateTable(c context.Context, table string) error

CreateTable . TODO check namespace

func (*Dao) Ping

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

Ping dao ping

Jump to

Keyboard shortcuts

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