Documentation ¶
Index ¶
- Variables
- type ShortLink
- type ShortLinkPage
- type ShortLinkRepo
- type ShortLinkRepoUsecase
- func (uc *ShortLinkRepoUsecase) Count(ctx context.Context) (int, error)
- func (uc *ShortLinkRepoUsecase) Create(ctx context.Context, sl *ShortLink) (*ShortLink, error)
- func (uc *ShortLinkRepoUsecase) Del(ctx context.Context, key string) error
- func (uc *ShortLinkRepoUsecase) Flush(ctx context.Context) error
- func (uc *ShortLinkRepoUsecase) Get(ctx context.Context, key string) (*ShortLink, error)
- func (uc *ShortLinkRepoUsecase) List(ctx context.Context, pageSize int, pageToken string) ([]string, string, error)
- func (uc *ShortLinkRepoUsecase) Upsert(ctx context.Context, sl *ShortLink) (*ShortLink, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewShortLinkRepoUsecase, )
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type ShortLinkPage ¶
type ShortLinkRepo ¶
type ShortLinkRepo interface { Create(ctx context.Context, sl *ShortLink) (*ShortLink, error) Upsert(ctx context.Context, sl *ShortLink) (*ShortLink, error) GetByKey(ctx context.Context, key string) (*ShortLink, error) GetByLink(ctx context.Context, link string) (*ShortLink, error) DeleteByKey(ctx context.Context, key string) error List(ctx context.Context, pageSize int, pageToken string) (*ShortLinkPage, error) Flush(ctx context.Context) error Count(ctx context.Context) (int, error) }
type ShortLinkRepoUsecase ¶
type ShortLinkRepoUsecase struct {
// contains filtered or unexported fields
}
func NewShortLinkRepoUsecase ¶
func NewShortLinkRepoUsecase(sr ShortLinkRepo, filter *cuckoo.Filter, conf *conf.Data, logger log.Logger) *ShortLinkRepoUsecase
func (*ShortLinkRepoUsecase) Count ¶
func (uc *ShortLinkRepoUsecase) Count(ctx context.Context) (int, error)
func (*ShortLinkRepoUsecase) Del ¶
func (uc *ShortLinkRepoUsecase) Del(ctx context.Context, key string) error
func (*ShortLinkRepoUsecase) Flush ¶
func (uc *ShortLinkRepoUsecase) Flush(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.