Documentation
¶
Index ¶
- Variables
- func NewCache(ctx context.Context, c *conf.Bootstrap) cache.CacheInterface
- func NewData(ctx context.Context, ec *ent.Client, cache cache.CacheInterface) biz.EchoRepo
- func NewEnt(ctx context.Context, c *conf.Bootstrap) (*ent.Client, error)
- type Data
- func (r *Data) CreateEcho(ctx context.Context, echo *biz.Echo) (*biz.Echo, error)
- func (r *Data) DeleteEcho(ctx context.Context, ID int64) error
- func (r *Data) GetEcho(ctx context.Context, ID int64) (*biz.Echo, error)
- func (r *Data) ListEcho(ctx context.Context, offset int64, limit int64) ([]*biz.Echo, error)
- func (r *Data) UpdateEcho(ctx context.Context, echo *biz.Echo) (*biz.Echo, error)
Constants ¶
This section is empty.
Variables ¶
ProviderSet provided NewData and NewEnt.
Functions ¶
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data handle db connection and implemented biz.EchoRepo.
func (*Data) CreateEcho ¶
CreateEcho creates a new echo record and cache it by key id.
func (*Data) DeleteEcho ¶
DeleteEcho delete echo record.
Click to show internal directories.
Click to hide internal directories.