repository

package
v0.0.0-...-3cbc610 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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) Content

func (r *Repository) Content(ctx context.Context, date string, address string) ([]entity.Content, error)

func (*Repository) ContentByID

func (r *Repository) ContentByID(ctx context.Context, id int64) (*entity.Content, error)

func (*Repository) ContentStats

func (r *Repository) ContentStats(ctx context.Context) ([]entity.ContentClickAggregate, error)

func (*Repository) CreateClick

func (r *Repository) CreateClick(ctx context.Context, click entity.Click) error

func (*Repository) Transaction

func (r *Repository) Transaction(ctx context.Context, f func(ctx context.Context, tx *sqlx.Tx) error) error

func (*Repository) UnsyncedClicksAcquire

func (r *Repository) UnsyncedClicksAcquire(ctx context.Context, tx *sqlx.Tx) ([]entity.Click, error)

func (*Repository) UnsyncedClicksUpdate

func (r *Repository) UnsyncedClicksUpdate(ctx context.Context, tx *sqlx.Tx, clicks []entity.Click) error

Jump to

Keyboard shortcuts

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