Documentation ¶
Index ¶
- type Repository
- func (r *Repository) AuthorStats(ctx context.Context) ([]entity.AuthorClickAggregate, error)
- func (r *Repository) Content(ctx context.Context, date string, address string) ([]entity.Content, error)
- func (r *Repository) ContentByID(ctx context.Context, id int64) (*entity.Content, error)
- func (r *Repository) ContentStats(ctx context.Context) ([]entity.ContentClickAggregate, error)
- func (r *Repository) CreateClick(ctx context.Context, click entity.Click) error
- func (r *Repository) Transaction(ctx context.Context, f func(ctx context.Context, tx *sqlx.Tx) error) error
- func (r *Repository) UnsyncedClicksAcquire(ctx context.Context, tx *sqlx.Tx) ([]entity.Click, error)
- func (r *Repository) UnsyncedClicksUpdate(ctx context.Context, tx *sqlx.Tx, clicks []entity.Click) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *sqlx.DB) *Repository
func (*Repository) AuthorStats ¶
func (r *Repository) AuthorStats(ctx context.Context) ([]entity.AuthorClickAggregate, error)
func (*Repository) ContentByID ¶
func (*Repository) ContentStats ¶
func (r *Repository) ContentStats(ctx context.Context) ([]entity.ContentClickAggregate, error)
func (*Repository) CreateClick ¶
func (*Repository) Transaction ¶
func (*Repository) UnsyncedClicksAcquire ¶
func (*Repository) UnsyncedClicksUpdate ¶
Click to show internal directories.
Click to hide internal directories.