Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AddCache(f func())
- func (d *Dao) AllShorts(ctx context.Context) (res []*model.ShortUrl, err error)
- func (d *Dao) Cache(c context.Context, short string) (su *model.ShortUrl, err error)
- func (d *Dao) Close()
- func (d *Dao) InShort(ctx context.Context, su *model.ShortUrl) (id int64, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PingMC(c context.Context) (err error)
- func (d *Dao) SetCache(c context.Context, su *model.ShortUrl) (err error)
- func (d *Dao) SetEmptyCache(c context.Context, short string) (err error)
- func (d *Dao) Short(ctx context.Context, short string) (res *model.ShortUrl, err error)
- func (d *Dao) ShortCount(ctx context.Context, mid int64, long string) (count int, err error)
- func (d *Dao) ShortLimit(ctx context.Context, pn, ps int, mid int64, long string) (res []*model.ShortUrl, err error)
- func (d *Dao) ShortUp(ctx context.Context, id, mid int64, long string) (rows int64, err error)
- func (d *Dao) ShortbyID(ctx context.Context, id int64) (res *model.ShortUrl, err error)
- func (d *Dao) UpdateState(ctx context.Context, id, mid int64, state int) (rows int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao struct conf
func (*Dao) SetEmptyCache ¶
SetEmptyCache set empty cache for a few time
func (*Dao) ShortCount ¶
ShortCount get all short_url
func (*Dao) ShortLimit ¶
func (d *Dao) ShortLimit(ctx context.Context, pn, ps int, mid int64, long string) (res []*model.ShortUrl, err error)
ShortLimit get short_url list
Click to show internal directories.
Click to hide internal directories.