data

package
v0.0.0-...-c30d74c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 20 Imported by: 0

README

Data

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewLeafRepo

func NewLeafRepo(data *Data, logger log.Logger, AppConfig *conf.App) biz.LeafRepo

NewLeafRepo .

func NewShortUrlRepo

func NewShortUrlRepo(data *Data, logger log.Logger) biz.ShortUrlRepo

NewShortUrlRepo creates a new instance of ShortUrlRepo.

Types

type Data

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

Data .

func NewData

func NewData(c *conf.Data, logger log.Logger) (*Data, func(), error)

NewData .

type LeafRepo

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

func (*LeafRepo) CountByBizTag

func (lf *LeafRepo) CountByBizTag(ctx context.Context, tag string) (int, error)

func (*LeafRepo) Find

func (lf *LeafRepo) Find(ctx context.Context, id int64) (*biz.Leaf, error)

func (*LeafRepo) FindByBizTag

func (lf *LeafRepo) FindByBizTag(ctx context.Context, tag string) (*biz.Leaf, error)

func (*LeafRepo) ListAll

func (lf *LeafRepo) ListAll(ctx context.Context) ([]*biz.Leaf, error)

func (*LeafRepo) Save

func (lf *LeafRepo) Save(ctx context.Context, leaf *biz.Leaf) (int64, error)

func (*LeafRepo) Update

func (lf *LeafRepo) Update(ctx context.Context, id int64, leaf *biz.Leaf) error

func (*LeafRepo) UpdateBuffer

func (lf *LeafRepo) UpdateBuffer(ctx context.Context, bizId int64) ([]int64, error)

type ShortUrlRepo

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

func (*ShortUrlRepo) Find

func (sr *ShortUrlRepo) Find(ctx context.Context, id int64) (*biz.ShortUrl, error)

func (*ShortUrlRepo) FindByShort

func (sr *ShortUrlRepo) FindByShort(ctx context.Context, short string) (*biz.ShortUrl, error)

func (*ShortUrlRepo) ListAll

func (sr *ShortUrlRepo) ListAll(ctx context.Context) ([]*biz.ShortUrl, error)

func (*ShortUrlRepo) Save

func (sr *ShortUrlRepo) Save(ctx context.Context, url *biz.ShortUrl) (err error)

func (*ShortUrlRepo) Update

func (sr *ShortUrlRepo) Update(ctx context.Context, id int64, ShortUrl *biz.ShortUrl) error

func (*ShortUrlRepo) UpdateUrlCount

func (sr *ShortUrlRepo) UpdateUrlCount(ctx context.Context, id int64, added int64) error

Directories

Path Synopsis
ent

Jump to

Keyboard shortcuts

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